diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index 51b829982cc..ec2afed138c 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -39,7 +39,7 @@ jobs: include: - runner: ubuntu-24.04 platform: linux/amd64 - - runner: ubuntu-24.04 + - runner: ubuntu-24.04-arm platform: linux/arm64 steps: - name: Check out repo @@ -47,10 +47,6 @@ jobs: with: fetch-depth: 0 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - if: ${{ matrix.platform == 'linux/arm64' }} - - name: Build and push by digest uses: ./.github/actions/docker id: docker_build diff --git a/Dockerfile b/Dockerfile index ad09a55a39f..f3983a210f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,7 @@ # conflicts in case of parallel compilation. # 3. Configuration variables are shared between runs using /root/env file. -ARG ALPINE_VERSION=3.18 +ARG ALPINE_VERSION=3.21 # deps-${RUSTC_WRAPPER:-base} # If one of SCCACHE_GHA_ENABLED, SCCACHE_BUCKET, SCCACHE_MEMCACHED is set, then deps-sccache is used, otherwise deps-base @@ -72,6 +72,7 @@ RUN apk add --no-cache \ ca-certificates \ clang-static clang-dev \ cmake \ + curl \ git \ libc-dev \ linux-headers \ @@ -148,7 +149,13 @@ RUN if [[ "$TARGETARCH" == "arm64" ]] ; then export PROTOC_ARCH=aarch_64; else e ln -s /opt/protoc/bin/protoc /usr/bin/ # Switch to clang -RUN rm /usr/bin/cc && ln -s /usr/bin/clang /usr/bin/cc +# Note that CC / CXX can be updated later on (eg. when configuring sccache) +RUN rm /usr/bin/cc && \ + ln -s /usr/bin/clang /usr/bin/cc +RUN <> /root/env +echo "export CC='clang'" >> /root/env +EOS ARG NODE_ENV=production ENV NODE_ENV=${NODE_ENV} @@ -287,6 +294,7 @@ git clone https://github.com/facebook/rocksdb.git -b v9.9.3 --depth 1 . source /root/env make -j$(nproc) static_lib + mkdir -p /opt/rocksdb/usr/local/lib cp librocksdb.a /opt/rocksdb/usr/local/lib/ cp -r include /opt/rocksdb/usr/local/ @@ -494,11 +502,13 @@ WORKDIR /platform COPY --from=build-planner /platform/recipe.json recipe.json # Build dependencies - this is the caching Docker layer! +# Note we unset CFLAGS and CXXFLAGS as they have `-march` included, which breaks wasm32 build RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ --mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \ --mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \ --mount=type=secret,id=AWS \ source /root/env && \ + unset CFLAGS CXXFLAGS && \ cargo chef cook \ --recipe-path recipe.json \ --profile "$CARGO_BUILD_PROFILE" \ @@ -546,12 +556,14 @@ COPY --parents \ packages/dash-spv \ /platform/ +# We unset CFLAGS CXXFLAGS because they hold `march` flags which break wasm32 build RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOME}/registry/index \ --mount=type=cache,sharing=shared,id=cargo_registry_cache,target=${CARGO_HOME}/registry/cache \ --mount=type=cache,sharing=shared,id=cargo_git,target=${CARGO_HOME}/git/db \ --mount=type=cache,sharing=shared,id=unplugged_${TARGETARCH},target=/tmp/unplugged \ --mount=type=secret,id=AWS \ source /root/env && \ + unset CFLAGS CXXFLAGS && \ cp -R /tmp/unplugged /platform/.yarn/ && \ yarn install --inline-builds && \ cp -R /platform/.yarn/unplugged /tmp/ && \ diff --git a/packages/dapi-grpc/clients/platform/v0/java/org/dash/platform/dapi/v0/PlatformGrpc.java b/packages/dapi-grpc/clients/platform/v0/java/org/dash/platform/dapi/v0/PlatformGrpc.java index b055db5cbc5..f0d139c5183 100644 --- a/packages/dapi-grpc/clients/platform/v0/java/org/dash/platform/dapi/v0/PlatformGrpc.java +++ b/packages/dapi-grpc/clients/platform/v0/java/org/dash/platform/dapi/v0/PlatformGrpc.java @@ -1162,6 +1162,37 @@ org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesResponse> getGetTok return getGetTokenStatusesMethod; } + private static volatile io.grpc.MethodDescriptor getGetTokenPreProgrammedDistributionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getTokenPreProgrammedDistributions", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetTokenPreProgrammedDistributionsMethod() { + io.grpc.MethodDescriptor getGetTokenPreProgrammedDistributionsMethod; + if ((getGetTokenPreProgrammedDistributionsMethod = PlatformGrpc.getGetTokenPreProgrammedDistributionsMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetTokenPreProgrammedDistributionsMethod = PlatformGrpc.getGetTokenPreProgrammedDistributionsMethod) == null) { + PlatformGrpc.getGetTokenPreProgrammedDistributionsMethod = getGetTokenPreProgrammedDistributionsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getTokenPreProgrammedDistributions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getTokenPreProgrammedDistributions")) + .build(); + } + } + } + return getGetTokenPreProgrammedDistributionsMethod; + } + private static volatile io.grpc.MethodDescriptor getGetTokenTotalSupplyMethod; @@ -1639,6 +1670,13 @@ public void getTokenStatuses(org.dash.platform.dapi.v0.PlatformOuterClass.GetTok io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTokenStatusesMethod(), responseObserver); } + /** + */ + public void getTokenPreProgrammedDistributions(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTokenPreProgrammedDistributionsMethod(), responseObserver); + } + /** */ public void getTokenTotalSupply(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest request, @@ -1935,6 +1973,13 @@ public void getGroupActionSigners(org.dash.platform.dapi.v0.PlatformOuterClass.G org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesRequest, org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesResponse>( this, METHODID_GET_TOKEN_STATUSES))) + .addMethod( + getGetTokenPreProgrammedDistributionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse>( + this, METHODID_GET_TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS))) .addMethod( getGetTokenTotalSupplyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -2299,6 +2344,14 @@ public void getTokenStatuses(org.dash.platform.dapi.v0.PlatformOuterClass.GetTok getChannel().newCall(getGetTokenStatusesMethod(), getCallOptions()), request, responseObserver); } + /** + */ + public void getTokenPreProgrammedDistributions(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTokenPreProgrammedDistributionsMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void getTokenTotalSupply(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest request, @@ -2628,6 +2681,13 @@ public org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesResponse get getChannel(), getGetTokenStatusesMethod(), getCallOptions(), request); } + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsResponse getTokenPreProgrammedDistributions(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTokenPreProgrammedDistributionsMethod(), getCallOptions(), request); + } + /** */ public org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyResponse getTokenTotalSupply(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest request) { @@ -2989,6 +3049,14 @@ public com.google.common.util.concurrent.ListenableFuture getTokenPreProgrammedDistributions( + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTokenPreProgrammedDistributionsMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture getTokenTotalSupply( @@ -3067,11 +3135,12 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -3238,6 +3307,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv serviceImpl.getTokenStatuses((org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS: + serviceImpl.getTokenPreProgrammedDistributions((org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenPreProgrammedDistributionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_GET_TOKEN_TOTAL_SUPPLY: serviceImpl.getTokenTotalSupply((org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest) request, (io.grpc.stub.StreamObserver) responseObserver); @@ -3356,6 +3429,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetIdentityTokenInfosMethod()) .addMethod(getGetIdentitiesTokenInfosMethod()) .addMethod(getGetTokenStatusesMethod()) + .addMethod(getGetTokenPreProgrammedDistributionsMethod()) .addMethod(getGetTokenTotalSupplyMethod()) .addMethod(getGetGroupInfoMethod()) .addMethod(getGetGroupInfosMethod()) diff --git a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js index 41ee1b9504c..3e3651d0586 100644 --- a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js +++ b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js @@ -1307,6 +1307,39 @@ $root.org = (function() { * @variation 2 */ + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getTokenPreProgrammedDistributions}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getTokenPreProgrammedDistributionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} [response] GetTokenPreProgrammedDistributionsResponse + */ + + /** + * Calls getTokenPreProgrammedDistributions. + * @function getTokenPreProgrammedDistributions + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetTokenPreProgrammedDistributionsRequest} request GetTokenPreProgrammedDistributionsRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getTokenPreProgrammedDistributionsCallback} callback Node-style callback called with the error, if any, and GetTokenPreProgrammedDistributionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getTokenPreProgrammedDistributions = function getTokenPreProgrammedDistributions(request, callback) { + return this.rpcCall(getTokenPreProgrammedDistributions, $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest, $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse, request, callback); + }, "name", { value: "getTokenPreProgrammedDistributions" }); + + /** + * Calls getTokenPreProgrammedDistributions. + * @function getTokenPreProgrammedDistributions + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetTokenPreProgrammedDistributionsRequest} request GetTokenPreProgrammedDistributionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getTokenTotalSupply}. * @memberof org.dash.platform.dapi.v0.Platform @@ -54998,6 +55031,1910 @@ $root.org = (function() { return GetTokenStatusesResponse; })(); + v0.GetTokenPreProgrammedDistributionsRequest = (function() { + + /** + * Properties of a GetTokenPreProgrammedDistributionsRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetTokenPreProgrammedDistributionsRequest + * @property {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.IGetTokenPreProgrammedDistributionsRequestV0|null} [v0] GetTokenPreProgrammedDistributionsRequest v0 + */ + + /** + * Constructs a new GetTokenPreProgrammedDistributionsRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetTokenPreProgrammedDistributionsRequest. + * @implements IGetTokenPreProgrammedDistributionsRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetTokenPreProgrammedDistributionsRequest=} [properties] Properties to set + */ + function GetTokenPreProgrammedDistributionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTokenPreProgrammedDistributionsRequest v0. + * @member {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.IGetTokenPreProgrammedDistributionsRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + * @instance + */ + GetTokenPreProgrammedDistributionsRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetTokenPreProgrammedDistributionsRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + * @instance + */ + Object.defineProperty(GetTokenPreProgrammedDistributionsRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetTokenPreProgrammedDistributionsRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenPreProgrammedDistributionsRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} GetTokenPreProgrammedDistributionsRequest instance + */ + GetTokenPreProgrammedDistributionsRequest.create = function create(properties) { + return new GetTokenPreProgrammedDistributionsRequest(properties); + }; + + /** + * Encodes the specified GetTokenPreProgrammedDistributionsRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenPreProgrammedDistributionsRequest} message GetTokenPreProgrammedDistributionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenPreProgrammedDistributionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.v0 != null && Object.hasOwnProperty.call(message, "v0")) + $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetTokenPreProgrammedDistributionsRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenPreProgrammedDistributionsRequest} message GetTokenPreProgrammedDistributionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenPreProgrammedDistributionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTokenPreProgrammedDistributionsRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} GetTokenPreProgrammedDistributionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenPreProgrammedDistributionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTokenPreProgrammedDistributionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} GetTokenPreProgrammedDistributionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenPreProgrammedDistributionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTokenPreProgrammedDistributionsRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTokenPreProgrammedDistributionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + properties.version = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetTokenPreProgrammedDistributionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} GetTokenPreProgrammedDistributionsRequest + */ + GetTokenPreProgrammedDistributionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetTokenPreProgrammedDistributionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} message GetTokenPreProgrammedDistributionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTokenPreProgrammedDistributionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + object.v0 = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetTokenPreProgrammedDistributionsRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + * @instance + * @returns {Object.} JSON object + */ + GetTokenPreProgrammedDistributionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 = (function() { + + /** + * Properties of a GetTokenPreProgrammedDistributionsRequestV0. + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + * @interface IGetTokenPreProgrammedDistributionsRequestV0 + * @property {Uint8Array|null} [tokenId] GetTokenPreProgrammedDistributionsRequestV0 tokenId + * @property {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.IStartAtInfo|null} [startAtInfo] GetTokenPreProgrammedDistributionsRequestV0 startAtInfo + * @property {number|null} [limit] GetTokenPreProgrammedDistributionsRequestV0 limit + * @property {boolean|null} [prove] GetTokenPreProgrammedDistributionsRequestV0 prove + */ + + /** + * Constructs a new GetTokenPreProgrammedDistributionsRequestV0. + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + * @classdesc Represents a GetTokenPreProgrammedDistributionsRequestV0. + * @implements IGetTokenPreProgrammedDistributionsRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.IGetTokenPreProgrammedDistributionsRequestV0=} [properties] Properties to set + */ + function GetTokenPreProgrammedDistributionsRequestV0(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTokenPreProgrammedDistributionsRequestV0 tokenId. + * @member {Uint8Array} tokenId + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @instance + */ + GetTokenPreProgrammedDistributionsRequestV0.prototype.tokenId = $util.newBuffer([]); + + /** + * GetTokenPreProgrammedDistributionsRequestV0 startAtInfo. + * @member {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.IStartAtInfo|null|undefined} startAtInfo + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @instance + */ + GetTokenPreProgrammedDistributionsRequestV0.prototype.startAtInfo = null; + + /** + * GetTokenPreProgrammedDistributionsRequestV0 limit. + * @member {number} limit + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @instance + */ + GetTokenPreProgrammedDistributionsRequestV0.prototype.limit = 0; + + /** + * GetTokenPreProgrammedDistributionsRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @instance + */ + GetTokenPreProgrammedDistributionsRequestV0.prototype.prove = false; + + /** + * Creates a new GetTokenPreProgrammedDistributionsRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.IGetTokenPreProgrammedDistributionsRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} GetTokenPreProgrammedDistributionsRequestV0 instance + */ + GetTokenPreProgrammedDistributionsRequestV0.create = function create(properties) { + return new GetTokenPreProgrammedDistributionsRequestV0(properties); + }; + + /** + * Encodes the specified GetTokenPreProgrammedDistributionsRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.IGetTokenPreProgrammedDistributionsRequestV0} message GetTokenPreProgrammedDistributionsRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenPreProgrammedDistributionsRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenId != null && Object.hasOwnProperty.call(message, "tokenId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenId); + if (message.startAtInfo != null && Object.hasOwnProperty.call(message, "startAtInfo")) + $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.encode(message.startAtInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.limit); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetTokenPreProgrammedDistributionsRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.IGetTokenPreProgrammedDistributionsRequestV0} message GetTokenPreProgrammedDistributionsRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenPreProgrammedDistributionsRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTokenPreProgrammedDistributionsRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} GetTokenPreProgrammedDistributionsRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenPreProgrammedDistributionsRequestV0.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenId = reader.bytes(); + break; + case 2: + message.startAtInfo = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.decode(reader, reader.uint32()); + break; + case 3: + message.limit = reader.uint32(); + break; + case 4: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTokenPreProgrammedDistributionsRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} GetTokenPreProgrammedDistributionsRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenPreProgrammedDistributionsRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTokenPreProgrammedDistributionsRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTokenPreProgrammedDistributionsRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + if (!(message.tokenId && typeof message.tokenId.length === "number" || $util.isString(message.tokenId))) + return "tokenId: buffer expected"; + if (message.startAtInfo != null && message.hasOwnProperty("startAtInfo")) { + var error = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.verify(message.startAtInfo); + if (error) + return "startAtInfo." + error; + } + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit)) + return "limit: integer expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetTokenPreProgrammedDistributionsRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} GetTokenPreProgrammedDistributionsRequestV0 + */ + GetTokenPreProgrammedDistributionsRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0(); + if (object.tokenId != null) + if (typeof object.tokenId === "string") + $util.base64.decode(object.tokenId, message.tokenId = $util.newBuffer($util.base64.length(object.tokenId)), 0); + else if (object.tokenId.length >= 0) + message.tokenId = object.tokenId; + if (object.startAtInfo != null) { + if (typeof object.startAtInfo !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.startAtInfo: object expected"); + message.startAtInfo = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.fromObject(object.startAtInfo); + } + if (object.limit != null) + message.limit = object.limit >>> 0; + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetTokenPreProgrammedDistributionsRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} message GetTokenPreProgrammedDistributionsRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTokenPreProgrammedDistributionsRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.tokenId = ""; + else { + object.tokenId = []; + if (options.bytes !== Array) + object.tokenId = $util.newBuffer(object.tokenId); + } + object.startAtInfo = null; + object.limit = 0; + object.prove = false; + } + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + object.tokenId = options.bytes === String ? $util.base64.encode(message.tokenId, 0, message.tokenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenId) : message.tokenId; + if (message.startAtInfo != null && message.hasOwnProperty("startAtInfo")) + object.startAtInfo = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.toObject(message.startAtInfo, options); + if (message.limit != null && message.hasOwnProperty("limit")) + object.limit = message.limit; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetTokenPreProgrammedDistributionsRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetTokenPreProgrammedDistributionsRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo = (function() { + + /** + * Properties of a StartAtInfo. + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @interface IStartAtInfo + * @property {number|Long|null} [startTimeMs] StartAtInfo startTimeMs + * @property {Uint8Array|null} [startRecipient] StartAtInfo startRecipient + * @property {boolean|null} [startRecipientIncluded] StartAtInfo startRecipientIncluded + */ + + /** + * Constructs a new StartAtInfo. + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + * @classdesc Represents a StartAtInfo. + * @implements IStartAtInfo + * @constructor + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.IStartAtInfo=} [properties] Properties to set + */ + function StartAtInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StartAtInfo startTimeMs. + * @member {number|Long} startTimeMs + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + * @instance + */ + StartAtInfo.prototype.startTimeMs = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * StartAtInfo startRecipient. + * @member {Uint8Array} startRecipient + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + * @instance + */ + StartAtInfo.prototype.startRecipient = $util.newBuffer([]); + + /** + * StartAtInfo startRecipientIncluded. + * @member {boolean} startRecipientIncluded + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + * @instance + */ + StartAtInfo.prototype.startRecipientIncluded = false; + + /** + * Creates a new StartAtInfo instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.IStartAtInfo=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} StartAtInfo instance + */ + StartAtInfo.create = function create(properties) { + return new StartAtInfo(properties); + }; + + /** + * Encodes the specified StartAtInfo message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.IStartAtInfo} message StartAtInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartAtInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTimeMs != null && Object.hasOwnProperty.call(message, "startTimeMs")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.startTimeMs); + if (message.startRecipient != null && Object.hasOwnProperty.call(message, "startRecipient")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.startRecipient); + if (message.startRecipientIncluded != null && Object.hasOwnProperty.call(message, "startRecipientIncluded")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.startRecipientIncluded); + return writer; + }; + + /** + * Encodes the specified StartAtInfo message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.IStartAtInfo} message StartAtInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartAtInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartAtInfo message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} StartAtInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartAtInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startTimeMs = reader.uint64(); + break; + case 2: + message.startRecipient = reader.bytes(); + break; + case 3: + message.startRecipientIncluded = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartAtInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} StartAtInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartAtInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartAtInfo message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartAtInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTimeMs != null && message.hasOwnProperty("startTimeMs")) + if (!$util.isInteger(message.startTimeMs) && !(message.startTimeMs && $util.isInteger(message.startTimeMs.low) && $util.isInteger(message.startTimeMs.high))) + return "startTimeMs: integer|Long expected"; + if (message.startRecipient != null && message.hasOwnProperty("startRecipient")) + if (!(message.startRecipient && typeof message.startRecipient.length === "number" || $util.isString(message.startRecipient))) + return "startRecipient: buffer expected"; + if (message.startRecipientIncluded != null && message.hasOwnProperty("startRecipientIncluded")) + if (typeof message.startRecipientIncluded !== "boolean") + return "startRecipientIncluded: boolean expected"; + return null; + }; + + /** + * Creates a StartAtInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} StartAtInfo + */ + StartAtInfo.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo(); + if (object.startTimeMs != null) + if ($util.Long) + (message.startTimeMs = $util.Long.fromValue(object.startTimeMs)).unsigned = true; + else if (typeof object.startTimeMs === "string") + message.startTimeMs = parseInt(object.startTimeMs, 10); + else if (typeof object.startTimeMs === "number") + message.startTimeMs = object.startTimeMs; + else if (typeof object.startTimeMs === "object") + message.startTimeMs = new $util.LongBits(object.startTimeMs.low >>> 0, object.startTimeMs.high >>> 0).toNumber(true); + if (object.startRecipient != null) + if (typeof object.startRecipient === "string") + $util.base64.decode(object.startRecipient, message.startRecipient = $util.newBuffer($util.base64.length(object.startRecipient)), 0); + else if (object.startRecipient.length >= 0) + message.startRecipient = object.startRecipient; + if (object.startRecipientIncluded != null) + message.startRecipientIncluded = Boolean(object.startRecipientIncluded); + return message; + }; + + /** + * Creates a plain object from a StartAtInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} message StartAtInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartAtInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.startTimeMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startTimeMs = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.startRecipient = ""; + else { + object.startRecipient = []; + if (options.bytes !== Array) + object.startRecipient = $util.newBuffer(object.startRecipient); + } + object.startRecipientIncluded = false; + } + if (message.startTimeMs != null && message.hasOwnProperty("startTimeMs")) + if (typeof message.startTimeMs === "number") + object.startTimeMs = options.longs === String ? String(message.startTimeMs) : message.startTimeMs; + else + object.startTimeMs = options.longs === String ? $util.Long.prototype.toString.call(message.startTimeMs) : options.longs === Number ? new $util.LongBits(message.startTimeMs.low >>> 0, message.startTimeMs.high >>> 0).toNumber(true) : message.startTimeMs; + if (message.startRecipient != null && message.hasOwnProperty("startRecipient")) + object.startRecipient = options.bytes === String ? $util.base64.encode(message.startRecipient, 0, message.startRecipient.length) : options.bytes === Array ? Array.prototype.slice.call(message.startRecipient) : message.startRecipient; + if (message.startRecipientIncluded != null && message.hasOwnProperty("startRecipientIncluded")) + object.startRecipientIncluded = message.startRecipientIncluded; + return object; + }; + + /** + * Converts this StartAtInfo to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + * @instance + * @returns {Object.} JSON object + */ + StartAtInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StartAtInfo; + })(); + + return GetTokenPreProgrammedDistributionsRequestV0; + })(); + + return GetTokenPreProgrammedDistributionsRequest; + })(); + + v0.GetTokenPreProgrammedDistributionsResponse = (function() { + + /** + * Properties of a GetTokenPreProgrammedDistributionsResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetTokenPreProgrammedDistributionsResponse + * @property {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.IGetTokenPreProgrammedDistributionsResponseV0|null} [v0] GetTokenPreProgrammedDistributionsResponse v0 + */ + + /** + * Constructs a new GetTokenPreProgrammedDistributionsResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetTokenPreProgrammedDistributionsResponse. + * @implements IGetTokenPreProgrammedDistributionsResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetTokenPreProgrammedDistributionsResponse=} [properties] Properties to set + */ + function GetTokenPreProgrammedDistributionsResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTokenPreProgrammedDistributionsResponse v0. + * @member {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.IGetTokenPreProgrammedDistributionsResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + * @instance + */ + GetTokenPreProgrammedDistributionsResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetTokenPreProgrammedDistributionsResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + * @instance + */ + Object.defineProperty(GetTokenPreProgrammedDistributionsResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetTokenPreProgrammedDistributionsResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenPreProgrammedDistributionsResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} GetTokenPreProgrammedDistributionsResponse instance + */ + GetTokenPreProgrammedDistributionsResponse.create = function create(properties) { + return new GetTokenPreProgrammedDistributionsResponse(properties); + }; + + /** + * Encodes the specified GetTokenPreProgrammedDistributionsResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenPreProgrammedDistributionsResponse} message GetTokenPreProgrammedDistributionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenPreProgrammedDistributionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.v0 != null && Object.hasOwnProperty.call(message, "v0")) + $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetTokenPreProgrammedDistributionsResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenPreProgrammedDistributionsResponse} message GetTokenPreProgrammedDistributionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenPreProgrammedDistributionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTokenPreProgrammedDistributionsResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} GetTokenPreProgrammedDistributionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenPreProgrammedDistributionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTokenPreProgrammedDistributionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} GetTokenPreProgrammedDistributionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenPreProgrammedDistributionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTokenPreProgrammedDistributionsResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTokenPreProgrammedDistributionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + properties.version = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetTokenPreProgrammedDistributionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} GetTokenPreProgrammedDistributionsResponse + */ + GetTokenPreProgrammedDistributionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetTokenPreProgrammedDistributionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} message GetTokenPreProgrammedDistributionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTokenPreProgrammedDistributionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.v0 != null && message.hasOwnProperty("v0")) { + object.v0 = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetTokenPreProgrammedDistributionsResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + * @instance + * @returns {Object.} JSON object + */ + GetTokenPreProgrammedDistributionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 = (function() { + + /** + * Properties of a GetTokenPreProgrammedDistributionsResponseV0. + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + * @interface IGetTokenPreProgrammedDistributionsResponseV0 + * @property {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ITokenDistributions|null} [tokenDistributions] GetTokenPreProgrammedDistributionsResponseV0 tokenDistributions + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetTokenPreProgrammedDistributionsResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetTokenPreProgrammedDistributionsResponseV0 metadata + */ + + /** + * Constructs a new GetTokenPreProgrammedDistributionsResponseV0. + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + * @classdesc Represents a GetTokenPreProgrammedDistributionsResponseV0. + * @implements IGetTokenPreProgrammedDistributionsResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.IGetTokenPreProgrammedDistributionsResponseV0=} [properties] Properties to set + */ + function GetTokenPreProgrammedDistributionsResponseV0(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTokenPreProgrammedDistributionsResponseV0 tokenDistributions. + * @member {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ITokenDistributions|null|undefined} tokenDistributions + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @instance + */ + GetTokenPreProgrammedDistributionsResponseV0.prototype.tokenDistributions = null; + + /** + * GetTokenPreProgrammedDistributionsResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @instance + */ + GetTokenPreProgrammedDistributionsResponseV0.prototype.proof = null; + + /** + * GetTokenPreProgrammedDistributionsResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @instance + */ + GetTokenPreProgrammedDistributionsResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetTokenPreProgrammedDistributionsResponseV0 result. + * @member {"tokenDistributions"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @instance + */ + Object.defineProperty(GetTokenPreProgrammedDistributionsResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["tokenDistributions", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetTokenPreProgrammedDistributionsResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.IGetTokenPreProgrammedDistributionsResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} GetTokenPreProgrammedDistributionsResponseV0 instance + */ + GetTokenPreProgrammedDistributionsResponseV0.create = function create(properties) { + return new GetTokenPreProgrammedDistributionsResponseV0(properties); + }; + + /** + * Encodes the specified GetTokenPreProgrammedDistributionsResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.IGetTokenPreProgrammedDistributionsResponseV0} message GetTokenPreProgrammedDistributionsResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenPreProgrammedDistributionsResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenDistributions != null && Object.hasOwnProperty.call(message, "tokenDistributions")) + $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.encode(message.tokenDistributions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.org.dash.platform.dapi.v0.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.org.dash.platform.dapi.v0.ResponseMetadata.encode(message.metadata, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetTokenPreProgrammedDistributionsResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.IGetTokenPreProgrammedDistributionsResponseV0} message GetTokenPreProgrammedDistributionsResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenPreProgrammedDistributionsResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTokenPreProgrammedDistributionsResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} GetTokenPreProgrammedDistributionsResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenPreProgrammedDistributionsResponseV0.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenDistributions = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.decode(reader, reader.uint32()); + break; + case 2: + message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32()); + break; + case 3: + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTokenPreProgrammedDistributionsResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} GetTokenPreProgrammedDistributionsResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenPreProgrammedDistributionsResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTokenPreProgrammedDistributionsResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTokenPreProgrammedDistributionsResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.tokenDistributions != null && message.hasOwnProperty("tokenDistributions")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.verify(message.tokenDistributions); + if (error) + return "tokenDistributions." + error; + } + } + if (message.proof != null && message.hasOwnProperty("proof")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.org.dash.platform.dapi.v0.ResponseMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a GetTokenPreProgrammedDistributionsResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} GetTokenPreProgrammedDistributionsResponseV0 + */ + GetTokenPreProgrammedDistributionsResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0(); + if (object.tokenDistributions != null) { + if (typeof object.tokenDistributions !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.tokenDistributions: object expected"); + message.tokenDistributions = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.fromObject(object.tokenDistributions); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.proof: object expected"); + message.proof = $root.org.dash.platform.dapi.v0.Proof.fromObject(object.proof); + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetTokenPreProgrammedDistributionsResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} message GetTokenPreProgrammedDistributionsResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTokenPreProgrammedDistributionsResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.tokenDistributions != null && message.hasOwnProperty("tokenDistributions")) { + object.tokenDistributions = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.toObject(message.tokenDistributions, options); + if (options.oneofs) + object.result = "tokenDistributions"; + } + if (message.proof != null && message.hasOwnProperty("proof")) { + object.proof = $root.org.dash.platform.dapi.v0.Proof.toObject(message.proof, options); + if (options.oneofs) + object.result = "proof"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this GetTokenPreProgrammedDistributionsResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetTokenPreProgrammedDistributionsResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry = (function() { + + /** + * Properties of a TokenDistributionEntry. + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @interface ITokenDistributionEntry + * @property {Uint8Array|null} [recipientId] TokenDistributionEntry recipientId + * @property {number|Long|null} [amount] TokenDistributionEntry amount + */ + + /** + * Constructs a new TokenDistributionEntry. + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @classdesc Represents a TokenDistributionEntry. + * @implements ITokenDistributionEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ITokenDistributionEntry=} [properties] Properties to set + */ + function TokenDistributionEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TokenDistributionEntry recipientId. + * @member {Uint8Array} recipientId + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + * @instance + */ + TokenDistributionEntry.prototype.recipientId = $util.newBuffer([]); + + /** + * TokenDistributionEntry amount. + * @member {number|Long} amount + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + * @instance + */ + TokenDistributionEntry.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new TokenDistributionEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ITokenDistributionEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} TokenDistributionEntry instance + */ + TokenDistributionEntry.create = function create(properties) { + return new TokenDistributionEntry(properties); + }; + + /** + * Encodes the specified TokenDistributionEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ITokenDistributionEntry} message TokenDistributionEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenDistributionEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recipientId != null && Object.hasOwnProperty.call(message, "recipientId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.recipientId); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.amount); + return writer; + }; + + /** + * Encodes the specified TokenDistributionEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ITokenDistributionEntry} message TokenDistributionEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenDistributionEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenDistributionEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} TokenDistributionEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenDistributionEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.recipientId = reader.bytes(); + break; + case 2: + message.amount = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenDistributionEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} TokenDistributionEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenDistributionEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenDistributionEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenDistributionEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recipientId != null && message.hasOwnProperty("recipientId")) + if (!(message.recipientId && typeof message.recipientId.length === "number" || $util.isString(message.recipientId))) + return "recipientId: buffer expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high))) + return "amount: integer|Long expected"; + return null; + }; + + /** + * Creates a TokenDistributionEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} TokenDistributionEntry + */ + TokenDistributionEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry(); + if (object.recipientId != null) + if (typeof object.recipientId === "string") + $util.base64.decode(object.recipientId, message.recipientId = $util.newBuffer($util.base64.length(object.recipientId)), 0); + else if (object.recipientId.length >= 0) + message.recipientId = object.recipientId; + if (object.amount != null) + if ($util.Long) + (message.amount = $util.Long.fromValue(object.amount)).unsigned = true; + else if (typeof object.amount === "string") + message.amount = parseInt(object.amount, 10); + else if (typeof object.amount === "number") + message.amount = object.amount; + else if (typeof object.amount === "object") + message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a TokenDistributionEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} message TokenDistributionEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenDistributionEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.recipientId = ""; + else { + object.recipientId = []; + if (options.bytes !== Array) + object.recipientId = $util.newBuffer(object.recipientId); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.amount = options.longs === String ? "0" : 0; + } + if (message.recipientId != null && message.hasOwnProperty("recipientId")) + object.recipientId = options.bytes === String ? $util.base64.encode(message.recipientId, 0, message.recipientId.length) : options.bytes === Array ? Array.prototype.slice.call(message.recipientId) : message.recipientId; + if (message.amount != null && message.hasOwnProperty("amount")) + if (typeof message.amount === "number") + object.amount = options.longs === String ? String(message.amount) : message.amount; + else + object.amount = options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber(true) : message.amount; + return object; + }; + + /** + * Converts this TokenDistributionEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + * @instance + * @returns {Object.} JSON object + */ + TokenDistributionEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenDistributionEntry; + })(); + + GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry = (function() { + + /** + * Properties of a TokenTimedDistributionEntry. + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @interface ITokenTimedDistributionEntry + * @property {number|Long|null} [timestamp] TokenTimedDistributionEntry timestamp + * @property {Array.|null} [distributions] TokenTimedDistributionEntry distributions + */ + + /** + * Constructs a new TokenTimedDistributionEntry. + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @classdesc Represents a TokenTimedDistributionEntry. + * @implements ITokenTimedDistributionEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ITokenTimedDistributionEntry=} [properties] Properties to set + */ + function TokenTimedDistributionEntry(properties) { + this.distributions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TokenTimedDistributionEntry timestamp. + * @member {number|Long} timestamp + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + * @instance + */ + TokenTimedDistributionEntry.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * TokenTimedDistributionEntry distributions. + * @member {Array.} distributions + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + * @instance + */ + TokenTimedDistributionEntry.prototype.distributions = $util.emptyArray; + + /** + * Creates a new TokenTimedDistributionEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ITokenTimedDistributionEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} TokenTimedDistributionEntry instance + */ + TokenTimedDistributionEntry.create = function create(properties) { + return new TokenTimedDistributionEntry(properties); + }; + + /** + * Encodes the specified TokenTimedDistributionEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ITokenTimedDistributionEntry} message TokenTimedDistributionEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenTimedDistributionEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp); + if (message.distributions != null && message.distributions.length) + for (var i = 0; i < message.distributions.length; ++i) + $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.encode(message.distributions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TokenTimedDistributionEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ITokenTimedDistributionEntry} message TokenTimedDistributionEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenTimedDistributionEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenTimedDistributionEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} TokenTimedDistributionEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenTimedDistributionEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.timestamp = reader.uint64(); + break; + case 2: + if (!(message.distributions && message.distributions.length)) + message.distributions = []; + message.distributions.push($root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenTimedDistributionEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} TokenTimedDistributionEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenTimedDistributionEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenTimedDistributionEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenTimedDistributionEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) + return "timestamp: integer|Long expected"; + if (message.distributions != null && message.hasOwnProperty("distributions")) { + if (!Array.isArray(message.distributions)) + return "distributions: array expected"; + for (var i = 0; i < message.distributions.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.verify(message.distributions[i]); + if (error) + return "distributions." + error; + } + } + return null; + }; + + /** + * Creates a TokenTimedDistributionEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} TokenTimedDistributionEntry + */ + TokenTimedDistributionEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry(); + if (object.timestamp != null) + if ($util.Long) + (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; + else if (typeof object.timestamp === "string") + message.timestamp = parseInt(object.timestamp, 10); + else if (typeof object.timestamp === "number") + message.timestamp = object.timestamp; + else if (typeof object.timestamp === "object") + message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); + if (object.distributions) { + if (!Array.isArray(object.distributions)) + throw TypeError(".org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.distributions: array expected"); + message.distributions = []; + for (var i = 0; i < object.distributions.length; ++i) { + if (typeof object.distributions[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.distributions: object expected"); + message.distributions[i] = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.fromObject(object.distributions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TokenTimedDistributionEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} message TokenTimedDistributionEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenTimedDistributionEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.distributions = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timestamp = options.longs === String ? "0" : 0; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (typeof message.timestamp === "number") + object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; + else + object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; + if (message.distributions && message.distributions.length) { + object.distributions = []; + for (var j = 0; j < message.distributions.length; ++j) + object.distributions[j] = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.toObject(message.distributions[j], options); + } + return object; + }; + + /** + * Converts this TokenTimedDistributionEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + * @instance + * @returns {Object.} JSON object + */ + TokenTimedDistributionEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenTimedDistributionEntry; + })(); + + GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions = (function() { + + /** + * Properties of a TokenDistributions. + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @interface ITokenDistributions + * @property {Array.|null} [tokenDistributions] TokenDistributions tokenDistributions + */ + + /** + * Constructs a new TokenDistributions. + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + * @classdesc Represents a TokenDistributions. + * @implements ITokenDistributions + * @constructor + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ITokenDistributions=} [properties] Properties to set + */ + function TokenDistributions(properties) { + this.tokenDistributions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TokenDistributions tokenDistributions. + * @member {Array.} tokenDistributions + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + * @instance + */ + TokenDistributions.prototype.tokenDistributions = $util.emptyArray; + + /** + * Creates a new TokenDistributions instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ITokenDistributions=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} TokenDistributions instance + */ + TokenDistributions.create = function create(properties) { + return new TokenDistributions(properties); + }; + + /** + * Encodes the specified TokenDistributions message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ITokenDistributions} message TokenDistributions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenDistributions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenDistributions != null && message.tokenDistributions.length) + for (var i = 0; i < message.tokenDistributions.length; ++i) + $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.encode(message.tokenDistributions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TokenDistributions message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ITokenDistributions} message TokenDistributions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenDistributions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenDistributions message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} TokenDistributions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenDistributions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.tokenDistributions && message.tokenDistributions.length)) + message.tokenDistributions = []; + message.tokenDistributions.push($root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenDistributions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} TokenDistributions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenDistributions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenDistributions message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenDistributions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenDistributions != null && message.hasOwnProperty("tokenDistributions")) { + if (!Array.isArray(message.tokenDistributions)) + return "tokenDistributions: array expected"; + for (var i = 0; i < message.tokenDistributions.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.verify(message.tokenDistributions[i]); + if (error) + return "tokenDistributions." + error; + } + } + return null; + }; + + /** + * Creates a TokenDistributions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} TokenDistributions + */ + TokenDistributions.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions(); + if (object.tokenDistributions) { + if (!Array.isArray(object.tokenDistributions)) + throw TypeError(".org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.tokenDistributions: array expected"); + message.tokenDistributions = []; + for (var i = 0; i < object.tokenDistributions.length; ++i) { + if (typeof object.tokenDistributions[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.tokenDistributions: object expected"); + message.tokenDistributions[i] = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.fromObject(object.tokenDistributions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TokenDistributions message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + * @static + * @param {org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} message TokenDistributions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenDistributions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tokenDistributions = []; + if (message.tokenDistributions && message.tokenDistributions.length) { + object.tokenDistributions = []; + for (var j = 0; j < message.tokenDistributions.length; ++j) + object.tokenDistributions[j] = $root.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.toObject(message.tokenDistributions[j], options); + } + return object; + }; + + /** + * Converts this TokenDistributions to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + * @instance + * @returns {Object.} JSON object + */ + TokenDistributions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenDistributions; + })(); + + return GetTokenPreProgrammedDistributionsResponseV0; + })(); + + return GetTokenPreProgrammedDistributionsResponse; + })(); + v0.GetTokenTotalSupplyRequest = (function() { /** diff --git a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js index 32492c8ade3..b9cb0ee8436 100644 --- a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js +++ b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js @@ -377,6 +377,17 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusRe goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.VersionCase', null, { proto }); @@ -5112,6 +5123,174 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -54634,6 +54813,1704 @@ proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.hasV0 = funct +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + tokenId: msg.getTokenId_asB64(), + startAtInfo: (f = msg.getStartAtInfo()) && proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.toObject(includeInstance, f), + limit: jspb.Message.getFieldWithDefault(msg, 3, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTokenId(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.deserializeBinaryFromReader); + msg.setStartAtInfo(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLimit(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getStartAtInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.toObject = function(includeInstance, msg) { + var f, obj = { + startTimeMs: jspb.Message.getFieldWithDefault(msg, 1, 0), + startRecipient: msg.getStartRecipient_asB64(), + startRecipientIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStartTimeMs(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartRecipient(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStartRecipientIncluded(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartTimeMs(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional uint64 start_time_ms = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.getStartTimeMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.setStartTimeMs = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes start_recipient = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.getStartRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes start_recipient = 2; + * This is a type-conversion wrapper around `getStartRecipient()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.getStartRecipient_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartRecipient())); +}; + + +/** + * optional bytes start_recipient = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartRecipient()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.getStartRecipient_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartRecipient())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.setStartRecipient = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.clearStartRecipient = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.hasStartRecipient = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool start_recipient_included = 3; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.getStartRecipientIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.setStartRecipientIncluded = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.clearStartRecipientIncluded = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.hasStartRecipientIncluded = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes token_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); +}; + + +/** + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional StartAtInfo start_at_info = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.getStartAtInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.setStartAtInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.clearStartAtInfo = function() { + return this.setStartAtInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.hasStartAtInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 limit = 3; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.setLimit = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.clearLimit = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.hasLimit = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool prove = 4; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional GetTokenPreProgrammedDistributionsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.serializeBinaryToWriter + ); + } +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + TOKEN_DISTRIBUTIONS: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + tokenDistributions: (f = msg.getTokenDistributions()) && proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.toObject(includeInstance, f), + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.deserializeBinaryFromReader); + msg.setTokenDistributions(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.Proof; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.ResponseMetadata; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenDistributions(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.serializeBinaryToWriter + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.toObject = function(includeInstance, msg) { + var f, obj = { + recipientId: msg.getRecipientId_asB64(), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRecipientId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRecipientId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes recipient_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.getRecipientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes recipient_id = 1; + * This is a type-conversion wrapper around `getRecipientId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.getRecipientId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRecipientId())); +}; + + +/** + * optional bytes recipient_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRecipientId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.getRecipientId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRecipientId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.setRecipientId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 amount = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.toObject = function(includeInstance, msg) { + var f, obj = { + timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), + distributionsList: jspb.Message.toObjectList(msg.getDistributionsList(), + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.deserializeBinaryFromReader); + msg.addDistributions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getDistributionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 timestamp = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated TokenDistributionEntry distributions = 2; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.getDistributionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.setDistributionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.addDistributions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.clearDistributionsList = function() { + return this.setDistributionsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.toObject = function(includeInstance, msg) { + var f, obj = { + tokenDistributionsList: jspb.Message.toObjectList(msg.getTokenDistributionsList(), + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.deserializeBinaryFromReader); + msg.addTokenDistributions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenDistributionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated TokenTimedDistributionEntry token_distributions = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.prototype.getTokenDistributionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.prototype.setTokenDistributionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.prototype.addTokenDistributions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.prototype.clearTokenDistributionsList = function() { + return this.setTokenDistributionsList([]); +}; + + +/** + * optional TokenDistributions token_distributions = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.getTokenDistributions = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.setTokenDistributions = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.clearTokenDistributions = function() { + return this.setTokenDistributions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.hasTokenDistributions = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetTokenPreProgrammedDistributionsResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all diff --git a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.h b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.h index bc016d93d65..3ebaf8d2312 100644 --- a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.h +++ b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.h @@ -194,6 +194,12 @@ CF_EXTERN_C_BEGIN @class GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive; @class GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash; @class GetStatusResponse_GetStatusResponseV0_Version_Software; +@class GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0; +@class GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo; +@class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0; +@class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry; +@class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions; +@class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry; @class GetTokenStatusesRequest_GetTokenStatusesRequestV0; @class GetTokenStatusesResponse_GetTokenStatusesResponseV0; @class GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry; @@ -5852,6 +5858,178 @@ GPB_FINAL @interface GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenSt @end +#pragma mark - GetTokenPreProgrammedDistributionsRequest + +typedef GPB_ENUM(GetTokenPreProgrammedDistributionsRequest_FieldNumber) { + GetTokenPreProgrammedDistributionsRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetTokenPreProgrammedDistributionsRequest_Version_OneOfCase) { + GetTokenPreProgrammedDistributionsRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetTokenPreProgrammedDistributionsRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetTokenPreProgrammedDistributionsRequest : GPBMessage + +@property(nonatomic, readonly) GetTokenPreProgrammedDistributionsRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetTokenPreProgrammedDistributionsRequest_ClearVersionOneOfCase(GetTokenPreProgrammedDistributionsRequest *message); + +#pragma mark - GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 + +typedef GPB_ENUM(GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_FieldNumber) { + GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_FieldNumber_TokenId = 1, + GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_FieldNumber_StartAtInfo = 2, + GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_FieldNumber_Limit = 3, + GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_FieldNumber_Prove = 4, +}; + +GPB_FINAL @interface GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *tokenId; + +@property(nonatomic, readwrite, strong, null_resettable) GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo *startAtInfo; +/** Test to see if @c startAtInfo has been set. */ +@property(nonatomic, readwrite) BOOL hasStartAtInfo; + +@property(nonatomic, readwrite) uint32_t limit; + +@property(nonatomic, readwrite) BOOL hasLimit; +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo + +typedef GPB_ENUM(GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo_FieldNumber) { + GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo_FieldNumber_StartTimeMs = 1, + GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo_FieldNumber_StartRecipient = 2, + GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo_FieldNumber_StartRecipientIncluded = 3, +}; + +GPB_FINAL @interface GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo : GPBMessage + +@property(nonatomic, readwrite) uint64_t startTimeMs; + +@property(nonatomic, readwrite, copy, null_resettable) NSData *startRecipient; +/** Test to see if @c startRecipient has been set. */ +@property(nonatomic, readwrite) BOOL hasStartRecipient; + +@property(nonatomic, readwrite) BOOL startRecipientIncluded; + +@property(nonatomic, readwrite) BOOL hasStartRecipientIncluded; +@end + +#pragma mark - GetTokenPreProgrammedDistributionsResponse + +typedef GPB_ENUM(GetTokenPreProgrammedDistributionsResponse_FieldNumber) { + GetTokenPreProgrammedDistributionsResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetTokenPreProgrammedDistributionsResponse_Version_OneOfCase) { + GetTokenPreProgrammedDistributionsResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetTokenPreProgrammedDistributionsResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetTokenPreProgrammedDistributionsResponse : GPBMessage + +@property(nonatomic, readonly) GetTokenPreProgrammedDistributionsResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetTokenPreProgrammedDistributionsResponse_ClearVersionOneOfCase(GetTokenPreProgrammedDistributionsResponse *message); + +#pragma mark - GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 + +typedef GPB_ENUM(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_FieldNumber) { + GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_FieldNumber_TokenDistributions = 1, + GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_FieldNumber_Proof = 2, + GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_Result_OneOfCase) { + GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_Result_OneOfCase_TokenDistributions = 1, + GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_Result_OneOfCase resultOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions *tokenDistributions; + +@property(nonatomic, readwrite, strong, null_resettable) Proof *proof; + +@property(nonatomic, readwrite, strong, null_resettable) ResponseMetadata *metadata; +/** Test to see if @c metadata has been set. */ +@property(nonatomic, readwrite) BOOL hasMetadata; + +@end + +/** + * Clears whatever value was set for the oneof 'result'. + **/ +void GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_ClearResultOneOfCase(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 *message); + +#pragma mark - GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry + +typedef GPB_ENUM(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry_FieldNumber) { + GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry_FieldNumber_RecipientId = 1, + GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry_FieldNumber_Amount = 2, +}; + +GPB_FINAL @interface GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *recipientId; + +@property(nonatomic, readwrite) uint64_t amount; + +@end + +#pragma mark - GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry + +typedef GPB_ENUM(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry_FieldNumber) { + GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry_FieldNumber_Timestamp = 1, + GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry_FieldNumber_DistributionsArray = 2, +}; + +GPB_FINAL @interface GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry : GPBMessage + +@property(nonatomic, readwrite) uint64_t timestamp; + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *distributionsArray; +/** The number of items in @c distributionsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger distributionsArray_Count; + +@end + +#pragma mark - GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions + +typedef GPB_ENUM(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions_FieldNumber) { + GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions_FieldNumber_TokenDistributionsArray = 1, +}; + +GPB_FINAL @interface GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *tokenDistributionsArray; +/** The number of items in @c tokenDistributionsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger tokenDistributionsArray_Count; + +@end + #pragma mark - GetTokenTotalSupplyRequest typedef GPB_ENUM(GetTokenTotalSupplyRequest_FieldNumber) { diff --git a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.m b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.m index 2847d30bb6a..f9375f49869 100644 --- a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.m +++ b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.m @@ -265,6 +265,14 @@ GPBObjCClassDeclaration(GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive); GPBObjCClassDeclaration(GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash); GPBObjCClassDeclaration(GetStatusResponse_GetStatusResponseV0_Version_Software); +GPBObjCClassDeclaration(GetTokenPreProgrammedDistributionsRequest); +GPBObjCClassDeclaration(GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0); +GPBObjCClassDeclaration(GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo); +GPBObjCClassDeclaration(GetTokenPreProgrammedDistributionsResponse); +GPBObjCClassDeclaration(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0); +GPBObjCClassDeclaration(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry); +GPBObjCClassDeclaration(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions); +GPBObjCClassDeclaration(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry); GPBObjCClassDeclaration(GetTokenStatusesRequest); GPBObjCClassDeclaration(GetTokenStatusesRequest_GetTokenStatusesRequestV0); GPBObjCClassDeclaration(GetTokenStatusesResponse); @@ -15001,6 +15009,505 @@ + (GPBDescriptor *)descriptor { @end +#pragma mark - GetTokenPreProgrammedDistributionsRequest + +@implementation GetTokenPreProgrammedDistributionsRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetTokenPreProgrammedDistributionsRequest__storage_ { + uint32_t _has_storage_[2]; + GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 *v0; +} GetTokenPreProgrammedDistributionsRequest__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "v0", + .dataTypeSpecific.clazz = GPBObjCClass(GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0), + .number = GetTokenPreProgrammedDistributionsRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenPreProgrammedDistributionsRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenPreProgrammedDistributionsRequest__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "version", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetTokenPreProgrammedDistributionsRequest_ClearVersionOneOfCase(GetTokenPreProgrammedDistributionsRequest *message) { + GPBDescriptor *descriptor = [GetTokenPreProgrammedDistributionsRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 + +@implementation GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 + +@dynamic tokenId; +@dynamic hasStartAtInfo, startAtInfo; +@dynamic hasLimit, limit; +@dynamic prove; + +typedef struct GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0__storage_ { + uint32_t _has_storage_[1]; + uint32_t limit; + NSData *tokenId; + GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo *startAtInfo; +} GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "tokenId", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_FieldNumber_TokenId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0__storage_, tokenId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "startAtInfo", + .dataTypeSpecific.clazz = GPBObjCClass(GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo), + .number = GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_FieldNumber_StartAtInfo, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0__storage_, startAtInfo), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "limit", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_FieldNumber_Limit, + .hasIndex = 2, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0__storage_, limit), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeUInt32, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_FieldNumber_Prove, + .hasIndex = 3, + .offset = 4, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetTokenPreProgrammedDistributionsRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo + +@implementation GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo + +@dynamic startTimeMs; +@dynamic hasStartRecipient, startRecipient; +@dynamic hasStartRecipientIncluded, startRecipientIncluded; + +typedef struct GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo__storage_ { + uint32_t _has_storage_[1]; + NSData *startRecipient; + uint64_t startTimeMs; +} GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "startTimeMs", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo_FieldNumber_StartTimeMs, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo__storage_, startTimeMs), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + { + .name = "startRecipient", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo_FieldNumber_StartRecipient, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo__storage_, startRecipient), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBytes, + }, + { + .name = "startRecipientIncluded", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo_FieldNumber_StartRecipientIncluded, + .hasIndex = 2, + .offset = 3, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetTokenPreProgrammedDistributionsResponse + +@implementation GetTokenPreProgrammedDistributionsResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetTokenPreProgrammedDistributionsResponse__storage_ { + uint32_t _has_storage_[2]; + GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 *v0; +} GetTokenPreProgrammedDistributionsResponse__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "v0", + .dataTypeSpecific.clazz = GPBObjCClass(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0), + .number = GetTokenPreProgrammedDistributionsResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenPreProgrammedDistributionsResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenPreProgrammedDistributionsResponse__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "version", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetTokenPreProgrammedDistributionsResponse_ClearVersionOneOfCase(GetTokenPreProgrammedDistributionsResponse *message) { + GPBDescriptor *descriptor = [GetTokenPreProgrammedDistributionsResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 + +@implementation GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 + +@dynamic resultOneOfCase; +@dynamic tokenDistributions; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0__storage_ { + uint32_t _has_storage_[2]; + GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions *tokenDistributions; + Proof *proof; + ResponseMetadata *metadata; +} GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "tokenDistributions", + .dataTypeSpecific.clazz = GPBObjCClass(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions), + .number = GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_FieldNumber_TokenDistributions, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0__storage_, tokenDistributions), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "result", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetTokenPreProgrammedDistributionsResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_ClearResultOneOfCase(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 *message) { + GPBDescriptor *descriptor = [GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry + +@implementation GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry + +@dynamic recipientId; +@dynamic amount; + +typedef struct GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry__storage_ { + uint32_t _has_storage_[1]; + NSData *recipientId; + uint64_t amount; +} GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "recipientId", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry_FieldNumber_RecipientId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry__storage_, recipientId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "amount", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry_FieldNumber_Amount, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry__storage_, amount), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry + +@implementation GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry + +@dynamic timestamp; +@dynamic distributionsArray, distributionsArray_Count; + +typedef struct GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *distributionsArray; + uint64_t timestamp; +} GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "timestamp", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry_FieldNumber_Timestamp, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry__storage_, timestamp), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + { + .name = "distributionsArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry), + .number = GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry_FieldNumber_DistributionsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry__storage_, distributionsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions + +@implementation GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions + +@dynamic tokenDistributionsArray, tokenDistributionsArray_Count; + +typedef struct GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *tokenDistributionsArray; +} GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "tokenDistributionsArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry), + .number = GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions_FieldNumber_TokenDistributionsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions__storage_, tokenDistributionsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + #pragma mark - GetTokenTotalSupplyRequest @implementation GetTokenTotalSupplyRequest diff --git a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.h b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.h index 028477d0758..daff9fedb43 100644 --- a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.h +++ b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.h @@ -87,6 +87,8 @@ @class GetProtocolVersionUpgradeVoteStatusResponse; @class GetStatusRequest; @class GetStatusResponse; +@class GetTokenPreProgrammedDistributionsRequest; +@class GetTokenPreProgrammedDistributionsResponse; @class GetTokenStatusesRequest; @class GetTokenStatusesResponse; @class GetTokenTotalSupplyRequest; @@ -290,6 +292,10 @@ NS_ASSUME_NONNULL_BEGIN - (GRPCUnaryProtoCall *)getTokenStatusesWithMessage:(GetTokenStatusesRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; +#pragma mark getTokenPreProgrammedDistributions(GetTokenPreProgrammedDistributionsRequest) returns (GetTokenPreProgrammedDistributionsResponse) + +- (GRPCUnaryProtoCall *)getTokenPreProgrammedDistributionsWithMessage:(GetTokenPreProgrammedDistributionsRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + #pragma mark getTokenTotalSupply(GetTokenTotalSupplyRequest) returns (GetTokenTotalSupplyResponse) - (GRPCUnaryProtoCall *)getTokenTotalSupplyWithMessage:(GetTokenTotalSupplyRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; @@ -627,6 +633,13 @@ NS_ASSUME_NONNULL_BEGIN - (GRPCProtoCall *)RPCTogetTokenStatusesWithRequest:(GetTokenStatusesRequest *)request handler:(void(^)(GetTokenStatusesResponse *_Nullable response, NSError *_Nullable error))handler; +#pragma mark getTokenPreProgrammedDistributions(GetTokenPreProgrammedDistributionsRequest) returns (GetTokenPreProgrammedDistributionsResponse) + +- (void)getTokenPreProgrammedDistributionsWithRequest:(GetTokenPreProgrammedDistributionsRequest *)request handler:(void(^)(GetTokenPreProgrammedDistributionsResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetTokenPreProgrammedDistributionsWithRequest:(GetTokenPreProgrammedDistributionsRequest *)request handler:(void(^)(GetTokenPreProgrammedDistributionsResponse *_Nullable response, NSError *_Nullable error))handler; + + #pragma mark getTokenTotalSupply(GetTokenTotalSupplyRequest) returns (GetTokenTotalSupplyResponse) - (void)getTokenTotalSupplyWithRequest:(GetTokenTotalSupplyRequest *)request handler:(void(^)(GetTokenTotalSupplyResponse *_Nullable response, NSError *_Nullable error))handler; diff --git a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.m b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.m index c2fa7b1a50a..9f91540f655 100644 --- a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.m +++ b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.m @@ -875,6 +875,26 @@ - (GRPCUnaryProtoCall *)getTokenStatusesWithMessage:(GetTokenStatusesRequest *)m responseClass:[GetTokenStatusesResponse class]]; } +#pragma mark getTokenPreProgrammedDistributions(GetTokenPreProgrammedDistributionsRequest) returns (GetTokenPreProgrammedDistributionsResponse) + +- (void)getTokenPreProgrammedDistributionsWithRequest:(GetTokenPreProgrammedDistributionsRequest *)request handler:(void(^)(GetTokenPreProgrammedDistributionsResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetTokenPreProgrammedDistributionsWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetTokenPreProgrammedDistributionsWithRequest:(GetTokenPreProgrammedDistributionsRequest *)request handler:(void(^)(GetTokenPreProgrammedDistributionsResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getTokenPreProgrammedDistributions" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetTokenPreProgrammedDistributionsResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getTokenPreProgrammedDistributionsWithMessage:(GetTokenPreProgrammedDistributionsRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getTokenPreProgrammedDistributions" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetTokenPreProgrammedDistributionsResponse class]]; +} + #pragma mark getTokenTotalSupply(GetTokenTotalSupplyRequest) returns (GetTokenTotalSupplyResponse) - (void)getTokenTotalSupplyWithRequest:(GetTokenTotalSupplyRequest *)request handler:(void(^)(GetTokenTotalSupplyResponse *_Nullable response, NSError *_Nullable error))handler{ diff --git a/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py b/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py index 886406191d3..47529254fdb 100644 --- a/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py +++ b/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py @@ -23,7 +23,7 @@ syntax='proto3', serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x0eplatform.proto\x12\x19org.dash.platform.dapi.v0\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x01\n\x05Proof\x12\x15\n\rgrovedb_proof\x18\x01 \x01(\x0c\x12\x13\n\x0bquorum_hash\x18\x02 \x01(\x0c\x12\x11\n\tsignature\x18\x03 \x01(\x0c\x12\r\n\x05round\x18\x04 \x01(\r\x12\x15\n\rblock_id_hash\x18\x05 \x01(\x0c\x12\x13\n\x0bquorum_type\x18\x06 \x01(\r\"\x90\x01\n\x10ResponseMetadata\x12\x0e\n\x06height\x18\x01 \x01(\x04\x12 \n\x18\x63ore_chain_locked_height\x18\x02 \x01(\r\x12\r\n\x05\x65poch\x18\x03 \x01(\r\x12\x0f\n\x07time_ms\x18\x04 \x01(\x04\x12\x18\n\x10protocol_version\x18\x05 \x01(\r\x12\x10\n\x08\x63hain_id\x18\x06 \x01(\t\"L\n\x1dStateTransitionBroadcastError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\";\n\x1f\x42roadcastStateTransitionRequest\x12\x18\n\x10state_transition\x18\x01 \x01(\x0c\"\"\n BroadcastStateTransitionResponse\"\xa4\x01\n\x12GetIdentityRequest\x12P\n\x02v0\x18\x01 \x01(\x0b\x32\x42.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0H\x00\x1a\x31\n\x14GetIdentityRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xc1\x01\n\x17GetIdentityNonceRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0H\x00\x1a?\n\x19GetIdentityNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf6\x01\n\x1fGetIdentityContractNonceRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0H\x00\x1a\\\n!GetIdentityContractNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xc0\x01\n\x19GetIdentityBalanceRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0H\x00\x1a\x38\n\x1bGetIdentityBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xec\x01\n$GetIdentityBalanceAndRevisionRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0H\x00\x1a\x43\n&GetIdentityBalanceAndRevisionRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9e\x02\n\x13GetIdentityResponse\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0H\x00\x1a\xa7\x01\n\x15GetIdentityResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb8\x02\n\x18GetIdentityNonceResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0H\x00\x1a\xb2\x01\n\x1aGetIdentityNonceResponseV0\x12\x18\n\x0eidentity_nonce\x18\x01 \x01(\x04H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xe1\x02\n GetIdentityContractNonceResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0H\x00\x1a\xc3\x01\n\"GetIdentityContractNonceResponseV0\x12!\n\x17identity_contract_nonce\x18\x01 \x01(\x04H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb9\x02\n\x1aGetIdentityBalanceResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0H\x00\x1a\xad\x01\n\x1cGetIdentityBalanceResponseV0\x12\x11\n\x07\x62\x61lance\x18\x01 \x01(\x04H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xa9\x04\n%GetIdentityBalanceAndRevisionResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0H\x00\x1a\xfc\x02\n\'GetIdentityBalanceAndRevisionResponseV0\x12\x9b\x01\n\x14\x62\x61lance_and_revision\x18\x01 \x01(\x0b\x32{.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevisionH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x37\n\x12\x42\x61lanceAndRevision\x12\x0f\n\x07\x62\x61lance\x18\x01 \x01(\x04\x12\x10\n\x08revision\x18\x02 \x01(\x04\x42\x08\n\x06resultB\t\n\x07version\"\xd1\x01\n\x0eKeyRequestType\x12\x36\n\x08\x61ll_keys\x18\x01 \x01(\x0b\x32\".org.dash.platform.dapi.v0.AllKeysH\x00\x12@\n\rspecific_keys\x18\x02 \x01(\x0b\x32\'.org.dash.platform.dapi.v0.SpecificKeysH\x00\x12:\n\nsearch_key\x18\x03 \x01(\x0b\x32$.org.dash.platform.dapi.v0.SearchKeyH\x00\x42\t\n\x07request\"\t\n\x07\x41llKeys\"\x1f\n\x0cSpecificKeys\x12\x0f\n\x07key_ids\x18\x01 \x03(\r\"\xb6\x01\n\tSearchKey\x12I\n\x0bpurpose_map\x18\x01 \x03(\x0b\x32\x34.org.dash.platform.dapi.v0.SearchKey.PurposeMapEntry\x1a^\n\x0fPurposeMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.org.dash.platform.dapi.v0.SecurityLevelMap:\x02\x38\x01\"\xbf\x02\n\x10SecurityLevelMap\x12]\n\x12security_level_map\x18\x01 \x03(\x0b\x32\x41.org.dash.platform.dapi.v0.SecurityLevelMap.SecurityLevelMapEntry\x1aw\n\x15SecurityLevelMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12M\n\x05value\x18\x02 \x01(\x0e\x32>.org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType:\x02\x38\x01\"S\n\x12KeyKindRequestType\x12\x1f\n\x1b\x43URRENT_KEY_OF_KIND_REQUEST\x10\x00\x12\x1c\n\x18\x41LL_KEYS_OF_KIND_REQUEST\x10\x01\"\xda\x02\n\x16GetIdentityKeysRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0H\x00\x1a\xda\x01\n\x18GetIdentityKeysRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12?\n\x0crequest_type\x18\x02 \x01(\x0b\x32).org.dash.platform.dapi.v0.KeyRequestType\x12+\n\x05limit\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x04 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\x99\x03\n\x17GetIdentityKeysResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0H\x00\x1a\x96\x02\n\x19GetIdentityKeysResponseV0\x12\x61\n\x04keys\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.KeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1a\n\x04Keys\x12\x12\n\nkeys_bytes\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xef\x02\n GetIdentitiesContractKeysRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0H\x00\x1a\xd1\x01\n\"GetIdentitiesContractKeysRequestV0\x12\x16\n\x0eidentities_ids\x18\x01 \x03(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\x1f\n\x12\x64ocument_type_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x08purposes\x18\x04 \x03(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x15\n\x13_document_type_nameB\t\n\x07version\"\xdf\x06\n!GetIdentitiesContractKeysResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0H\x00\x1a\xbe\x05\n#GetIdentitiesContractKeysResponseV0\x12\x8a\x01\n\x0fidentities_keys\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aY\n\x0bPurposeKeys\x12\x36\n\x07purpose\x18\x01 \x01(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\x12\n\nkeys_bytes\x18\x02 \x03(\x0c\x1a\x9f\x01\n\x0cIdentityKeys\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12z\n\x04keys\x18\x02 \x03(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys\x1a\x90\x01\n\x0eIdentitiesKeys\x12~\n\x07\x65ntries\x18\x01 \x03(\x0b\x32m.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeysB\x08\n\x06resultB\t\n\x07version\"\xa4\x02\n*GetEvonodesProposedEpochBlocksByIdsRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0H\x00\x1ah\n,GetEvonodesProposedEpochBlocksByIdsRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x0b\n\x03ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x08\n\x06_epochB\t\n\x07version\"\x8e\x06\n&GetEvonodesProposedEpochBlocksResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0H\x00\x1a\xde\x04\n(GetEvonodesProposedEpochBlocksResponseV0\x12\xb1\x01\n#evonodes_proposed_block_counts_info\x18\x01 \x01(\x0b\x32\x81\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocksH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a;\n\x15\x45vonodeProposedBlocks\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\r\n\x05\x63ount\x18\x02 \x01(\x04\x1a\xc4\x01\n\x16\x45vonodesProposedBlocks\x12\xa9\x01\n\x1e\x65vonodes_proposed_block_counts\x18\x01 \x03(\x0b\x32\x80\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocksB\x08\n\x06resultB\t\n\x07version\"\xf2\x02\n,GetEvonodesProposedEpochBlocksByRangeRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0H\x00\x1a\xaf\x01\n.GetEvonodesProposedEpochBlocksByRangeRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x02 \x01(\rH\x02\x88\x01\x01\x12\x15\n\x0bstart_after\x18\x03 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x04 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x07\n\x05startB\x08\n\x06_epochB\x08\n\x06_limitB\t\n\x07version\"\xcd\x01\n\x1cGetIdentitiesBalancesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0H\x00\x1a<\n\x1eGetIdentitiesBalancesRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9b\x05\n\x1dGetIdentitiesBalancesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0H\x00\x1a\x86\x04\n\x1fGetIdentitiesBalancesResponseV0\x12\x8a\x01\n\x13identities_balances\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aH\n\x0fIdentityBalance\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x8f\x01\n\x12IdentitiesBalances\x12y\n\x07\x65ntries\x18\x01 \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalanceB\x08\n\x06resultB\t\n\x07version\"\xdb\x0f\n\x10GetProofsRequest\x12L\n\x02v0\x18\x01 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0H\x00\x1a\xed\x0e\n\x12GetProofsRequestV0\x12\x62\n\nidentities\x18\x01 \x03(\x0b\x32N.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest\x12\x61\n\tcontracts\x18\x02 \x03(\x0b\x32N.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest\x12\x61\n\tdocuments\x18\x03 \x03(\x0b\x32N.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest\x12_\n\x05votes\x18\x04 \x03(\x0b\x32P.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest\x12{\n\x17identity_token_balances\x18\x05 \x03(\x0b\x32Z.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest\x12u\n\x14identity_token_infos\x18\x06 \x03(\x0b\x32W.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest\x12i\n\x0etoken_statuses\x18\x07 \x03(\x0b\x32Q.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest\x1a\xd5\x02\n\x0f\x44ocumentRequest\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12#\n\x1b\x64ocument_type_keeps_history\x18\x03 \x01(\x08\x12\x13\n\x0b\x64ocument_id\x18\x04 \x01(\x0c\x12\x89\x01\n\x19\x64ocument_contested_status\x18\x05 \x01(\x0e\x32\x66.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus\"P\n\x17\x44ocumentContestedStatus\x12\x11\n\rNOT_CONTESTED\x10\x00\x12\x13\n\x0fMAYBE_CONTESTED\x10\x01\x12\r\n\tCONTESTED\x10\x02\x1a\xd1\x01\n\x0fIdentityRequest\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12i\n\x0crequest_type\x18\x02 \x01(\x0e\x32S.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type\">\n\x04Type\x12\x11\n\rFULL_IDENTITY\x10\x00\x12\x0b\n\x07\x42\x41LANCE\x10\x01\x12\x08\n\x04KEYS\x10\x02\x12\x0c\n\x08REVISION\x10\x03\x1a&\n\x0f\x43ontractRequest\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x1a\xe7\x02\n\x11VoteStatusRequest\x12\xa5\x01\n&contested_resource_vote_status_request\x18\x01 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequestH\x00\x1a\x99\x01\n\"ContestedResourceVoteStatusRequest\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x18\n\x10voter_identifier\x18\x05 \x01(\x0c\x42\x0e\n\x0crequest_type\x1a\x44\n\x1bIdentityTokenBalanceRequest\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x0bidentity_id\x18\x02 \x01(\x0c\x1a\x41\n\x18IdentityTokenInfoRequest\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x0bidentity_id\x18\x02 \x01(\x0c\x1a&\n\x12TokenStatusRequest\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x42\t\n\x07version\"\x82\x02\n\x11GetProofsResponse\x12N\n\x02v0\x18\x01 \x01(\x0b\x32@.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0H\x00\x1a\x91\x01\n\x13GetProofsResponseV0\x12\x31\n\x05proof\x18\x01 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x02 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb4\x01\n\x16GetDataContractRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0H\x00\x1a\x35\n\x18GetDataContractRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xb3\x02\n\x17GetDataContractResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0H\x00\x1a\xb0\x01\n\x19GetDataContractResponseV0\x12\x17\n\rdata_contract\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb9\x01\n\x17GetDataContractsRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0H\x00\x1a\x37\n\x19GetDataContractsRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xcf\x04\n\x18GetDataContractsResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0H\x00\x1a[\n\x11\x44\x61taContractEntry\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x32\n\rdata_contract\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x1au\n\rDataContracts\x12\x64\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32\x45.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry\x1a\xf5\x01\n\x1aGetDataContractsResponseV0\x12[\n\x0e\x64\x61ta_contracts\x18\x01 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc1\x02\n\x1dGetDataContractHistoryRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0H\x00\x1a\xac\x01\n\x1fGetDataContractHistoryRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x13\n\x0bstart_at_ms\x18\x04 \x01(\x04\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xae\x05\n\x1eGetDataContractHistoryResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0H\x00\x1a\x96\x04\n GetDataContractHistoryResponseV0\x12\x8f\x01\n\x15\x64\x61ta_contract_history\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x37\n\x18\x44\x61taContractHistoryEntry\x12\x0c\n\x04\x64\x61te\x18\x01 \x01(\x04\x12\r\n\x05value\x18\x02 \x01(\x0c\x1a\xaa\x01\n\x13\x44\x61taContractHistory\x12\x92\x01\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32s.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntryB\x08\n\x06resultB\t\n\x07version\"\xb2\x02\n\x13GetDocumentsRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0H\x00\x1a\xbb\x01\n\x15GetDocumentsRequestV0\x12\x18\n\x10\x64\x61ta_contract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12\r\n\x05where\x18\x03 \x01(\x0c\x12\x10\n\x08order_by\x18\x04 \x01(\x0c\x12\r\n\x05limit\x18\x05 \x01(\r\x12\x15\n\x0bstart_after\x18\x06 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x07 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x08 \x01(\x08\x42\x07\n\x05startB\t\n\x07version\"\x95\x03\n\x14GetDocumentsResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0H\x00\x1a\x9b\x02\n\x16GetDocumentsResponseV0\x12\x65\n\tdocuments\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.DocumentsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1e\n\tDocuments\x12\x11\n\tdocuments\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xed\x01\n!GetIdentityByPublicKeyHashRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0H\x00\x1aM\n#GetIdentityByPublicKeyHashRequestV0\x12\x17\n\x0fpublic_key_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xda\x02\n\"GetIdentityByPublicKeyHashResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0H\x00\x1a\xb6\x01\n$GetIdentityByPublicKeyHashResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xfb\x01\n#WaitForStateTransitionResultRequest\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0H\x00\x1aU\n%WaitForStateTransitionResultRequestV0\x12\x1d\n\x15state_transition_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x99\x03\n$WaitForStateTransitionResultResponse\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0H\x00\x1a\xef\x01\n&WaitForStateTransitionResultResponseV0\x12I\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x38.org.dash.platform.dapi.v0.StateTransitionBroadcastErrorH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x19GetConsensusParamsRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0H\x00\x1a<\n\x1bGetConsensusParamsRequestV0\x12\x0e\n\x06height\x18\x01 \x01(\x05\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9c\x04\n\x1aGetConsensusParamsResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0H\x00\x1aP\n\x14\x43onsensusParamsBlock\x12\x11\n\tmax_bytes\x18\x01 \x01(\t\x12\x0f\n\x07max_gas\x18\x02 \x01(\t\x12\x14\n\x0ctime_iota_ms\x18\x03 \x01(\t\x1a\x62\n\x17\x43onsensusParamsEvidence\x12\x1a\n\x12max_age_num_blocks\x18\x01 \x01(\t\x12\x18\n\x10max_age_duration\x18\x02 \x01(\t\x12\x11\n\tmax_bytes\x18\x03 \x01(\t\x1a\xda\x01\n\x1cGetConsensusParamsResponseV0\x12Y\n\x05\x62lock\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock\x12_\n\x08\x65vidence\x18\x02 \x01(\x0b\x32M.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidenceB\t\n\x07version\"\xe4\x01\n%GetProtocolVersionUpgradeStateRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0H\x00\x1a\x38\n\'GetProtocolVersionUpgradeStateRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xb5\x05\n&GetProtocolVersionUpgradeStateResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0H\x00\x1a\x85\x04\n(GetProtocolVersionUpgradeStateResponseV0\x12\x87\x01\n\x08versions\x18\x01 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x96\x01\n\x08Versions\x12\x89\x01\n\x08versions\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry\x1a:\n\x0cVersionEntry\x12\x16\n\x0eversion_number\x18\x01 \x01(\r\x12\x12\n\nvote_count\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xa3\x02\n*GetProtocolVersionUpgradeVoteStatusRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0H\x00\x1ag\n,GetProtocolVersionUpgradeVoteStatusRequestV0\x12\x19\n\x11start_pro_tx_hash\x18\x01 \x01(\x0c\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xef\x05\n+GetProtocolVersionUpgradeVoteStatusResponse\x12\x82\x01\n\x02v0\x18\x01 \x01(\x0b\x32t.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0H\x00\x1a\xaf\x04\n-GetProtocolVersionUpgradeVoteStatusResponseV0\x12\x98\x01\n\x08versions\x18\x01 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignalsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xaf\x01\n\x0eVersionSignals\x12\x9c\x01\n\x0fversion_signals\x18\x01 \x03(\x0b\x32\x82\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal\x1a\x35\n\rVersionSignal\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07version\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xf5\x01\n\x14GetEpochsInfoRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0H\x00\x1a|\n\x16GetEpochsInfoRequestV0\x12\x31\n\x0bstart_epoch\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\x11\n\tascending\x18\x03 \x01(\x08\x12\r\n\x05prove\x18\x04 \x01(\x08\x42\t\n\x07version\"\x91\x05\n\x15GetEpochsInfoResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0H\x00\x1a\x94\x04\n\x17GetEpochsInfoResponseV0\x12\x65\n\x06\x65pochs\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1au\n\nEpochInfos\x12g\n\x0b\x65poch_infos\x18\x01 \x03(\x0b\x32R.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo\x1a\x9e\x01\n\tEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1a\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x12\n\nstart_time\x18\x04 \x01(\x04\x12\x16\n\x0e\x66\x65\x65_multiplier\x18\x05 \x01(\x01\x12\x18\n\x10protocol_version\x18\x06 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xde\x04\n\x1cGetContestedResourcesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0H\x00\x1a\xcc\x03\n\x1eGetContestedResourcesRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x1a\n\x12start_index_values\x18\x04 \x03(\x0c\x12\x18\n\x10\x65nd_index_values\x18\x05 \x03(\x0c\x12\x89\x01\n\x13start_at_value_info\x18\x06 \x01(\x0b\x32g.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1a\x45\n\x10StartAtValueInfo\x12\x13\n\x0bstart_value\x18\x01 \x01(\x0c\x12\x1c\n\x14start_value_included\x18\x02 \x01(\x08\x42\x16\n\x14_start_at_value_infoB\x08\n\x06_countB\t\n\x07version\"\x88\x04\n\x1dGetContestedResourcesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0H\x00\x1a\xf3\x02\n\x1fGetContestedResourcesResponseV0\x12\x95\x01\n\x19\x63ontested_resource_values\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValuesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a<\n\x17\x43ontestedResourceValues\x12!\n\x19\x63ontested_resource_values\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xca\x05\n\x1cGetVotePollsByEndDateRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0H\x00\x1a\xb8\x04\n\x1eGetVotePollsByEndDateRequestV0\x12\x84\x01\n\x0fstart_time_info\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfoH\x00\x88\x01\x01\x12\x80\x01\n\rend_time_info\x18\x02 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfoH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x13\n\x06offset\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x11\n\tascending\x18\x05 \x01(\x08\x12\r\n\x05prove\x18\x06 \x01(\x08\x1a\x45\n\x0fStartAtTimeInfo\x12\x15\n\rstart_time_ms\x18\x01 \x01(\x04\x12\x1b\n\x13start_time_included\x18\x02 \x01(\x08\x1a?\n\rEndAtTimeInfo\x12\x13\n\x0b\x65nd_time_ms\x18\x01 \x01(\x04\x12\x19\n\x11\x65nd_time_included\x18\x02 \x01(\x08\x42\x12\n\x10_start_time_infoB\x10\n\x0e_end_time_infoB\x08\n\x06_limitB\t\n\x07_offsetB\t\n\x07version\"\xff\x05\n\x1dGetVotePollsByEndDateResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0H\x00\x1a\xea\x04\n\x1fGetVotePollsByEndDateResponseV0\x12\x9c\x01\n\x18vote_polls_by_timestamps\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestampsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aR\n\x1eSerializedVotePollsByTimestamp\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12\x1d\n\x15serialized_vote_polls\x18\x02 \x03(\x0c\x1a\xd7\x01\n\x1fSerializedVotePollsByTimestamps\x12\x99\x01\n\x18vote_polls_by_timestamps\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xff\x06\n$GetContestedResourceVoteStateRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0H\x00\x1a\xd5\x05\n&GetContestedResourceVoteStateRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x86\x01\n\x0bresult_type\x18\x05 \x01(\x0e\x32q.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType\x12\x36\n.allow_include_locked_and_abstaining_vote_tally\x18\x06 \x01(\x08\x12\xa3\x01\n\x18start_at_identifier_info\x18\x07 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x08 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\"I\n\nResultType\x12\r\n\tDOCUMENTS\x10\x00\x12\x0e\n\nVOTE_TALLY\x10\x01\x12\x1c\n\x18\x44OCUMENTS_AND_VOTE_TALLY\x10\x02\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\x8c\x0c\n%GetContestedResourceVoteStateResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0H\x00\x1a\xdf\n\n\'GetContestedResourceVoteStateResponseV0\x12\xae\x01\n\x1d\x63ontested_resource_contenders\x18\x01 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContendersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xd2\x03\n\x10\x46inishedVoteInfo\x12\xad\x01\n\x15\x66inished_vote_outcome\x18\x01 \x01(\x0e\x32\x8d\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome\x12\x1f\n\x12won_by_identity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12 \n\x18\x66inished_at_block_height\x18\x03 \x01(\x04\x12%\n\x1d\x66inished_at_core_block_height\x18\x04 \x01(\r\x12!\n\x19\x66inished_at_block_time_ms\x18\x05 \x01(\x04\x12\x19\n\x11\x66inished_at_epoch\x18\x06 \x01(\r\"O\n\x13\x46inishedVoteOutcome\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\n\n\x06LOCKED\x10\x01\x12\x16\n\x12NO_PREVIOUS_WINNER\x10\x02\x42\x15\n\x13_won_by_identity_id\x1a\xc4\x03\n\x1b\x43ontestedResourceContenders\x12\x86\x01\n\ncontenders\x18\x01 \x03(\x0b\x32r.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender\x12\x1f\n\x12\x61\x62stain_vote_tally\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1c\n\x0flock_vote_tally\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x9a\x01\n\x12\x66inished_vote_info\x18\x04 \x01(\x0b\x32y.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfoH\x02\x88\x01\x01\x42\x15\n\x13_abstain_vote_tallyB\x12\n\x10_lock_vote_tallyB\x15\n\x13_finished_vote_info\x1ak\n\tContender\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x17\n\nvote_count\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x15\n\x08\x64ocument\x18\x03 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_vote_countB\x0b\n\t_documentB\x08\n\x06resultB\t\n\x07version\"\xd5\x05\n,GetContestedResourceVotersForIdentityRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0H\x00\x1a\x92\x04\n.GetContestedResourceVotersForIdentityRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x15\n\rcontestant_id\x18\x05 \x01(\x0c\x12\xb4\x01\n\x18start_at_identifier_info\x18\x06 \x01(\x0b\x32\x8c\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\xf1\x04\n-GetContestedResourceVotersForIdentityResponse\x12\x86\x01\n\x02v0\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0H\x00\x1a\xab\x03\n/GetContestedResourceVotersForIdentityResponseV0\x12\xb6\x01\n\x19\x63ontested_resource_voters\x18\x01 \x01(\x0b\x32\x90\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVotersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x43\n\x17\x43ontestedResourceVoters\x12\x0e\n\x06voters\x18\x01 \x03(\x0c\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xad\x05\n(GetContestedResourceIdentityVotesRequest\x12|\n\x02v0\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0H\x00\x1a\xf7\x03\n*GetContestedResourceIdentityVotesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x17\n\x0forder_ascending\x18\x04 \x01(\x08\x12\xae\x01\n\x1astart_at_vote_poll_id_info\x18\x05 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfoH\x00\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x1a\x61\n\x15StartAtVotePollIdInfo\x12 \n\x18start_at_poll_identifier\x18\x01 \x01(\x0c\x12&\n\x1estart_poll_identifier_included\x18\x02 \x01(\x08\x42\x1d\n\x1b_start_at_vote_poll_id_infoB\t\n\x07version\"\xc8\n\n)GetContestedResourceIdentityVotesResponse\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0H\x00\x1a\x8f\t\n+GetContestedResourceIdentityVotesResponseV0\x12\xa1\x01\n\x05votes\x18\x01 \x01(\x0b\x32\x8f\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xf7\x01\n\x1e\x43ontestedResourceIdentityVotes\x12\xba\x01\n!contested_resource_identity_votes\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x1a\xad\x02\n\x12ResourceVoteChoice\x12\xad\x01\n\x10vote_choice_type\x18\x01 \x01(\x0e\x32\x92\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType\x12\x18\n\x0bidentity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\"=\n\x0eVoteChoiceType\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\x0b\n\x07\x41\x42STAIN\x10\x01\x12\x08\n\x04LOCK\x10\x02\x42\x0e\n\x0c_identity_id\x1a\x95\x02\n\x1d\x43ontestedResourceIdentityVote\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\'\n\x1fserialized_index_storage_values\x18\x03 \x03(\x0c\x12\x99\x01\n\x0bvote_choice\x18\x04 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoiceB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n%GetPrefundedSpecializedBalanceRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0H\x00\x1a\x44\n\'GetPrefundedSpecializedBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xe9\x02\n&GetPrefundedSpecializedBalanceResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0H\x00\x1a\xb9\x01\n(GetPrefundedSpecializedBalanceResponseV0\x12\x11\n\x07\x62\x61lance\x18\x01 \x01(\x04H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xd0\x01\n GetTotalCreditsInPlatformRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0H\x00\x1a\x33\n\"GetTotalCreditsInPlatformRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xd5\x02\n!GetTotalCreditsInPlatformResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0H\x00\x1a\xb4\x01\n#GetTotalCreditsInPlatformResponseV0\x12\x11\n\x07\x63redits\x18\x01 \x01(\x04H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x16GetPathElementsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0H\x00\x1a\x45\n\x18GetPathElementsRequestV0\x12\x0c\n\x04path\x18\x01 \x03(\x0c\x12\x0c\n\x04keys\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xa3\x03\n\x17GetPathElementsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0H\x00\x1a\xa0\x02\n\x19GetPathElementsResponseV0\x12i\n\x08\x65lements\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ElementsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1c\n\x08\x45lements\x12\x10\n\x08\x65lements\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\x81\x01\n\x10GetStatusRequest\x12L\n\x02v0\x18\x01 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0H\x00\x1a\x14\n\x12GetStatusRequestV0B\t\n\x07version\"\x9c\x10\n\x11GetStatusResponse\x12N\n\x02v0\x18\x01 \x01(\x0b\x32@.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0H\x00\x1a\xab\x0f\n\x13GetStatusResponseV0\x12Y\n\x07version\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version\x12S\n\x04node\x18\x02 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node\x12U\n\x05\x63hain\x18\x03 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain\x12Y\n\x07network\x18\x04 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network\x12^\n\nstate_sync\x18\x05 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync\x12S\n\x04time\x18\x06 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time\x1a\xee\x04\n\x07Version\x12\x63\n\x08software\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software\x12\x63\n\x08protocol\x18\x02 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol\x1a^\n\x08Software\x12\x0c\n\x04\x64\x61pi\x18\x01 \x01(\t\x12\x12\n\x05\x64rive\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntenderdash\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_driveB\r\n\x0b_tenderdash\x1a\xb8\x02\n\x08Protocol\x12p\n\ntenderdash\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash\x12\x66\n\x05\x64rive\x18\x02 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive\x1a(\n\nTenderdash\x12\x0b\n\x03p2p\x18\x01 \x01(\r\x12\r\n\x05\x62lock\x18\x02 \x01(\r\x1a(\n\x05\x44rive\x12\x0e\n\x06latest\x18\x03 \x01(\r\x12\x0f\n\x07\x63urrent\x18\x04 \x01(\r\x1as\n\x04Time\x12\r\n\x05local\x18\x01 \x01(\x04\x12\x12\n\x05\x62lock\x18\x02 \x01(\x04H\x00\x88\x01\x01\x12\x14\n\x07genesis\x18\x03 \x01(\x04H\x01\x88\x01\x01\x12\x12\n\x05\x65poch\x18\x04 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_blockB\n\n\x08_genesisB\x08\n\x06_epoch\x1a<\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\x18\n\x0bpro_tx_hash\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x0e\n\x0c_pro_tx_hash\x1a\xa7\x02\n\x05\x43hain\x12\x13\n\x0b\x63\x61tching_up\x18\x01 \x01(\x08\x12\x19\n\x11latest_block_hash\x18\x02 \x01(\x0c\x12\x17\n\x0flatest_app_hash\x18\x03 \x01(\x0c\x12\x1b\n\x13latest_block_height\x18\x04 \x01(\x04\x12\x1b\n\x13\x65\x61rliest_block_hash\x18\x05 \x01(\x0c\x12\x19\n\x11\x65\x61rliest_app_hash\x18\x06 \x01(\x0c\x12\x1d\n\x15\x65\x61rliest_block_height\x18\x07 \x01(\x04\x12\x1d\n\x15max_peer_block_height\x18\t \x01(\x04\x12%\n\x18\x63ore_chain_locked_height\x18\n \x01(\rH\x00\x88\x01\x01\x42\x1b\n\x19_core_chain_locked_height\x1a\x43\n\x07Network\x12\x10\n\x08\x63hain_id\x18\x01 \x01(\t\x12\x13\n\x0bpeers_count\x18\x02 \x01(\r\x12\x11\n\tlistening\x18\x03 \x01(\x08\x1a\xe9\x01\n\tStateSync\x12\x19\n\x11total_synced_time\x18\x01 \x01(\x04\x12\x16\n\x0eremaining_time\x18\x02 \x01(\x04\x12\x17\n\x0ftotal_snapshots\x18\x03 \x01(\r\x12\x1e\n\x16\x63hunk_process_avg_time\x18\x04 \x01(\x04\x12\x17\n\x0fsnapshot_height\x18\x05 \x01(\x04\x12\x1d\n\x15snapshot_chunks_count\x18\x06 \x01(\x04\x12\x19\n\x11\x62\x61\x63kfilled_blocks\x18\x07 \x01(\x04\x12\x1d\n\x15\x62\x61\x63kfill_blocks_total\x18\x08 \x01(\x04\x42\t\n\x07version\"\xb1\x01\n\x1cGetCurrentQuorumsInfoRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0H\x00\x1a \n\x1eGetCurrentQuorumsInfoRequestV0B\t\n\x07version\"\xa1\x05\n\x1dGetCurrentQuorumsInfoResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0H\x00\x1a\x46\n\x0bValidatorV0\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07node_ip\x18\x02 \x01(\t\x12\x11\n\tis_banned\x18\x03 \x01(\x08\x1a\xaf\x01\n\x0eValidatorSetV0\x12\x13\n\x0bquorum_hash\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ore_height\x18\x02 \x01(\r\x12U\n\x07members\x18\x03 \x03(\x0b\x32\x44.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0\x12\x1c\n\x14threshold_public_key\x18\x04 \x01(\x0c\x1a\x92\x02\n\x1fGetCurrentQuorumsInfoResponseV0\x12\x15\n\rquorum_hashes\x18\x01 \x03(\x0c\x12\x1b\n\x13\x63urrent_quorum_hash\x18\x02 \x01(\x0c\x12_\n\x0evalidator_sets\x18\x03 \x03(\x0b\x32G.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0\x12\x1b\n\x13last_block_proposer\x18\x04 \x01(\x0c\x12=\n\x08metadata\x18\x05 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xf4\x01\n\x1fGetIdentityTokenBalancesRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0H\x00\x1aZ\n!GetIdentityTokenBalancesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xad\x05\n GetIdentityTokenBalancesResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0H\x00\x1a\x8f\x04\n\"GetIdentityTokenBalancesResponseV0\x12\x86\x01\n\x0etoken_balances\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aG\n\x11TokenBalanceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x9a\x01\n\rTokenBalances\x12\x88\x01\n\x0etoken_balances\x18\x01 \x03(\x0b\x32p.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xfc\x01\n!GetIdentitiesTokenBalancesRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0H\x00\x1a\\\n#GetIdentitiesTokenBalancesRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xf2\x05\n\"GetIdentitiesTokenBalancesResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0H\x00\x1a\xce\x04\n$GetIdentitiesTokenBalancesResponseV0\x12\x9b\x01\n\x17identity_token_balances\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aR\n\x19IdentityTokenBalanceEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\xb7\x01\n\x15IdentityTokenBalances\x12\x9d\x01\n\x17identity_token_balances\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xe8\x01\n\x1cGetIdentityTokenInfosRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0H\x00\x1aW\n\x1eGetIdentityTokenInfosRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\x98\x06\n\x1dGetIdentityTokenInfosResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0H\x00\x1a\x83\x05\n\x1fGetIdentityTokenInfosResponseV0\x12z\n\x0btoken_infos\x18\x01 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb0\x01\n\x0eTokenInfoEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x82\x01\n\x04info\x18\x02 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x8a\x01\n\nTokenInfos\x12|\n\x0btoken_infos\x18\x01 \x03(\x0b\x32g.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n\x1eGetIdentitiesTokenInfosRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0H\x00\x1aY\n GetIdentitiesTokenInfosRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xca\x06\n\x1fGetIdentitiesTokenInfosResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0H\x00\x1a\xaf\x05\n!GetIdentitiesTokenInfosResponseV0\x12\x8f\x01\n\x14identity_token_infos\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb7\x01\n\x0eTokenInfoEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x86\x01\n\x04info\x18\x02 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x97\x01\n\x12IdentityTokenInfos\x12\x80\x01\n\x0btoken_infos\x18\x01 \x03(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbf\x01\n\x17GetTokenStatusesRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0H\x00\x1a=\n\x19GetTokenStatusesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xe7\x04\n\x18GetTokenStatusesResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0H\x00\x1a\xe1\x03\n\x1aGetTokenStatusesResponseV0\x12v\n\x0etoken_statuses\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x44\n\x10TokenStatusEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x06paused\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\t\n\x07_paused\x1a\x88\x01\n\rTokenStatuses\x12w\n\x0etoken_statuses\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntryB\x08\n\x06resultB\t\n\x07version\"\xca\x01\n\x1aGetTokenTotalSupplyRequest\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0H\x00\x1a?\n\x1cGetTokenTotalSupplyRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xaf\x04\n\x1bGetTokenTotalSupplyResponse\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0H\x00\x1a\xa0\x03\n\x1dGetTokenTotalSupplyResponseV0\x12\x88\x01\n\x12token_total_supply\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\x15TokenTotalSupplyEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x30\n(total_aggregated_amount_in_user_accounts\x18\x02 \x01(\x04\x12\x1b\n\x13total_system_amount\x18\x03 \x01(\x04\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x01\n\x13GetGroupInfoRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0H\x00\x1a\\\n\x15GetGroupInfoRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xd4\x05\n\x14GetGroupInfoResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0H\x00\x1a\xda\x04\n\x16GetGroupInfoResponseV0\x12\x66\n\ngroup_info\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x98\x01\n\x0eGroupInfoEntry\x12h\n\x07members\x18\x01 \x03(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x02 \x01(\r\x1a\x8a\x01\n\tGroupInfo\x12n\n\ngroup_info\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntryH\x00\x88\x01\x01\x42\r\n\x0b_group_infoB\x08\n\x06resultB\t\n\x07version\"\xed\x03\n\x14GetGroupInfosRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0H\x00\x1au\n\x1cStartAtGroupContractPosition\x12%\n\x1dstart_group_contract_position\x18\x01 \x01(\r\x12.\n&start_group_contract_position_included\x18\x02 \x01(\x08\x1a\xfc\x01\n\x16GetGroupInfosRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12{\n start_at_group_contract_position\x18\x02 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPositionH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x42#\n!_start_at_group_contract_positionB\x08\n\x06_countB\t\n\x07version\"\xff\x05\n\x15GetGroupInfosResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0H\x00\x1a\x82\x05\n\x17GetGroupInfosResponseV0\x12j\n\x0bgroup_infos\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\xc3\x01\n\x16GroupPositionInfoEntry\x12\x1f\n\x17group_contract_position\x18\x01 \x01(\r\x12j\n\x07members\x18\x02 \x03(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x03 \x01(\r\x1a\x82\x01\n\nGroupInfos\x12t\n\x0bgroup_infos\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbe\x04\n\x16GetGroupActionsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0H\x00\x1aL\n\x0fStartAtActionId\x12\x17\n\x0fstart_action_id\x18\x01 \x01(\x0c\x12 \n\x18start_action_id_included\x18\x02 \x01(\x08\x1a\xc8\x02\n\x18GetGroupActionsRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12N\n\x06status\x18\x03 \x01(\x0e\x32>.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus\x12\x62\n\x12start_at_action_id\x18\x04 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionIdH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x05 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x42\x15\n\x13_start_at_action_idB\x08\n\x06_count\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\xeb\x1d\n\x17GetGroupActionsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0H\x00\x1a\xe8\x1c\n\x19GetGroupActionsResponseV0\x12r\n\rgroup_actions\x18\x01 \x01(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a[\n\tMintEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0crecipient_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x45\n\tBurnEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aJ\n\x0b\x46reezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aL\n\rUnfreezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x66\n\x17\x44\x65stroyFrozenFundsEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x13SharedEncryptedNote\x12\x18\n\x10sender_key_index\x18\x01 \x01(\r\x12\x1b\n\x13recipient_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a{\n\x15PersonalEncryptedNote\x12!\n\x19root_encryption_key_index\x18\x01 \x01(\r\x12\'\n\x1f\x64\x65rivation_encryption_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a\xa7\x03\n\rTransferEvent\x12\x14\n\x0crecipient_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x84\x01\n\x15shared_encrypted_note\x18\x03 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNoteH\x01\x88\x01\x01\x12\x88\x01\n\x17personal_encrypted_note\x18\x04 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNoteH\x02\x88\x01\x01\x12\x0e\n\x06\x61mount\x18\x05 \x01(\x04\x42\x0e\n\x0c_public_noteB\x18\n\x16_shared_encrypted_noteB\x1a\n\x18_personal_encrypted_note\x1a\xe9\x01\n\x14\x45mergencyActionEvent\x12\x81\x01\n\x0b\x61\x63tion_type\x18\x01 \x01(\x0e\x32l.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\"#\n\nActionType\x12\t\n\x05PAUSE\x10\x00\x12\n\n\x06RESUME\x10\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x16TokenConfigUpdateEvent\x12 \n\x18token_config_update_item\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\xfc\x02\n\x10GroupActionEvent\x12n\n\x0btoken_event\x18\x01 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEventH\x00\x12t\n\x0e\x64ocument_event\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEventH\x00\x12t\n\x0e\x63ontract_event\x18\x03 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEventH\x00\x42\x0c\n\nevent_type\x1a\x8b\x01\n\rDocumentEvent\x12r\n\x06\x63reate\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEventH\x00\x42\x06\n\x04type\x1a/\n\x13\x44ocumentCreateEvent\x12\x18\n\x10\x63reated_document\x18\x01 \x01(\x0c\x1a/\n\x13\x43ontractUpdateEvent\x12\x18\n\x10updated_contract\x18\x01 \x01(\x0c\x1a\x8b\x01\n\rContractEvent\x12r\n\x06update\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEventH\x00\x42\x06\n\x04type\x1a\xbb\x07\n\nTokenEvent\x12\x66\n\x04mint\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEventH\x00\x12\x66\n\x04\x62urn\x18\x02 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEventH\x00\x12j\n\x06\x66reeze\x18\x03 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEventH\x00\x12n\n\x08unfreeze\x18\x04 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEventH\x00\x12\x84\x01\n\x14\x64\x65stroy_frozen_funds\x18\x05 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEventH\x00\x12n\n\x08transfer\x18\x06 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEventH\x00\x12}\n\x10\x65mergency_action\x18\x07 \x01(\x0b\x32\x61.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEventH\x00\x12\x82\x01\n\x13token_config_update\x18\x08 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEventH\x00\x42\x06\n\x04type\x1a\x93\x01\n\x10GroupActionEntry\x12\x11\n\taction_id\x18\x01 \x01(\x0c\x12l\n\x05\x65vent\x18\x02 \x01(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent\x1a\x84\x01\n\x0cGroupActions\x12t\n\rgroup_actions\x18\x01 \x03(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntryB\x08\n\x06resultB\t\n\x07version\"\x88\x03\n\x1cGetGroupActionSignersRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0H\x00\x1a\xce\x01\n\x1eGetGroupActionSignersRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12T\n\x06status\x18\x03 \x01(\x0e\x32\x44.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus\x12\x11\n\taction_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\x8b\x05\n\x1dGetGroupActionSignersResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0H\x00\x1a\xf6\x03\n\x1fGetGroupActionSignersResponseV0\x12\x8b\x01\n\x14group_action_signers\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x35\n\x11GroupActionSigner\x12\x11\n\tsigner_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x91\x01\n\x12GroupActionSigners\x12{\n\x07signers\x18\x01 \x03(\x0b\x32j.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignerB\x08\n\x06resultB\t\n\x07version*Z\n\nKeyPurpose\x12\x12\n\x0e\x41UTHENTICATION\x10\x00\x12\x0e\n\nENCRYPTION\x10\x01\x12\x0e\n\nDECRYPTION\x10\x02\x12\x0c\n\x08TRANSFER\x10\x03\x12\n\n\x06VOTING\x10\x05\x32\xe6.\n\x08Platform\x12\x93\x01\n\x18\x62roadcastStateTransition\x12:.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest\x1a;.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse\x12l\n\x0bgetIdentity\x12-.org.dash.platform.dapi.v0.GetIdentityRequest\x1a..org.dash.platform.dapi.v0.GetIdentityResponse\x12x\n\x0fgetIdentityKeys\x12\x31.org.dash.platform.dapi.v0.GetIdentityKeysRequest\x1a\x32.org.dash.platform.dapi.v0.GetIdentityKeysResponse\x12\x96\x01\n\x19getIdentitiesContractKeys\x12;.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest\x1a<.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse\x12{\n\x10getIdentityNonce\x12\x32.org.dash.platform.dapi.v0.GetIdentityNonceRequest\x1a\x33.org.dash.platform.dapi.v0.GetIdentityNonceResponse\x12\x93\x01\n\x18getIdentityContractNonce\x12:.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse\x12\x81\x01\n\x12getIdentityBalance\x12\x34.org.dash.platform.dapi.v0.GetIdentityBalanceRequest\x1a\x35.org.dash.platform.dapi.v0.GetIdentityBalanceResponse\x12\x8a\x01\n\x15getIdentitiesBalances\x12\x37.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse\x12\xa2\x01\n\x1dgetIdentityBalanceAndRevision\x12?.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest\x1a@.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse\x12\xaf\x01\n#getEvonodesProposedEpochBlocksByIds\x12\x45.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12\xb3\x01\n%getEvonodesProposedEpochBlocksByRange\x12G.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12\x66\n\tgetProofs\x12+.org.dash.platform.dapi.v0.GetProofsRequest\x1a,.org.dash.platform.dapi.v0.GetProofsResponse\x12x\n\x0fgetDataContract\x12\x31.org.dash.platform.dapi.v0.GetDataContractRequest\x1a\x32.org.dash.platform.dapi.v0.GetDataContractResponse\x12\x8d\x01\n\x16getDataContractHistory\x12\x38.org.dash.platform.dapi.v0.GetDataContractHistoryRequest\x1a\x39.org.dash.platform.dapi.v0.GetDataContractHistoryResponse\x12{\n\x10getDataContracts\x12\x32.org.dash.platform.dapi.v0.GetDataContractsRequest\x1a\x33.org.dash.platform.dapi.v0.GetDataContractsResponse\x12o\n\x0cgetDocuments\x12..org.dash.platform.dapi.v0.GetDocumentsRequest\x1a/.org.dash.platform.dapi.v0.GetDocumentsResponse\x12\x99\x01\n\x1agetIdentityByPublicKeyHash\x12<.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest\x1a=.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse\x12\x9f\x01\n\x1cwaitForStateTransitionResult\x12>.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest\x1a?.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse\x12\x81\x01\n\x12getConsensusParams\x12\x34.org.dash.platform.dapi.v0.GetConsensusParamsRequest\x1a\x35.org.dash.platform.dapi.v0.GetConsensusParamsResponse\x12\xa5\x01\n\x1egetProtocolVersionUpgradeState\x12@.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest\x1a\x41.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse\x12\xb4\x01\n#getProtocolVersionUpgradeVoteStatus\x12\x45.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest\x1a\x46.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse\x12r\n\rgetEpochsInfo\x12/.org.dash.platform.dapi.v0.GetEpochsInfoRequest\x1a\x30.org.dash.platform.dapi.v0.GetEpochsInfoResponse\x12\x8a\x01\n\x15getContestedResources\x12\x37.org.dash.platform.dapi.v0.GetContestedResourcesRequest\x1a\x38.org.dash.platform.dapi.v0.GetContestedResourcesResponse\x12\xa2\x01\n\x1dgetContestedResourceVoteState\x12?.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest\x1a@.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse\x12\xba\x01\n%getContestedResourceVotersForIdentity\x12G.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest\x1aH.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse\x12\xae\x01\n!getContestedResourceIdentityVotes\x12\x43.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest\x1a\x44.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse\x12\x8a\x01\n\x15getVotePollsByEndDate\x12\x37.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest\x1a\x38.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse\x12\xa5\x01\n\x1egetPrefundedSpecializedBalance\x12@.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest\x1a\x41.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse\x12\x96\x01\n\x19getTotalCreditsInPlatform\x12;.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest\x1a<.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse\x12x\n\x0fgetPathElements\x12\x31.org.dash.platform.dapi.v0.GetPathElementsRequest\x1a\x32.org.dash.platform.dapi.v0.GetPathElementsResponse\x12\x66\n\tgetStatus\x12+.org.dash.platform.dapi.v0.GetStatusRequest\x1a,.org.dash.platform.dapi.v0.GetStatusResponse\x12\x8a\x01\n\x15getCurrentQuorumsInfo\x12\x37.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest\x1a\x38.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse\x12\x93\x01\n\x18getIdentityTokenBalances\x12:.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse\x12\x99\x01\n\x1agetIdentitiesTokenBalances\x12<.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest\x1a=.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse\x12\x8a\x01\n\x15getIdentityTokenInfos\x12\x37.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse\x12\x90\x01\n\x17getIdentitiesTokenInfos\x12\x39.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest\x1a:.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse\x12{\n\x10getTokenStatuses\x12\x32.org.dash.platform.dapi.v0.GetTokenStatusesRequest\x1a\x33.org.dash.platform.dapi.v0.GetTokenStatusesResponse\x12\x84\x01\n\x13getTokenTotalSupply\x12\x35.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest\x1a\x36.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse\x12o\n\x0cgetGroupInfo\x12..org.dash.platform.dapi.v0.GetGroupInfoRequest\x1a/.org.dash.platform.dapi.v0.GetGroupInfoResponse\x12r\n\rgetGroupInfos\x12/.org.dash.platform.dapi.v0.GetGroupInfosRequest\x1a\x30.org.dash.platform.dapi.v0.GetGroupInfosResponse\x12x\n\x0fgetGroupActions\x12\x31.org.dash.platform.dapi.v0.GetGroupActionsRequest\x1a\x32.org.dash.platform.dapi.v0.GetGroupActionsResponse\x12\x8a\x01\n\x15getGroupActionSigners\x12\x37.org.dash.platform.dapi.v0.GetGroupActionSignersRequest\x1a\x38.org.dash.platform.dapi.v0.GetGroupActionSignersResponseb\x06proto3' + serialized_pb=b'\n\x0eplatform.proto\x12\x19org.dash.platform.dapi.v0\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x01\n\x05Proof\x12\x15\n\rgrovedb_proof\x18\x01 \x01(\x0c\x12\x13\n\x0bquorum_hash\x18\x02 \x01(\x0c\x12\x11\n\tsignature\x18\x03 \x01(\x0c\x12\r\n\x05round\x18\x04 \x01(\r\x12\x15\n\rblock_id_hash\x18\x05 \x01(\x0c\x12\x13\n\x0bquorum_type\x18\x06 \x01(\r\"\x90\x01\n\x10ResponseMetadata\x12\x0e\n\x06height\x18\x01 \x01(\x04\x12 \n\x18\x63ore_chain_locked_height\x18\x02 \x01(\r\x12\r\n\x05\x65poch\x18\x03 \x01(\r\x12\x0f\n\x07time_ms\x18\x04 \x01(\x04\x12\x18\n\x10protocol_version\x18\x05 \x01(\r\x12\x10\n\x08\x63hain_id\x18\x06 \x01(\t\"L\n\x1dStateTransitionBroadcastError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\";\n\x1f\x42roadcastStateTransitionRequest\x12\x18\n\x10state_transition\x18\x01 \x01(\x0c\"\"\n BroadcastStateTransitionResponse\"\xa4\x01\n\x12GetIdentityRequest\x12P\n\x02v0\x18\x01 \x01(\x0b\x32\x42.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0H\x00\x1a\x31\n\x14GetIdentityRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xc1\x01\n\x17GetIdentityNonceRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0H\x00\x1a?\n\x19GetIdentityNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf6\x01\n\x1fGetIdentityContractNonceRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0H\x00\x1a\\\n!GetIdentityContractNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xc0\x01\n\x19GetIdentityBalanceRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0H\x00\x1a\x38\n\x1bGetIdentityBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xec\x01\n$GetIdentityBalanceAndRevisionRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0H\x00\x1a\x43\n&GetIdentityBalanceAndRevisionRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9e\x02\n\x13GetIdentityResponse\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0H\x00\x1a\xa7\x01\n\x15GetIdentityResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb8\x02\n\x18GetIdentityNonceResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0H\x00\x1a\xb2\x01\n\x1aGetIdentityNonceResponseV0\x12\x18\n\x0eidentity_nonce\x18\x01 \x01(\x04H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xe1\x02\n GetIdentityContractNonceResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0H\x00\x1a\xc3\x01\n\"GetIdentityContractNonceResponseV0\x12!\n\x17identity_contract_nonce\x18\x01 \x01(\x04H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb9\x02\n\x1aGetIdentityBalanceResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0H\x00\x1a\xad\x01\n\x1cGetIdentityBalanceResponseV0\x12\x11\n\x07\x62\x61lance\x18\x01 \x01(\x04H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xa9\x04\n%GetIdentityBalanceAndRevisionResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0H\x00\x1a\xfc\x02\n\'GetIdentityBalanceAndRevisionResponseV0\x12\x9b\x01\n\x14\x62\x61lance_and_revision\x18\x01 \x01(\x0b\x32{.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevisionH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x37\n\x12\x42\x61lanceAndRevision\x12\x0f\n\x07\x62\x61lance\x18\x01 \x01(\x04\x12\x10\n\x08revision\x18\x02 \x01(\x04\x42\x08\n\x06resultB\t\n\x07version\"\xd1\x01\n\x0eKeyRequestType\x12\x36\n\x08\x61ll_keys\x18\x01 \x01(\x0b\x32\".org.dash.platform.dapi.v0.AllKeysH\x00\x12@\n\rspecific_keys\x18\x02 \x01(\x0b\x32\'.org.dash.platform.dapi.v0.SpecificKeysH\x00\x12:\n\nsearch_key\x18\x03 \x01(\x0b\x32$.org.dash.platform.dapi.v0.SearchKeyH\x00\x42\t\n\x07request\"\t\n\x07\x41llKeys\"\x1f\n\x0cSpecificKeys\x12\x0f\n\x07key_ids\x18\x01 \x03(\r\"\xb6\x01\n\tSearchKey\x12I\n\x0bpurpose_map\x18\x01 \x03(\x0b\x32\x34.org.dash.platform.dapi.v0.SearchKey.PurposeMapEntry\x1a^\n\x0fPurposeMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.org.dash.platform.dapi.v0.SecurityLevelMap:\x02\x38\x01\"\xbf\x02\n\x10SecurityLevelMap\x12]\n\x12security_level_map\x18\x01 \x03(\x0b\x32\x41.org.dash.platform.dapi.v0.SecurityLevelMap.SecurityLevelMapEntry\x1aw\n\x15SecurityLevelMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12M\n\x05value\x18\x02 \x01(\x0e\x32>.org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType:\x02\x38\x01\"S\n\x12KeyKindRequestType\x12\x1f\n\x1b\x43URRENT_KEY_OF_KIND_REQUEST\x10\x00\x12\x1c\n\x18\x41LL_KEYS_OF_KIND_REQUEST\x10\x01\"\xda\x02\n\x16GetIdentityKeysRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0H\x00\x1a\xda\x01\n\x18GetIdentityKeysRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12?\n\x0crequest_type\x18\x02 \x01(\x0b\x32).org.dash.platform.dapi.v0.KeyRequestType\x12+\n\x05limit\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x04 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\x99\x03\n\x17GetIdentityKeysResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0H\x00\x1a\x96\x02\n\x19GetIdentityKeysResponseV0\x12\x61\n\x04keys\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.KeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1a\n\x04Keys\x12\x12\n\nkeys_bytes\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xef\x02\n GetIdentitiesContractKeysRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0H\x00\x1a\xd1\x01\n\"GetIdentitiesContractKeysRequestV0\x12\x16\n\x0eidentities_ids\x18\x01 \x03(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\x1f\n\x12\x64ocument_type_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x08purposes\x18\x04 \x03(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x15\n\x13_document_type_nameB\t\n\x07version\"\xdf\x06\n!GetIdentitiesContractKeysResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0H\x00\x1a\xbe\x05\n#GetIdentitiesContractKeysResponseV0\x12\x8a\x01\n\x0fidentities_keys\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aY\n\x0bPurposeKeys\x12\x36\n\x07purpose\x18\x01 \x01(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\x12\n\nkeys_bytes\x18\x02 \x03(\x0c\x1a\x9f\x01\n\x0cIdentityKeys\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12z\n\x04keys\x18\x02 \x03(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys\x1a\x90\x01\n\x0eIdentitiesKeys\x12~\n\x07\x65ntries\x18\x01 \x03(\x0b\x32m.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeysB\x08\n\x06resultB\t\n\x07version\"\xa4\x02\n*GetEvonodesProposedEpochBlocksByIdsRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0H\x00\x1ah\n,GetEvonodesProposedEpochBlocksByIdsRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x0b\n\x03ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x08\n\x06_epochB\t\n\x07version\"\x8e\x06\n&GetEvonodesProposedEpochBlocksResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0H\x00\x1a\xde\x04\n(GetEvonodesProposedEpochBlocksResponseV0\x12\xb1\x01\n#evonodes_proposed_block_counts_info\x18\x01 \x01(\x0b\x32\x81\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocksH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a;\n\x15\x45vonodeProposedBlocks\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\r\n\x05\x63ount\x18\x02 \x01(\x04\x1a\xc4\x01\n\x16\x45vonodesProposedBlocks\x12\xa9\x01\n\x1e\x65vonodes_proposed_block_counts\x18\x01 \x03(\x0b\x32\x80\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocksB\x08\n\x06resultB\t\n\x07version\"\xf2\x02\n,GetEvonodesProposedEpochBlocksByRangeRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0H\x00\x1a\xaf\x01\n.GetEvonodesProposedEpochBlocksByRangeRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x02 \x01(\rH\x02\x88\x01\x01\x12\x15\n\x0bstart_after\x18\x03 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x04 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x07\n\x05startB\x08\n\x06_epochB\x08\n\x06_limitB\t\n\x07version\"\xcd\x01\n\x1cGetIdentitiesBalancesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0H\x00\x1a<\n\x1eGetIdentitiesBalancesRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9b\x05\n\x1dGetIdentitiesBalancesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0H\x00\x1a\x86\x04\n\x1fGetIdentitiesBalancesResponseV0\x12\x8a\x01\n\x13identities_balances\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aH\n\x0fIdentityBalance\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x8f\x01\n\x12IdentitiesBalances\x12y\n\x07\x65ntries\x18\x01 \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalanceB\x08\n\x06resultB\t\n\x07version\"\xdb\x0f\n\x10GetProofsRequest\x12L\n\x02v0\x18\x01 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0H\x00\x1a\xed\x0e\n\x12GetProofsRequestV0\x12\x62\n\nidentities\x18\x01 \x03(\x0b\x32N.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest\x12\x61\n\tcontracts\x18\x02 \x03(\x0b\x32N.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest\x12\x61\n\tdocuments\x18\x03 \x03(\x0b\x32N.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest\x12_\n\x05votes\x18\x04 \x03(\x0b\x32P.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest\x12{\n\x17identity_token_balances\x18\x05 \x03(\x0b\x32Z.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest\x12u\n\x14identity_token_infos\x18\x06 \x03(\x0b\x32W.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest\x12i\n\x0etoken_statuses\x18\x07 \x03(\x0b\x32Q.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest\x1a\xd5\x02\n\x0f\x44ocumentRequest\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12#\n\x1b\x64ocument_type_keeps_history\x18\x03 \x01(\x08\x12\x13\n\x0b\x64ocument_id\x18\x04 \x01(\x0c\x12\x89\x01\n\x19\x64ocument_contested_status\x18\x05 \x01(\x0e\x32\x66.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus\"P\n\x17\x44ocumentContestedStatus\x12\x11\n\rNOT_CONTESTED\x10\x00\x12\x13\n\x0fMAYBE_CONTESTED\x10\x01\x12\r\n\tCONTESTED\x10\x02\x1a\xd1\x01\n\x0fIdentityRequest\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12i\n\x0crequest_type\x18\x02 \x01(\x0e\x32S.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type\">\n\x04Type\x12\x11\n\rFULL_IDENTITY\x10\x00\x12\x0b\n\x07\x42\x41LANCE\x10\x01\x12\x08\n\x04KEYS\x10\x02\x12\x0c\n\x08REVISION\x10\x03\x1a&\n\x0f\x43ontractRequest\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x1a\xe7\x02\n\x11VoteStatusRequest\x12\xa5\x01\n&contested_resource_vote_status_request\x18\x01 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequestH\x00\x1a\x99\x01\n\"ContestedResourceVoteStatusRequest\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x18\n\x10voter_identifier\x18\x05 \x01(\x0c\x42\x0e\n\x0crequest_type\x1a\x44\n\x1bIdentityTokenBalanceRequest\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x0bidentity_id\x18\x02 \x01(\x0c\x1a\x41\n\x18IdentityTokenInfoRequest\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x0bidentity_id\x18\x02 \x01(\x0c\x1a&\n\x12TokenStatusRequest\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x42\t\n\x07version\"\x82\x02\n\x11GetProofsResponse\x12N\n\x02v0\x18\x01 \x01(\x0b\x32@.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0H\x00\x1a\x91\x01\n\x13GetProofsResponseV0\x12\x31\n\x05proof\x18\x01 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x02 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb4\x01\n\x16GetDataContractRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0H\x00\x1a\x35\n\x18GetDataContractRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xb3\x02\n\x17GetDataContractResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0H\x00\x1a\xb0\x01\n\x19GetDataContractResponseV0\x12\x17\n\rdata_contract\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb9\x01\n\x17GetDataContractsRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0H\x00\x1a\x37\n\x19GetDataContractsRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xcf\x04\n\x18GetDataContractsResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0H\x00\x1a[\n\x11\x44\x61taContractEntry\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x32\n\rdata_contract\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x1au\n\rDataContracts\x12\x64\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32\x45.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry\x1a\xf5\x01\n\x1aGetDataContractsResponseV0\x12[\n\x0e\x64\x61ta_contracts\x18\x01 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc1\x02\n\x1dGetDataContractHistoryRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0H\x00\x1a\xac\x01\n\x1fGetDataContractHistoryRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x13\n\x0bstart_at_ms\x18\x04 \x01(\x04\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xae\x05\n\x1eGetDataContractHistoryResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0H\x00\x1a\x96\x04\n GetDataContractHistoryResponseV0\x12\x8f\x01\n\x15\x64\x61ta_contract_history\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x37\n\x18\x44\x61taContractHistoryEntry\x12\x0c\n\x04\x64\x61te\x18\x01 \x01(\x04\x12\r\n\x05value\x18\x02 \x01(\x0c\x1a\xaa\x01\n\x13\x44\x61taContractHistory\x12\x92\x01\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32s.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntryB\x08\n\x06resultB\t\n\x07version\"\xb2\x02\n\x13GetDocumentsRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0H\x00\x1a\xbb\x01\n\x15GetDocumentsRequestV0\x12\x18\n\x10\x64\x61ta_contract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12\r\n\x05where\x18\x03 \x01(\x0c\x12\x10\n\x08order_by\x18\x04 \x01(\x0c\x12\r\n\x05limit\x18\x05 \x01(\r\x12\x15\n\x0bstart_after\x18\x06 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x07 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x08 \x01(\x08\x42\x07\n\x05startB\t\n\x07version\"\x95\x03\n\x14GetDocumentsResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0H\x00\x1a\x9b\x02\n\x16GetDocumentsResponseV0\x12\x65\n\tdocuments\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.DocumentsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1e\n\tDocuments\x12\x11\n\tdocuments\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xed\x01\n!GetIdentityByPublicKeyHashRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0H\x00\x1aM\n#GetIdentityByPublicKeyHashRequestV0\x12\x17\n\x0fpublic_key_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xda\x02\n\"GetIdentityByPublicKeyHashResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0H\x00\x1a\xb6\x01\n$GetIdentityByPublicKeyHashResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xfb\x01\n#WaitForStateTransitionResultRequest\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0H\x00\x1aU\n%WaitForStateTransitionResultRequestV0\x12\x1d\n\x15state_transition_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x99\x03\n$WaitForStateTransitionResultResponse\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0H\x00\x1a\xef\x01\n&WaitForStateTransitionResultResponseV0\x12I\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x38.org.dash.platform.dapi.v0.StateTransitionBroadcastErrorH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x19GetConsensusParamsRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0H\x00\x1a<\n\x1bGetConsensusParamsRequestV0\x12\x0e\n\x06height\x18\x01 \x01(\x05\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9c\x04\n\x1aGetConsensusParamsResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0H\x00\x1aP\n\x14\x43onsensusParamsBlock\x12\x11\n\tmax_bytes\x18\x01 \x01(\t\x12\x0f\n\x07max_gas\x18\x02 \x01(\t\x12\x14\n\x0ctime_iota_ms\x18\x03 \x01(\t\x1a\x62\n\x17\x43onsensusParamsEvidence\x12\x1a\n\x12max_age_num_blocks\x18\x01 \x01(\t\x12\x18\n\x10max_age_duration\x18\x02 \x01(\t\x12\x11\n\tmax_bytes\x18\x03 \x01(\t\x1a\xda\x01\n\x1cGetConsensusParamsResponseV0\x12Y\n\x05\x62lock\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock\x12_\n\x08\x65vidence\x18\x02 \x01(\x0b\x32M.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidenceB\t\n\x07version\"\xe4\x01\n%GetProtocolVersionUpgradeStateRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0H\x00\x1a\x38\n\'GetProtocolVersionUpgradeStateRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xb5\x05\n&GetProtocolVersionUpgradeStateResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0H\x00\x1a\x85\x04\n(GetProtocolVersionUpgradeStateResponseV0\x12\x87\x01\n\x08versions\x18\x01 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x96\x01\n\x08Versions\x12\x89\x01\n\x08versions\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry\x1a:\n\x0cVersionEntry\x12\x16\n\x0eversion_number\x18\x01 \x01(\r\x12\x12\n\nvote_count\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xa3\x02\n*GetProtocolVersionUpgradeVoteStatusRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0H\x00\x1ag\n,GetProtocolVersionUpgradeVoteStatusRequestV0\x12\x19\n\x11start_pro_tx_hash\x18\x01 \x01(\x0c\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xef\x05\n+GetProtocolVersionUpgradeVoteStatusResponse\x12\x82\x01\n\x02v0\x18\x01 \x01(\x0b\x32t.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0H\x00\x1a\xaf\x04\n-GetProtocolVersionUpgradeVoteStatusResponseV0\x12\x98\x01\n\x08versions\x18\x01 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignalsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xaf\x01\n\x0eVersionSignals\x12\x9c\x01\n\x0fversion_signals\x18\x01 \x03(\x0b\x32\x82\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal\x1a\x35\n\rVersionSignal\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07version\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xf5\x01\n\x14GetEpochsInfoRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0H\x00\x1a|\n\x16GetEpochsInfoRequestV0\x12\x31\n\x0bstart_epoch\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\x11\n\tascending\x18\x03 \x01(\x08\x12\r\n\x05prove\x18\x04 \x01(\x08\x42\t\n\x07version\"\x91\x05\n\x15GetEpochsInfoResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0H\x00\x1a\x94\x04\n\x17GetEpochsInfoResponseV0\x12\x65\n\x06\x65pochs\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1au\n\nEpochInfos\x12g\n\x0b\x65poch_infos\x18\x01 \x03(\x0b\x32R.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo\x1a\x9e\x01\n\tEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1a\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x12\n\nstart_time\x18\x04 \x01(\x04\x12\x16\n\x0e\x66\x65\x65_multiplier\x18\x05 \x01(\x01\x12\x18\n\x10protocol_version\x18\x06 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xde\x04\n\x1cGetContestedResourcesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0H\x00\x1a\xcc\x03\n\x1eGetContestedResourcesRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x1a\n\x12start_index_values\x18\x04 \x03(\x0c\x12\x18\n\x10\x65nd_index_values\x18\x05 \x03(\x0c\x12\x89\x01\n\x13start_at_value_info\x18\x06 \x01(\x0b\x32g.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1a\x45\n\x10StartAtValueInfo\x12\x13\n\x0bstart_value\x18\x01 \x01(\x0c\x12\x1c\n\x14start_value_included\x18\x02 \x01(\x08\x42\x16\n\x14_start_at_value_infoB\x08\n\x06_countB\t\n\x07version\"\x88\x04\n\x1dGetContestedResourcesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0H\x00\x1a\xf3\x02\n\x1fGetContestedResourcesResponseV0\x12\x95\x01\n\x19\x63ontested_resource_values\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValuesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a<\n\x17\x43ontestedResourceValues\x12!\n\x19\x63ontested_resource_values\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xca\x05\n\x1cGetVotePollsByEndDateRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0H\x00\x1a\xb8\x04\n\x1eGetVotePollsByEndDateRequestV0\x12\x84\x01\n\x0fstart_time_info\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfoH\x00\x88\x01\x01\x12\x80\x01\n\rend_time_info\x18\x02 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfoH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x13\n\x06offset\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x11\n\tascending\x18\x05 \x01(\x08\x12\r\n\x05prove\x18\x06 \x01(\x08\x1a\x45\n\x0fStartAtTimeInfo\x12\x15\n\rstart_time_ms\x18\x01 \x01(\x04\x12\x1b\n\x13start_time_included\x18\x02 \x01(\x08\x1a?\n\rEndAtTimeInfo\x12\x13\n\x0b\x65nd_time_ms\x18\x01 \x01(\x04\x12\x19\n\x11\x65nd_time_included\x18\x02 \x01(\x08\x42\x12\n\x10_start_time_infoB\x10\n\x0e_end_time_infoB\x08\n\x06_limitB\t\n\x07_offsetB\t\n\x07version\"\xff\x05\n\x1dGetVotePollsByEndDateResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0H\x00\x1a\xea\x04\n\x1fGetVotePollsByEndDateResponseV0\x12\x9c\x01\n\x18vote_polls_by_timestamps\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestampsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aR\n\x1eSerializedVotePollsByTimestamp\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12\x1d\n\x15serialized_vote_polls\x18\x02 \x03(\x0c\x1a\xd7\x01\n\x1fSerializedVotePollsByTimestamps\x12\x99\x01\n\x18vote_polls_by_timestamps\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xff\x06\n$GetContestedResourceVoteStateRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0H\x00\x1a\xd5\x05\n&GetContestedResourceVoteStateRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x86\x01\n\x0bresult_type\x18\x05 \x01(\x0e\x32q.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType\x12\x36\n.allow_include_locked_and_abstaining_vote_tally\x18\x06 \x01(\x08\x12\xa3\x01\n\x18start_at_identifier_info\x18\x07 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x08 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\"I\n\nResultType\x12\r\n\tDOCUMENTS\x10\x00\x12\x0e\n\nVOTE_TALLY\x10\x01\x12\x1c\n\x18\x44OCUMENTS_AND_VOTE_TALLY\x10\x02\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\x8c\x0c\n%GetContestedResourceVoteStateResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0H\x00\x1a\xdf\n\n\'GetContestedResourceVoteStateResponseV0\x12\xae\x01\n\x1d\x63ontested_resource_contenders\x18\x01 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContendersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xd2\x03\n\x10\x46inishedVoteInfo\x12\xad\x01\n\x15\x66inished_vote_outcome\x18\x01 \x01(\x0e\x32\x8d\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome\x12\x1f\n\x12won_by_identity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12 \n\x18\x66inished_at_block_height\x18\x03 \x01(\x04\x12%\n\x1d\x66inished_at_core_block_height\x18\x04 \x01(\r\x12!\n\x19\x66inished_at_block_time_ms\x18\x05 \x01(\x04\x12\x19\n\x11\x66inished_at_epoch\x18\x06 \x01(\r\"O\n\x13\x46inishedVoteOutcome\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\n\n\x06LOCKED\x10\x01\x12\x16\n\x12NO_PREVIOUS_WINNER\x10\x02\x42\x15\n\x13_won_by_identity_id\x1a\xc4\x03\n\x1b\x43ontestedResourceContenders\x12\x86\x01\n\ncontenders\x18\x01 \x03(\x0b\x32r.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender\x12\x1f\n\x12\x61\x62stain_vote_tally\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1c\n\x0flock_vote_tally\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x9a\x01\n\x12\x66inished_vote_info\x18\x04 \x01(\x0b\x32y.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfoH\x02\x88\x01\x01\x42\x15\n\x13_abstain_vote_tallyB\x12\n\x10_lock_vote_tallyB\x15\n\x13_finished_vote_info\x1ak\n\tContender\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x17\n\nvote_count\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x15\n\x08\x64ocument\x18\x03 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_vote_countB\x0b\n\t_documentB\x08\n\x06resultB\t\n\x07version\"\xd5\x05\n,GetContestedResourceVotersForIdentityRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0H\x00\x1a\x92\x04\n.GetContestedResourceVotersForIdentityRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x15\n\rcontestant_id\x18\x05 \x01(\x0c\x12\xb4\x01\n\x18start_at_identifier_info\x18\x06 \x01(\x0b\x32\x8c\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\xf1\x04\n-GetContestedResourceVotersForIdentityResponse\x12\x86\x01\n\x02v0\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0H\x00\x1a\xab\x03\n/GetContestedResourceVotersForIdentityResponseV0\x12\xb6\x01\n\x19\x63ontested_resource_voters\x18\x01 \x01(\x0b\x32\x90\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVotersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x43\n\x17\x43ontestedResourceVoters\x12\x0e\n\x06voters\x18\x01 \x03(\x0c\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xad\x05\n(GetContestedResourceIdentityVotesRequest\x12|\n\x02v0\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0H\x00\x1a\xf7\x03\n*GetContestedResourceIdentityVotesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x17\n\x0forder_ascending\x18\x04 \x01(\x08\x12\xae\x01\n\x1astart_at_vote_poll_id_info\x18\x05 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfoH\x00\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x1a\x61\n\x15StartAtVotePollIdInfo\x12 \n\x18start_at_poll_identifier\x18\x01 \x01(\x0c\x12&\n\x1estart_poll_identifier_included\x18\x02 \x01(\x08\x42\x1d\n\x1b_start_at_vote_poll_id_infoB\t\n\x07version\"\xc8\n\n)GetContestedResourceIdentityVotesResponse\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0H\x00\x1a\x8f\t\n+GetContestedResourceIdentityVotesResponseV0\x12\xa1\x01\n\x05votes\x18\x01 \x01(\x0b\x32\x8f\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xf7\x01\n\x1e\x43ontestedResourceIdentityVotes\x12\xba\x01\n!contested_resource_identity_votes\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x1a\xad\x02\n\x12ResourceVoteChoice\x12\xad\x01\n\x10vote_choice_type\x18\x01 \x01(\x0e\x32\x92\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType\x12\x18\n\x0bidentity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\"=\n\x0eVoteChoiceType\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\x0b\n\x07\x41\x42STAIN\x10\x01\x12\x08\n\x04LOCK\x10\x02\x42\x0e\n\x0c_identity_id\x1a\x95\x02\n\x1d\x43ontestedResourceIdentityVote\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\'\n\x1fserialized_index_storage_values\x18\x03 \x03(\x0c\x12\x99\x01\n\x0bvote_choice\x18\x04 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoiceB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n%GetPrefundedSpecializedBalanceRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0H\x00\x1a\x44\n\'GetPrefundedSpecializedBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xe9\x02\n&GetPrefundedSpecializedBalanceResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0H\x00\x1a\xb9\x01\n(GetPrefundedSpecializedBalanceResponseV0\x12\x11\n\x07\x62\x61lance\x18\x01 \x01(\x04H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xd0\x01\n GetTotalCreditsInPlatformRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0H\x00\x1a\x33\n\"GetTotalCreditsInPlatformRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xd5\x02\n!GetTotalCreditsInPlatformResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0H\x00\x1a\xb4\x01\n#GetTotalCreditsInPlatformResponseV0\x12\x11\n\x07\x63redits\x18\x01 \x01(\x04H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x16GetPathElementsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0H\x00\x1a\x45\n\x18GetPathElementsRequestV0\x12\x0c\n\x04path\x18\x01 \x03(\x0c\x12\x0c\n\x04keys\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xa3\x03\n\x17GetPathElementsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0H\x00\x1a\xa0\x02\n\x19GetPathElementsResponseV0\x12i\n\x08\x65lements\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ElementsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1c\n\x08\x45lements\x12\x10\n\x08\x65lements\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\x81\x01\n\x10GetStatusRequest\x12L\n\x02v0\x18\x01 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0H\x00\x1a\x14\n\x12GetStatusRequestV0B\t\n\x07version\"\x9c\x10\n\x11GetStatusResponse\x12N\n\x02v0\x18\x01 \x01(\x0b\x32@.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0H\x00\x1a\xab\x0f\n\x13GetStatusResponseV0\x12Y\n\x07version\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version\x12S\n\x04node\x18\x02 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node\x12U\n\x05\x63hain\x18\x03 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain\x12Y\n\x07network\x18\x04 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network\x12^\n\nstate_sync\x18\x05 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync\x12S\n\x04time\x18\x06 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time\x1a\xee\x04\n\x07Version\x12\x63\n\x08software\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software\x12\x63\n\x08protocol\x18\x02 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol\x1a^\n\x08Software\x12\x0c\n\x04\x64\x61pi\x18\x01 \x01(\t\x12\x12\n\x05\x64rive\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntenderdash\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_driveB\r\n\x0b_tenderdash\x1a\xb8\x02\n\x08Protocol\x12p\n\ntenderdash\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash\x12\x66\n\x05\x64rive\x18\x02 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive\x1a(\n\nTenderdash\x12\x0b\n\x03p2p\x18\x01 \x01(\r\x12\r\n\x05\x62lock\x18\x02 \x01(\r\x1a(\n\x05\x44rive\x12\x0e\n\x06latest\x18\x03 \x01(\r\x12\x0f\n\x07\x63urrent\x18\x04 \x01(\r\x1as\n\x04Time\x12\r\n\x05local\x18\x01 \x01(\x04\x12\x12\n\x05\x62lock\x18\x02 \x01(\x04H\x00\x88\x01\x01\x12\x14\n\x07genesis\x18\x03 \x01(\x04H\x01\x88\x01\x01\x12\x12\n\x05\x65poch\x18\x04 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_blockB\n\n\x08_genesisB\x08\n\x06_epoch\x1a<\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\x18\n\x0bpro_tx_hash\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x0e\n\x0c_pro_tx_hash\x1a\xa7\x02\n\x05\x43hain\x12\x13\n\x0b\x63\x61tching_up\x18\x01 \x01(\x08\x12\x19\n\x11latest_block_hash\x18\x02 \x01(\x0c\x12\x17\n\x0flatest_app_hash\x18\x03 \x01(\x0c\x12\x1b\n\x13latest_block_height\x18\x04 \x01(\x04\x12\x1b\n\x13\x65\x61rliest_block_hash\x18\x05 \x01(\x0c\x12\x19\n\x11\x65\x61rliest_app_hash\x18\x06 \x01(\x0c\x12\x1d\n\x15\x65\x61rliest_block_height\x18\x07 \x01(\x04\x12\x1d\n\x15max_peer_block_height\x18\t \x01(\x04\x12%\n\x18\x63ore_chain_locked_height\x18\n \x01(\rH\x00\x88\x01\x01\x42\x1b\n\x19_core_chain_locked_height\x1a\x43\n\x07Network\x12\x10\n\x08\x63hain_id\x18\x01 \x01(\t\x12\x13\n\x0bpeers_count\x18\x02 \x01(\r\x12\x11\n\tlistening\x18\x03 \x01(\x08\x1a\xe9\x01\n\tStateSync\x12\x19\n\x11total_synced_time\x18\x01 \x01(\x04\x12\x16\n\x0eremaining_time\x18\x02 \x01(\x04\x12\x17\n\x0ftotal_snapshots\x18\x03 \x01(\r\x12\x1e\n\x16\x63hunk_process_avg_time\x18\x04 \x01(\x04\x12\x17\n\x0fsnapshot_height\x18\x05 \x01(\x04\x12\x1d\n\x15snapshot_chunks_count\x18\x06 \x01(\x04\x12\x19\n\x11\x62\x61\x63kfilled_blocks\x18\x07 \x01(\x04\x12\x1d\n\x15\x62\x61\x63kfill_blocks_total\x18\x08 \x01(\x04\x42\t\n\x07version\"\xb1\x01\n\x1cGetCurrentQuorumsInfoRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0H\x00\x1a \n\x1eGetCurrentQuorumsInfoRequestV0B\t\n\x07version\"\xa1\x05\n\x1dGetCurrentQuorumsInfoResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0H\x00\x1a\x46\n\x0bValidatorV0\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07node_ip\x18\x02 \x01(\t\x12\x11\n\tis_banned\x18\x03 \x01(\x08\x1a\xaf\x01\n\x0eValidatorSetV0\x12\x13\n\x0bquorum_hash\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ore_height\x18\x02 \x01(\r\x12U\n\x07members\x18\x03 \x03(\x0b\x32\x44.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0\x12\x1c\n\x14threshold_public_key\x18\x04 \x01(\x0c\x1a\x92\x02\n\x1fGetCurrentQuorumsInfoResponseV0\x12\x15\n\rquorum_hashes\x18\x01 \x03(\x0c\x12\x1b\n\x13\x63urrent_quorum_hash\x18\x02 \x01(\x0c\x12_\n\x0evalidator_sets\x18\x03 \x03(\x0b\x32G.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0\x12\x1b\n\x13last_block_proposer\x18\x04 \x01(\x0c\x12=\n\x08metadata\x18\x05 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xf4\x01\n\x1fGetIdentityTokenBalancesRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0H\x00\x1aZ\n!GetIdentityTokenBalancesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xad\x05\n GetIdentityTokenBalancesResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0H\x00\x1a\x8f\x04\n\"GetIdentityTokenBalancesResponseV0\x12\x86\x01\n\x0etoken_balances\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aG\n\x11TokenBalanceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x9a\x01\n\rTokenBalances\x12\x88\x01\n\x0etoken_balances\x18\x01 \x03(\x0b\x32p.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xfc\x01\n!GetIdentitiesTokenBalancesRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0H\x00\x1a\\\n#GetIdentitiesTokenBalancesRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xf2\x05\n\"GetIdentitiesTokenBalancesResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0H\x00\x1a\xce\x04\n$GetIdentitiesTokenBalancesResponseV0\x12\x9b\x01\n\x17identity_token_balances\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aR\n\x19IdentityTokenBalanceEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\xb7\x01\n\x15IdentityTokenBalances\x12\x9d\x01\n\x17identity_token_balances\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xe8\x01\n\x1cGetIdentityTokenInfosRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0H\x00\x1aW\n\x1eGetIdentityTokenInfosRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\x98\x06\n\x1dGetIdentityTokenInfosResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0H\x00\x1a\x83\x05\n\x1fGetIdentityTokenInfosResponseV0\x12z\n\x0btoken_infos\x18\x01 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb0\x01\n\x0eTokenInfoEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x82\x01\n\x04info\x18\x02 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x8a\x01\n\nTokenInfos\x12|\n\x0btoken_infos\x18\x01 \x03(\x0b\x32g.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n\x1eGetIdentitiesTokenInfosRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0H\x00\x1aY\n GetIdentitiesTokenInfosRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xca\x06\n\x1fGetIdentitiesTokenInfosResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0H\x00\x1a\xaf\x05\n!GetIdentitiesTokenInfosResponseV0\x12\x8f\x01\n\x14identity_token_infos\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb7\x01\n\x0eTokenInfoEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x86\x01\n\x04info\x18\x02 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x97\x01\n\x12IdentityTokenInfos\x12\x80\x01\n\x0btoken_infos\x18\x01 \x03(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbf\x01\n\x17GetTokenStatusesRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0H\x00\x1a=\n\x19GetTokenStatusesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xe7\x04\n\x18GetTokenStatusesResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0H\x00\x1a\xe1\x03\n\x1aGetTokenStatusesResponseV0\x12v\n\x0etoken_statuses\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x44\n\x10TokenStatusEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x06paused\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\t\n\x07_paused\x1a\x88\x01\n\rTokenStatuses\x12w\n\x0etoken_statuses\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntryB\x08\n\x06resultB\t\n\x07version\"\xef\x04\n)GetTokenPreProgrammedDistributionsRequest\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0H\x00\x1a\xb6\x03\n+GetTokenPreProgrammedDistributionsRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x98\x01\n\rstart_at_info\x18\x02 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfoH\x00\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x1a\x9a\x01\n\x0bStartAtInfo\x12\x15\n\rstart_time_ms\x18\x01 \x01(\x04\x12\x1c\n\x0fstart_recipient\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12%\n\x18start_recipient_included\x18\x03 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_start_recipientB\x1b\n\x19_start_recipient_includedB\x10\n\x0e_start_at_infoB\x08\n\x06_limitB\t\n\x07version\"\xec\x07\n*GetTokenPreProgrammedDistributionsResponse\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0H\x00\x1a\xaf\x06\n,GetTokenPreProgrammedDistributionsResponseV0\x12\xa5\x01\n\x13token_distributions\x18\x01 \x01(\x0b\x32\x85\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a>\n\x16TokenDistributionEntry\x12\x14\n\x0crecipient_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x1a\xd4\x01\n\x1bTokenTimedDistributionEntry\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12\xa1\x01\n\rdistributions\x18\x02 \x03(\x0b\x32\x89\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry\x1a\xc3\x01\n\x12TokenDistributions\x12\xac\x01\n\x13token_distributions\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntryB\x08\n\x06resultB\t\n\x07version\"\xca\x01\n\x1aGetTokenTotalSupplyRequest\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0H\x00\x1a?\n\x1cGetTokenTotalSupplyRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xaf\x04\n\x1bGetTokenTotalSupplyResponse\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0H\x00\x1a\xa0\x03\n\x1dGetTokenTotalSupplyResponseV0\x12\x88\x01\n\x12token_total_supply\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\x15TokenTotalSupplyEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x30\n(total_aggregated_amount_in_user_accounts\x18\x02 \x01(\x04\x12\x1b\n\x13total_system_amount\x18\x03 \x01(\x04\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x01\n\x13GetGroupInfoRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0H\x00\x1a\\\n\x15GetGroupInfoRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xd4\x05\n\x14GetGroupInfoResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0H\x00\x1a\xda\x04\n\x16GetGroupInfoResponseV0\x12\x66\n\ngroup_info\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x98\x01\n\x0eGroupInfoEntry\x12h\n\x07members\x18\x01 \x03(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x02 \x01(\r\x1a\x8a\x01\n\tGroupInfo\x12n\n\ngroup_info\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntryH\x00\x88\x01\x01\x42\r\n\x0b_group_infoB\x08\n\x06resultB\t\n\x07version\"\xed\x03\n\x14GetGroupInfosRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0H\x00\x1au\n\x1cStartAtGroupContractPosition\x12%\n\x1dstart_group_contract_position\x18\x01 \x01(\r\x12.\n&start_group_contract_position_included\x18\x02 \x01(\x08\x1a\xfc\x01\n\x16GetGroupInfosRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12{\n start_at_group_contract_position\x18\x02 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPositionH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x42#\n!_start_at_group_contract_positionB\x08\n\x06_countB\t\n\x07version\"\xff\x05\n\x15GetGroupInfosResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0H\x00\x1a\x82\x05\n\x17GetGroupInfosResponseV0\x12j\n\x0bgroup_infos\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\xc3\x01\n\x16GroupPositionInfoEntry\x12\x1f\n\x17group_contract_position\x18\x01 \x01(\r\x12j\n\x07members\x18\x02 \x03(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x03 \x01(\r\x1a\x82\x01\n\nGroupInfos\x12t\n\x0bgroup_infos\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbe\x04\n\x16GetGroupActionsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0H\x00\x1aL\n\x0fStartAtActionId\x12\x17\n\x0fstart_action_id\x18\x01 \x01(\x0c\x12 \n\x18start_action_id_included\x18\x02 \x01(\x08\x1a\xc8\x02\n\x18GetGroupActionsRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12N\n\x06status\x18\x03 \x01(\x0e\x32>.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus\x12\x62\n\x12start_at_action_id\x18\x04 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionIdH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x05 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x42\x15\n\x13_start_at_action_idB\x08\n\x06_count\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\xeb\x1d\n\x17GetGroupActionsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0H\x00\x1a\xe8\x1c\n\x19GetGroupActionsResponseV0\x12r\n\rgroup_actions\x18\x01 \x01(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a[\n\tMintEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0crecipient_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x45\n\tBurnEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aJ\n\x0b\x46reezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aL\n\rUnfreezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x66\n\x17\x44\x65stroyFrozenFundsEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x13SharedEncryptedNote\x12\x18\n\x10sender_key_index\x18\x01 \x01(\r\x12\x1b\n\x13recipient_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a{\n\x15PersonalEncryptedNote\x12!\n\x19root_encryption_key_index\x18\x01 \x01(\r\x12\'\n\x1f\x64\x65rivation_encryption_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a\xa7\x03\n\rTransferEvent\x12\x14\n\x0crecipient_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x84\x01\n\x15shared_encrypted_note\x18\x03 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNoteH\x01\x88\x01\x01\x12\x88\x01\n\x17personal_encrypted_note\x18\x04 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNoteH\x02\x88\x01\x01\x12\x0e\n\x06\x61mount\x18\x05 \x01(\x04\x42\x0e\n\x0c_public_noteB\x18\n\x16_shared_encrypted_noteB\x1a\n\x18_personal_encrypted_note\x1a\xe9\x01\n\x14\x45mergencyActionEvent\x12\x81\x01\n\x0b\x61\x63tion_type\x18\x01 \x01(\x0e\x32l.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\"#\n\nActionType\x12\t\n\x05PAUSE\x10\x00\x12\n\n\x06RESUME\x10\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x16TokenConfigUpdateEvent\x12 \n\x18token_config_update_item\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\xfc\x02\n\x10GroupActionEvent\x12n\n\x0btoken_event\x18\x01 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEventH\x00\x12t\n\x0e\x64ocument_event\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEventH\x00\x12t\n\x0e\x63ontract_event\x18\x03 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEventH\x00\x42\x0c\n\nevent_type\x1a\x8b\x01\n\rDocumentEvent\x12r\n\x06\x63reate\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEventH\x00\x42\x06\n\x04type\x1a/\n\x13\x44ocumentCreateEvent\x12\x18\n\x10\x63reated_document\x18\x01 \x01(\x0c\x1a/\n\x13\x43ontractUpdateEvent\x12\x18\n\x10updated_contract\x18\x01 \x01(\x0c\x1a\x8b\x01\n\rContractEvent\x12r\n\x06update\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEventH\x00\x42\x06\n\x04type\x1a\xbb\x07\n\nTokenEvent\x12\x66\n\x04mint\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEventH\x00\x12\x66\n\x04\x62urn\x18\x02 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEventH\x00\x12j\n\x06\x66reeze\x18\x03 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEventH\x00\x12n\n\x08unfreeze\x18\x04 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEventH\x00\x12\x84\x01\n\x14\x64\x65stroy_frozen_funds\x18\x05 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEventH\x00\x12n\n\x08transfer\x18\x06 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEventH\x00\x12}\n\x10\x65mergency_action\x18\x07 \x01(\x0b\x32\x61.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEventH\x00\x12\x82\x01\n\x13token_config_update\x18\x08 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEventH\x00\x42\x06\n\x04type\x1a\x93\x01\n\x10GroupActionEntry\x12\x11\n\taction_id\x18\x01 \x01(\x0c\x12l\n\x05\x65vent\x18\x02 \x01(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent\x1a\x84\x01\n\x0cGroupActions\x12t\n\rgroup_actions\x18\x01 \x03(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntryB\x08\n\x06resultB\t\n\x07version\"\x88\x03\n\x1cGetGroupActionSignersRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0H\x00\x1a\xce\x01\n\x1eGetGroupActionSignersRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12T\n\x06status\x18\x03 \x01(\x0e\x32\x44.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus\x12\x11\n\taction_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\x8b\x05\n\x1dGetGroupActionSignersResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0H\x00\x1a\xf6\x03\n\x1fGetGroupActionSignersResponseV0\x12\x8b\x01\n\x14group_action_signers\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x35\n\x11GroupActionSigner\x12\x11\n\tsigner_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x91\x01\n\x12GroupActionSigners\x12{\n\x07signers\x18\x01 \x03(\x0b\x32j.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignerB\x08\n\x06resultB\t\n\x07version*Z\n\nKeyPurpose\x12\x12\n\x0e\x41UTHENTICATION\x10\x00\x12\x0e\n\nENCRYPTION\x10\x01\x12\x0e\n\nDECRYPTION\x10\x02\x12\x0c\n\x08TRANSFER\x10\x03\x12\n\n\x06VOTING\x10\x05\x32\x9a\x30\n\x08Platform\x12\x93\x01\n\x18\x62roadcastStateTransition\x12:.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest\x1a;.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse\x12l\n\x0bgetIdentity\x12-.org.dash.platform.dapi.v0.GetIdentityRequest\x1a..org.dash.platform.dapi.v0.GetIdentityResponse\x12x\n\x0fgetIdentityKeys\x12\x31.org.dash.platform.dapi.v0.GetIdentityKeysRequest\x1a\x32.org.dash.platform.dapi.v0.GetIdentityKeysResponse\x12\x96\x01\n\x19getIdentitiesContractKeys\x12;.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest\x1a<.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse\x12{\n\x10getIdentityNonce\x12\x32.org.dash.platform.dapi.v0.GetIdentityNonceRequest\x1a\x33.org.dash.platform.dapi.v0.GetIdentityNonceResponse\x12\x93\x01\n\x18getIdentityContractNonce\x12:.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse\x12\x81\x01\n\x12getIdentityBalance\x12\x34.org.dash.platform.dapi.v0.GetIdentityBalanceRequest\x1a\x35.org.dash.platform.dapi.v0.GetIdentityBalanceResponse\x12\x8a\x01\n\x15getIdentitiesBalances\x12\x37.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse\x12\xa2\x01\n\x1dgetIdentityBalanceAndRevision\x12?.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest\x1a@.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse\x12\xaf\x01\n#getEvonodesProposedEpochBlocksByIds\x12\x45.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12\xb3\x01\n%getEvonodesProposedEpochBlocksByRange\x12G.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12\x66\n\tgetProofs\x12+.org.dash.platform.dapi.v0.GetProofsRequest\x1a,.org.dash.platform.dapi.v0.GetProofsResponse\x12x\n\x0fgetDataContract\x12\x31.org.dash.platform.dapi.v0.GetDataContractRequest\x1a\x32.org.dash.platform.dapi.v0.GetDataContractResponse\x12\x8d\x01\n\x16getDataContractHistory\x12\x38.org.dash.platform.dapi.v0.GetDataContractHistoryRequest\x1a\x39.org.dash.platform.dapi.v0.GetDataContractHistoryResponse\x12{\n\x10getDataContracts\x12\x32.org.dash.platform.dapi.v0.GetDataContractsRequest\x1a\x33.org.dash.platform.dapi.v0.GetDataContractsResponse\x12o\n\x0cgetDocuments\x12..org.dash.platform.dapi.v0.GetDocumentsRequest\x1a/.org.dash.platform.dapi.v0.GetDocumentsResponse\x12\x99\x01\n\x1agetIdentityByPublicKeyHash\x12<.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest\x1a=.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse\x12\x9f\x01\n\x1cwaitForStateTransitionResult\x12>.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest\x1a?.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse\x12\x81\x01\n\x12getConsensusParams\x12\x34.org.dash.platform.dapi.v0.GetConsensusParamsRequest\x1a\x35.org.dash.platform.dapi.v0.GetConsensusParamsResponse\x12\xa5\x01\n\x1egetProtocolVersionUpgradeState\x12@.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest\x1a\x41.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse\x12\xb4\x01\n#getProtocolVersionUpgradeVoteStatus\x12\x45.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest\x1a\x46.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse\x12r\n\rgetEpochsInfo\x12/.org.dash.platform.dapi.v0.GetEpochsInfoRequest\x1a\x30.org.dash.platform.dapi.v0.GetEpochsInfoResponse\x12\x8a\x01\n\x15getContestedResources\x12\x37.org.dash.platform.dapi.v0.GetContestedResourcesRequest\x1a\x38.org.dash.platform.dapi.v0.GetContestedResourcesResponse\x12\xa2\x01\n\x1dgetContestedResourceVoteState\x12?.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest\x1a@.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse\x12\xba\x01\n%getContestedResourceVotersForIdentity\x12G.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest\x1aH.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse\x12\xae\x01\n!getContestedResourceIdentityVotes\x12\x43.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest\x1a\x44.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse\x12\x8a\x01\n\x15getVotePollsByEndDate\x12\x37.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest\x1a\x38.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse\x12\xa5\x01\n\x1egetPrefundedSpecializedBalance\x12@.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest\x1a\x41.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse\x12\x96\x01\n\x19getTotalCreditsInPlatform\x12;.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest\x1a<.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse\x12x\n\x0fgetPathElements\x12\x31.org.dash.platform.dapi.v0.GetPathElementsRequest\x1a\x32.org.dash.platform.dapi.v0.GetPathElementsResponse\x12\x66\n\tgetStatus\x12+.org.dash.platform.dapi.v0.GetStatusRequest\x1a,.org.dash.platform.dapi.v0.GetStatusResponse\x12\x8a\x01\n\x15getCurrentQuorumsInfo\x12\x37.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest\x1a\x38.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse\x12\x93\x01\n\x18getIdentityTokenBalances\x12:.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse\x12\x99\x01\n\x1agetIdentitiesTokenBalances\x12<.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest\x1a=.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse\x12\x8a\x01\n\x15getIdentityTokenInfos\x12\x37.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse\x12\x90\x01\n\x17getIdentitiesTokenInfos\x12\x39.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest\x1a:.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse\x12{\n\x10getTokenStatuses\x12\x32.org.dash.platform.dapi.v0.GetTokenStatusesRequest\x1a\x33.org.dash.platform.dapi.v0.GetTokenStatusesResponse\x12\xb1\x01\n\"getTokenPreProgrammedDistributions\x12\x44.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest\x1a\x45.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse\x12\x84\x01\n\x13getTokenTotalSupply\x12\x35.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest\x1a\x36.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse\x12o\n\x0cgetGroupInfo\x12..org.dash.platform.dapi.v0.GetGroupInfoRequest\x1a/.org.dash.platform.dapi.v0.GetGroupInfoResponse\x12r\n\rgetGroupInfos\x12/.org.dash.platform.dapi.v0.GetGroupInfosRequest\x1a\x30.org.dash.platform.dapi.v0.GetGroupInfosResponse\x12x\n\x0fgetGroupActions\x12\x31.org.dash.platform.dapi.v0.GetGroupActionsRequest\x1a\x32.org.dash.platform.dapi.v0.GetGroupActionsResponse\x12\x8a\x01\n\x15getGroupActionSigners\x12\x37.org.dash.platform.dapi.v0.GetGroupActionSignersRequest\x1a\x38.org.dash.platform.dapi.v0.GetGroupActionSignersResponseb\x06proto3' , dependencies=[google_dot_protobuf_dot_wrappers__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) @@ -62,8 +62,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=45338, - serialized_end=45428, + serialized_start=46971, + serialized_end=47061, ) _sym_db.RegisterEnumDescriptor(_KEYPURPOSE) @@ -275,8 +275,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=40416, - serialized_end=40454, + serialized_start=42049, + serialized_end=42087, ) _sym_db.RegisterEnumDescriptor(_GETGROUPACTIONSREQUEST_ACTIONSTATUS) @@ -300,8 +300,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=42105, - serialized_end=42140, + serialized_start=43738, + serialized_end=43773, ) _sym_db.RegisterEnumDescriptor(_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT_ACTIONTYPE) @@ -325,8 +325,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=40416, - serialized_end=40454, + serialized_start=42049, + serialized_end=42087, ) _sym_db.RegisterEnumDescriptor(_GETGROUPACTIONSIGNERSREQUEST_ACTIONSTATUS) @@ -9986,6 +9986,354 @@ ) +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0_STARTATINFO = _descriptor.Descriptor( + name='StartAtInfo', + full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='start_time_ms', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.start_time_ms', index=0, + number=1, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='start_recipient', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.start_recipient', index=1, + number=2, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='start_recipient_included', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.start_recipient_included', index=2, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_start_recipient', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo._start_recipient', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_start_recipient_included', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo._start_recipient_included', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=37348, + serialized_end=37502, +) + +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0 = _descriptor.Descriptor( + name='GetTokenPreProgrammedDistributionsRequestV0', + full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_id', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.token_id', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='start_at_info', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.start_at_info', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='limit', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.limit', index=2, + number=3, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='prove', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prove', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0_STARTATINFO, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_start_at_info', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0._start_at_info', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_limit', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0._limit', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=37092, + serialized_end=37530, +) + +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST = _descriptor.Descriptor( + name='GetTokenPreProgrammedDistributionsRequest', + full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='v0', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.v0', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=36918, + serialized_end=37541, +) + + +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENDISTRIBUTIONENTRY = _descriptor.Descriptor( + name='TokenDistributionEntry', + full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='recipient_id', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.recipient_id', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='amount', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.amount', index=1, + number=2, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=38052, + serialized_end=38114, +) + +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENTIMEDDISTRIBUTIONENTRY = _descriptor.Descriptor( + name='TokenTimedDistributionEntry', + full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='timestamp', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.timestamp', index=0, + number=1, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='distributions', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.distributions', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=38117, + serialized_end=38329, +) + +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENDISTRIBUTIONS = _descriptor.Descriptor( + name='TokenDistributions', + full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_distributions', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.token_distributions', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=38332, + serialized_end=38527, +) + +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0 = _descriptor.Descriptor( + name='GetTokenPreProgrammedDistributionsResponseV0', + full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_distributions', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.token_distributions', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='proof', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.proof', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='metadata', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.metadata', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENDISTRIBUTIONENTRY, _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENTIMEDDISTRIBUTIONENTRY, _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENDISTRIBUTIONS, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=37722, + serialized_end=38537, +) + +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE = _descriptor.Descriptor( + name='GetTokenPreProgrammedDistributionsResponse', + full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='v0', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.v0', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=37544, + serialized_end=38548, +) + + _GETTOKENTOTALSUPPLYREQUEST_GETTOKENTOTALSUPPLYREQUESTV0 = _descriptor.Descriptor( name='GetTokenTotalSupplyRequestV0', full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0', @@ -10020,8 +10368,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=37046, - serialized_end=37109, + serialized_start=38679, + serialized_end=38742, ) _GETTOKENTOTALSUPPLYREQUEST = _descriptor.Descriptor( @@ -10056,8 +10404,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=36918, - serialized_end=37120, + serialized_start=38551, + serialized_end=38753, ) @@ -10102,8 +10450,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=37541, - serialized_end=37661, + serialized_start=39174, + serialized_end=39294, ) _GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0 = _descriptor.Descriptor( @@ -10152,8 +10500,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=37255, - serialized_end=37671, + serialized_start=38888, + serialized_end=39304, ) _GETTOKENTOTALSUPPLYRESPONSE = _descriptor.Descriptor( @@ -10188,8 +10536,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=37123, - serialized_end=37682, + serialized_start=38756, + serialized_end=39315, ) @@ -10234,8 +10582,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=37792, - serialized_end=37884, + serialized_start=39425, + serialized_end=39517, ) _GETGROUPINFOREQUEST = _descriptor.Descriptor( @@ -10270,8 +10618,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=37685, - serialized_end=37895, + serialized_start=39318, + serialized_end=39528, ) @@ -10309,8 +10657,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=38253, - serialized_end=38305, + serialized_start=39886, + serialized_end=39938, ) _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFOENTRY = _descriptor.Descriptor( @@ -10347,8 +10695,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=38308, - serialized_end=38460, + serialized_start=39941, + serialized_end=40093, ) _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFO = _descriptor.Descriptor( @@ -10383,8 +10731,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=38463, - serialized_end=38601, + serialized_start=40096, + serialized_end=40234, ) _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0 = _descriptor.Descriptor( @@ -10433,8 +10781,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=38009, - serialized_end=38611, + serialized_start=39642, + serialized_end=40244, ) _GETGROUPINFORESPONSE = _descriptor.Descriptor( @@ -10469,8 +10817,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=37898, - serialized_end=38622, + serialized_start=39531, + serialized_end=40255, ) @@ -10508,8 +10856,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=38735, - serialized_end=38852, + serialized_start=40368, + serialized_end=40485, ) _GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0 = _descriptor.Descriptor( @@ -10570,8 +10918,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=38855, - serialized_end=39107, + serialized_start=40488, + serialized_end=40740, ) _GETGROUPINFOSREQUEST = _descriptor.Descriptor( @@ -10606,8 +10954,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=38625, - serialized_end=39118, + serialized_start=40258, + serialized_end=40751, ) @@ -10645,8 +10993,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=38253, - serialized_end=38305, + serialized_start=39886, + serialized_end=39938, ) _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPPOSITIONINFOENTRY = _descriptor.Descriptor( @@ -10690,8 +11038,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=39539, - serialized_end=39734, + serialized_start=41172, + serialized_end=41367, ) _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPINFOS = _descriptor.Descriptor( @@ -10721,8 +11069,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=39737, - serialized_end=39867, + serialized_start=41370, + serialized_end=41500, ) _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0 = _descriptor.Descriptor( @@ -10771,8 +11119,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=39235, - serialized_end=39877, + serialized_start=40868, + serialized_end=41510, ) _GETGROUPINFOSRESPONSE = _descriptor.Descriptor( @@ -10807,8 +11155,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=39121, - serialized_end=39888, + serialized_start=40754, + serialized_end=41521, ) @@ -10846,8 +11194,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=40007, - serialized_end=40083, + serialized_start=41640, + serialized_end=41716, ) _GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0 = _descriptor.Descriptor( @@ -10922,8 +11270,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=40086, - serialized_end=40414, + serialized_start=41719, + serialized_end=42047, ) _GETGROUPACTIONSREQUEST = _descriptor.Descriptor( @@ -10959,8 +11307,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=39891, - serialized_end=40465, + serialized_start=41524, + serialized_end=42098, ) @@ -11010,8 +11358,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=40847, - serialized_end=40938, + serialized_start=42480, + serialized_end=42571, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_BURNEVENT = _descriptor.Descriptor( @@ -11053,8 +11401,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=40940, - serialized_end=41009, + serialized_start=42573, + serialized_end=42642, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_FREEZEEVENT = _descriptor.Descriptor( @@ -11096,8 +11444,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=41011, - serialized_end=41085, + serialized_start=42644, + serialized_end=42718, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UNFREEZEEVENT = _descriptor.Descriptor( @@ -11139,8 +11487,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=41087, - serialized_end=41163, + serialized_start=42720, + serialized_end=42796, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DESTROYFROZENFUNDSEVENT = _descriptor.Descriptor( @@ -11189,8 +11537,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=41165, - serialized_end=41267, + serialized_start=42798, + serialized_end=42900, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_SHAREDENCRYPTEDNOTE = _descriptor.Descriptor( @@ -11234,8 +11582,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=41269, - serialized_end=41369, + serialized_start=42902, + serialized_end=43002, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_PERSONALENCRYPTEDNOTE = _descriptor.Descriptor( @@ -11279,8 +11627,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=41371, - serialized_end=41494, + serialized_start=43004, + serialized_end=43127, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT = _descriptor.Descriptor( @@ -11353,8 +11701,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=41497, - serialized_end=41920, + serialized_start=43130, + serialized_end=43553, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT = _descriptor.Descriptor( @@ -11397,8 +11745,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=41923, - serialized_end=42156, + serialized_start=43556, + serialized_end=43789, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENCONFIGUPDATEEVENT = _descriptor.Descriptor( @@ -11440,8 +11788,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=42158, - serialized_end=42258, + serialized_start=43791, + serialized_end=43891, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT = _descriptor.Descriptor( @@ -11490,8 +11838,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=42261, - serialized_end=42641, + serialized_start=43894, + serialized_end=44274, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTEVENT = _descriptor.Descriptor( @@ -11526,8 +11874,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=42644, - serialized_end=42783, + serialized_start=44277, + serialized_end=44416, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTCREATEEVENT = _descriptor.Descriptor( @@ -11557,8 +11905,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=42785, - serialized_end=42832, + serialized_start=44418, + serialized_end=44465, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTUPDATEEVENT = _descriptor.Descriptor( @@ -11588,8 +11936,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=42834, - serialized_end=42881, + serialized_start=44467, + serialized_end=44514, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTEVENT = _descriptor.Descriptor( @@ -11624,8 +11972,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=42884, - serialized_end=43023, + serialized_start=44517, + serialized_end=44656, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT = _descriptor.Descriptor( @@ -11709,8 +12057,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=43026, - serialized_end=43981, + serialized_start=44659, + serialized_end=45614, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONENTRY = _descriptor.Descriptor( @@ -11747,8 +12095,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=43984, - serialized_end=44131, + serialized_start=45617, + serialized_end=45764, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONS = _descriptor.Descriptor( @@ -11778,8 +12126,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=44134, - serialized_end=44266, + serialized_start=45767, + serialized_end=45899, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 = _descriptor.Descriptor( @@ -11828,8 +12176,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=40588, - serialized_end=44276, + serialized_start=42221, + serialized_end=45909, ) _GETGROUPACTIONSRESPONSE = _descriptor.Descriptor( @@ -11864,8 +12212,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=40468, - serialized_end=44287, + serialized_start=42101, + serialized_end=45920, ) @@ -11924,8 +12272,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=44425, - serialized_end=44631, + serialized_start=46058, + serialized_end=46264, ) _GETGROUPACTIONSIGNERSREQUEST = _descriptor.Descriptor( @@ -11961,8 +12309,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=44290, - serialized_end=44682, + serialized_start=45923, + serialized_end=46315, ) @@ -12000,8 +12348,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=45114, - serialized_end=45167, + serialized_start=46747, + serialized_end=46800, ) _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0_GROUPACTIONSIGNERS = _descriptor.Descriptor( @@ -12031,8 +12379,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=45170, - serialized_end=45315, + serialized_start=46803, + serialized_end=46948, ) _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0 = _descriptor.Descriptor( @@ -12081,8 +12429,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=44823, - serialized_end=45325, + serialized_start=46456, + serialized_end=46958, ) _GETGROUPACTIONSIGNERSRESPONSE = _descriptor.Descriptor( @@ -12117,8 +12465,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=44685, - serialized_end=45336, + serialized_start=46318, + serialized_end=46969, ) _GETIDENTITYREQUEST_GETIDENTITYREQUESTV0.containing_type = _GETIDENTITYREQUEST @@ -13033,6 +13381,44 @@ _GETTOKENSTATUSESRESPONSE.oneofs_by_name['version'].fields.append( _GETTOKENSTATUSESRESPONSE.fields_by_name['v0']) _GETTOKENSTATUSESRESPONSE.fields_by_name['v0'].containing_oneof = _GETTOKENSTATUSESRESPONSE.oneofs_by_name['version'] +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0_STARTATINFO.containing_type = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0 +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0_STARTATINFO.oneofs_by_name['_start_recipient'].fields.append( + _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0_STARTATINFO.fields_by_name['start_recipient']) +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0_STARTATINFO.fields_by_name['start_recipient'].containing_oneof = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0_STARTATINFO.oneofs_by_name['_start_recipient'] +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0_STARTATINFO.oneofs_by_name['_start_recipient_included'].fields.append( + _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0_STARTATINFO.fields_by_name['start_recipient_included']) +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0_STARTATINFO.fields_by_name['start_recipient_included'].containing_oneof = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0_STARTATINFO.oneofs_by_name['_start_recipient_included'] +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0.fields_by_name['start_at_info'].message_type = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0_STARTATINFO +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0.containing_type = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0.oneofs_by_name['_start_at_info'].fields.append( + _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0.fields_by_name['start_at_info']) +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0.fields_by_name['start_at_info'].containing_oneof = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0.oneofs_by_name['_start_at_info'] +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0.oneofs_by_name['_limit'].fields.append( + _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0.fields_by_name['limit']) +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0.fields_by_name['limit'].containing_oneof = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0.oneofs_by_name['_limit'] +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST.fields_by_name['v0'].message_type = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0 +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST.oneofs_by_name['version'].fields.append( + _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST.fields_by_name['v0']) +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST.fields_by_name['v0'].containing_oneof = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST.oneofs_by_name['version'] +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENDISTRIBUTIONENTRY.containing_type = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0 +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENTIMEDDISTRIBUTIONENTRY.fields_by_name['distributions'].message_type = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENDISTRIBUTIONENTRY +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENTIMEDDISTRIBUTIONENTRY.containing_type = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0 +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENDISTRIBUTIONS.fields_by_name['token_distributions'].message_type = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENTIMEDDISTRIBUTIONENTRY +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENDISTRIBUTIONS.containing_type = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0 +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0.fields_by_name['token_distributions'].message_type = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENDISTRIBUTIONS +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0.containing_type = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0.fields_by_name['token_distributions']) +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0.fields_by_name['token_distributions'].containing_oneof = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0.oneofs_by_name['result'] +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0.fields_by_name['proof']) +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0.oneofs_by_name['result'] +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE.fields_by_name['v0'].message_type = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0 +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE.oneofs_by_name['version'].fields.append( + _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE.fields_by_name['v0']) +_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE.fields_by_name['v0'].containing_oneof = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE.oneofs_by_name['version'] _GETTOKENTOTALSUPPLYREQUEST_GETTOKENTOTALSUPPLYREQUESTV0.containing_type = _GETTOKENTOTALSUPPLYREQUEST _GETTOKENTOTALSUPPLYREQUEST.fields_by_name['v0'].message_type = _GETTOKENTOTALSUPPLYREQUEST_GETTOKENTOTALSUPPLYREQUESTV0 _GETTOKENTOTALSUPPLYREQUEST.oneofs_by_name['version'].fields.append( @@ -13352,6 +13738,8 @@ DESCRIPTOR.message_types_by_name['GetIdentitiesTokenInfosResponse'] = _GETIDENTITIESTOKENINFOSRESPONSE DESCRIPTOR.message_types_by_name['GetTokenStatusesRequest'] = _GETTOKENSTATUSESREQUEST DESCRIPTOR.message_types_by_name['GetTokenStatusesResponse'] = _GETTOKENSTATUSESRESPONSE +DESCRIPTOR.message_types_by_name['GetTokenPreProgrammedDistributionsRequest'] = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST +DESCRIPTOR.message_types_by_name['GetTokenPreProgrammedDistributionsResponse'] = _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE DESCRIPTOR.message_types_by_name['GetTokenTotalSupplyRequest'] = _GETTOKENTOTALSUPPLYREQUEST DESCRIPTOR.message_types_by_name['GetTokenTotalSupplyResponse'] = _GETTOKENTOTALSUPPLYRESPONSE DESCRIPTOR.message_types_by_name['GetGroupInfoRequest'] = _GETGROUPINFOREQUEST @@ -15084,6 +15472,68 @@ _sym_db.RegisterMessage(GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry) _sym_db.RegisterMessage(GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses) +GetTokenPreProgrammedDistributionsRequest = _reflection.GeneratedProtocolMessageType('GetTokenPreProgrammedDistributionsRequest', (_message.Message,), { + + 'GetTokenPreProgrammedDistributionsRequestV0' : _reflection.GeneratedProtocolMessageType('GetTokenPreProgrammedDistributionsRequestV0', (_message.Message,), { + + 'StartAtInfo' : _reflection.GeneratedProtocolMessageType('StartAtInfo', (_message.Message,), { + 'DESCRIPTOR' : _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0_STARTATINFO, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo) + }) + , + 'DESCRIPTOR' : _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0) + }) + , + 'DESCRIPTOR' : _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest) + }) +_sym_db.RegisterMessage(GetTokenPreProgrammedDistributionsRequest) +_sym_db.RegisterMessage(GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0) +_sym_db.RegisterMessage(GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo) + +GetTokenPreProgrammedDistributionsResponse = _reflection.GeneratedProtocolMessageType('GetTokenPreProgrammedDistributionsResponse', (_message.Message,), { + + 'GetTokenPreProgrammedDistributionsResponseV0' : _reflection.GeneratedProtocolMessageType('GetTokenPreProgrammedDistributionsResponseV0', (_message.Message,), { + + 'TokenDistributionEntry' : _reflection.GeneratedProtocolMessageType('TokenDistributionEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENDISTRIBUTIONENTRY, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry) + }) + , + + 'TokenTimedDistributionEntry' : _reflection.GeneratedProtocolMessageType('TokenTimedDistributionEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENTIMEDDISTRIBUTIONENTRY, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry) + }) + , + + 'TokenDistributions' : _reflection.GeneratedProtocolMessageType('TokenDistributions', (_message.Message,), { + 'DESCRIPTOR' : _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENDISTRIBUTIONS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions) + }) + , + 'DESCRIPTOR' : _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0) + }) + , + 'DESCRIPTOR' : _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse) + }) +_sym_db.RegisterMessage(GetTokenPreProgrammedDistributionsResponse) +_sym_db.RegisterMessage(GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0) +_sym_db.RegisterMessage(GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry) +_sym_db.RegisterMessage(GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry) +_sym_db.RegisterMessage(GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions) + GetTokenTotalSupplyRequest = _reflection.GeneratedProtocolMessageType('GetTokenTotalSupplyRequest', (_message.Message,), { 'GetTokenTotalSupplyRequestV0' : _reflection.GeneratedProtocolMessageType('GetTokenTotalSupplyRequestV0', (_message.Message,), { @@ -15477,8 +15927,8 @@ index=0, serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_start=45431, - serialized_end=51421, + serialized_start=47064, + serialized_end=53234, methods=[ _descriptor.MethodDescriptor( name='broadcastStateTransition', @@ -15850,10 +16300,20 @@ serialized_options=None, create_key=_descriptor._internal_create_key, ), + _descriptor.MethodDescriptor( + name='getTokenPreProgrammedDistributions', + full_name='org.dash.platform.dapi.v0.Platform.getTokenPreProgrammedDistributions', + index=37, + containing_service=None, + input_type=_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST, + output_type=_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), _descriptor.MethodDescriptor( name='getTokenTotalSupply', full_name='org.dash.platform.dapi.v0.Platform.getTokenTotalSupply', - index=37, + index=38, containing_service=None, input_type=_GETTOKENTOTALSUPPLYREQUEST, output_type=_GETTOKENTOTALSUPPLYRESPONSE, @@ -15863,7 +16323,7 @@ _descriptor.MethodDescriptor( name='getGroupInfo', full_name='org.dash.platform.dapi.v0.Platform.getGroupInfo', - index=38, + index=39, containing_service=None, input_type=_GETGROUPINFOREQUEST, output_type=_GETGROUPINFORESPONSE, @@ -15873,7 +16333,7 @@ _descriptor.MethodDescriptor( name='getGroupInfos', full_name='org.dash.platform.dapi.v0.Platform.getGroupInfos', - index=39, + index=40, containing_service=None, input_type=_GETGROUPINFOSREQUEST, output_type=_GETGROUPINFOSRESPONSE, @@ -15883,7 +16343,7 @@ _descriptor.MethodDescriptor( name='getGroupActions', full_name='org.dash.platform.dapi.v0.Platform.getGroupActions', - index=40, + index=41, containing_service=None, input_type=_GETGROUPACTIONSREQUEST, output_type=_GETGROUPACTIONSRESPONSE, @@ -15893,7 +16353,7 @@ _descriptor.MethodDescriptor( name='getGroupActionSigners', full_name='org.dash.platform.dapi.v0.Platform.getGroupActionSigners', - index=41, + index=42, containing_service=None, input_type=_GETGROUPACTIONSIGNERSREQUEST, output_type=_GETGROUPACTIONSIGNERSRESPONSE, diff --git a/packages/dapi-grpc/clients/platform/v0/python/platform_pb2_grpc.py b/packages/dapi-grpc/clients/platform/v0/python/platform_pb2_grpc.py index fe75971710c..7b730ee7d22 100644 --- a/packages/dapi-grpc/clients/platform/v0/python/platform_pb2_grpc.py +++ b/packages/dapi-grpc/clients/platform/v0/python/platform_pb2_grpc.py @@ -199,6 +199,11 @@ def __init__(self, channel): request_serializer=platform__pb2.GetTokenStatusesRequest.SerializeToString, response_deserializer=platform__pb2.GetTokenStatusesResponse.FromString, ) + self.getTokenPreProgrammedDistributions = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getTokenPreProgrammedDistributions', + request_serializer=platform__pb2.GetTokenPreProgrammedDistributionsRequest.SerializeToString, + response_deserializer=platform__pb2.GetTokenPreProgrammedDistributionsResponse.FromString, + ) self.getTokenTotalSupply = channel.unary_unary( '/org.dash.platform.dapi.v0.Platform/getTokenTotalSupply', request_serializer=platform__pb2.GetTokenTotalSupplyRequest.SerializeToString, @@ -456,6 +461,12 @@ def getTokenStatuses(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def getTokenPreProgrammedDistributions(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def getTokenTotalSupply(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -674,6 +685,11 @@ def add_PlatformServicer_to_server(servicer, server): request_deserializer=platform__pb2.GetTokenStatusesRequest.FromString, response_serializer=platform__pb2.GetTokenStatusesResponse.SerializeToString, ), + 'getTokenPreProgrammedDistributions': grpc.unary_unary_rpc_method_handler( + servicer.getTokenPreProgrammedDistributions, + request_deserializer=platform__pb2.GetTokenPreProgrammedDistributionsRequest.FromString, + response_serializer=platform__pb2.GetTokenPreProgrammedDistributionsResponse.SerializeToString, + ), 'getTokenTotalSupply': grpc.unary_unary_rpc_method_handler( servicer.getTokenTotalSupply, request_deserializer=platform__pb2.GetTokenTotalSupplyRequest.FromString, @@ -1338,6 +1354,23 @@ def getTokenStatuses(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def getTokenPreProgrammedDistributions(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/org.dash.platform.dapi.v0.Platform/getTokenPreProgrammedDistributions', + platform__pb2.GetTokenPreProgrammedDistributionsRequest.SerializeToString, + platform__pb2.GetTokenPreProgrammedDistributionsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def getTokenTotalSupply(request, target, diff --git a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.d.ts b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.d.ts index 0d28fb59f7b..ef59f8e8b2b 100644 --- a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.d.ts +++ b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.d.ts @@ -7039,6 +7039,249 @@ export namespace GetTokenStatusesResponse { } } +export class GetTokenPreProgrammedDistributionsRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 | undefined; + setV0(value?: GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0): void; + + getVersionCase(): GetTokenPreProgrammedDistributionsRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTokenPreProgrammedDistributionsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetTokenPreProgrammedDistributionsRequest): GetTokenPreProgrammedDistributionsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTokenPreProgrammedDistributionsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTokenPreProgrammedDistributionsRequest; + static deserializeBinaryFromReader(message: GetTokenPreProgrammedDistributionsRequest, reader: jspb.BinaryReader): GetTokenPreProgrammedDistributionsRequest; +} + +export namespace GetTokenPreProgrammedDistributionsRequest { + export type AsObject = { + v0?: GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.AsObject, + } + + export class GetTokenPreProgrammedDistributionsRequestV0 extends jspb.Message { + getTokenId(): Uint8Array | string; + getTokenId_asU8(): Uint8Array; + getTokenId_asB64(): string; + setTokenId(value: Uint8Array | string): void; + + hasStartAtInfo(): boolean; + clearStartAtInfo(): void; + getStartAtInfo(): GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo | undefined; + setStartAtInfo(value?: GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo): void; + + hasLimit(): boolean; + clearLimit(): void; + getLimit(): number; + setLimit(value: number): void; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTokenPreProgrammedDistributionsRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetTokenPreProgrammedDistributionsRequestV0): GetTokenPreProgrammedDistributionsRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTokenPreProgrammedDistributionsRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTokenPreProgrammedDistributionsRequestV0; + static deserializeBinaryFromReader(message: GetTokenPreProgrammedDistributionsRequestV0, reader: jspb.BinaryReader): GetTokenPreProgrammedDistributionsRequestV0; + } + + export namespace GetTokenPreProgrammedDistributionsRequestV0 { + export type AsObject = { + tokenId: Uint8Array | string, + startAtInfo?: GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.AsObject, + limit: number, + prove: boolean, + } + + export class StartAtInfo extends jspb.Message { + getStartTimeMs(): number; + setStartTimeMs(value: number): void; + + hasStartRecipient(): boolean; + clearStartRecipient(): void; + getStartRecipient(): Uint8Array | string; + getStartRecipient_asU8(): Uint8Array; + getStartRecipient_asB64(): string; + setStartRecipient(value: Uint8Array | string): void; + + hasStartRecipientIncluded(): boolean; + clearStartRecipientIncluded(): void; + getStartRecipientIncluded(): boolean; + setStartRecipientIncluded(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StartAtInfo.AsObject; + static toObject(includeInstance: boolean, msg: StartAtInfo): StartAtInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StartAtInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StartAtInfo; + static deserializeBinaryFromReader(message: StartAtInfo, reader: jspb.BinaryReader): StartAtInfo; + } + + export namespace StartAtInfo { + export type AsObject = { + startTimeMs: number, + startRecipient: Uint8Array | string, + startRecipientIncluded: boolean, + } + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetTokenPreProgrammedDistributionsResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 | undefined; + setV0(value?: GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0): void; + + getVersionCase(): GetTokenPreProgrammedDistributionsResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTokenPreProgrammedDistributionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetTokenPreProgrammedDistributionsResponse): GetTokenPreProgrammedDistributionsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTokenPreProgrammedDistributionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTokenPreProgrammedDistributionsResponse; + static deserializeBinaryFromReader(message: GetTokenPreProgrammedDistributionsResponse, reader: jspb.BinaryReader): GetTokenPreProgrammedDistributionsResponse; +} + +export namespace GetTokenPreProgrammedDistributionsResponse { + export type AsObject = { + v0?: GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.AsObject, + } + + export class GetTokenPreProgrammedDistributionsResponseV0 extends jspb.Message { + hasTokenDistributions(): boolean; + clearTokenDistributions(): void; + getTokenDistributions(): GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions | undefined; + setTokenDistributions(value?: GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetTokenPreProgrammedDistributionsResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTokenPreProgrammedDistributionsResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetTokenPreProgrammedDistributionsResponseV0): GetTokenPreProgrammedDistributionsResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTokenPreProgrammedDistributionsResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTokenPreProgrammedDistributionsResponseV0; + static deserializeBinaryFromReader(message: GetTokenPreProgrammedDistributionsResponseV0, reader: jspb.BinaryReader): GetTokenPreProgrammedDistributionsResponseV0; + } + + export namespace GetTokenPreProgrammedDistributionsResponseV0 { + export type AsObject = { + tokenDistributions?: GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export class TokenDistributionEntry extends jspb.Message { + getRecipientId(): Uint8Array | string; + getRecipientId_asU8(): Uint8Array; + getRecipientId_asB64(): string; + setRecipientId(value: Uint8Array | string): void; + + getAmount(): number; + setAmount(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenDistributionEntry.AsObject; + static toObject(includeInstance: boolean, msg: TokenDistributionEntry): TokenDistributionEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenDistributionEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenDistributionEntry; + static deserializeBinaryFromReader(message: TokenDistributionEntry, reader: jspb.BinaryReader): TokenDistributionEntry; + } + + export namespace TokenDistributionEntry { + export type AsObject = { + recipientId: Uint8Array | string, + amount: number, + } + } + + export class TokenTimedDistributionEntry extends jspb.Message { + getTimestamp(): number; + setTimestamp(value: number): void; + + clearDistributionsList(): void; + getDistributionsList(): Array; + setDistributionsList(value: Array): void; + addDistributions(value?: GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry, index?: number): GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenTimedDistributionEntry.AsObject; + static toObject(includeInstance: boolean, msg: TokenTimedDistributionEntry): TokenTimedDistributionEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenTimedDistributionEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenTimedDistributionEntry; + static deserializeBinaryFromReader(message: TokenTimedDistributionEntry, reader: jspb.BinaryReader): TokenTimedDistributionEntry; + } + + export namespace TokenTimedDistributionEntry { + export type AsObject = { + timestamp: number, + distributionsList: Array, + } + } + + export class TokenDistributions extends jspb.Message { + clearTokenDistributionsList(): void; + getTokenDistributionsList(): Array; + setTokenDistributionsList(value: Array): void; + addTokenDistributions(value?: GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry, index?: number): GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenDistributions.AsObject; + static toObject(includeInstance: boolean, msg: TokenDistributions): TokenDistributions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenDistributions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenDistributions; + static deserializeBinaryFromReader(message: TokenDistributions, reader: jspb.BinaryReader): TokenDistributions; + } + + export namespace TokenDistributions { + export type AsObject = { + tokenDistributionsList: Array, + } + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + TOKEN_DISTRIBUTIONS = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + export class GetTokenTotalSupplyRequest extends jspb.Message { hasV0(): boolean; clearV0(): void; diff --git a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js index 32492c8ade3..b9cb0ee8436 100644 --- a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js +++ b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js @@ -377,6 +377,17 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusRe goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.VersionCase', null, { proto }); @@ -5112,6 +5123,174 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -54634,6 +54813,1704 @@ proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.hasV0 = funct +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + tokenId: msg.getTokenId_asB64(), + startAtInfo: (f = msg.getStartAtInfo()) && proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.toObject(includeInstance, f), + limit: jspb.Message.getFieldWithDefault(msg, 3, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTokenId(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.deserializeBinaryFromReader); + msg.setStartAtInfo(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLimit(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getStartAtInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.toObject = function(includeInstance, msg) { + var f, obj = { + startTimeMs: jspb.Message.getFieldWithDefault(msg, 1, 0), + startRecipient: msg.getStartRecipient_asB64(), + startRecipientIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStartTimeMs(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartRecipient(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStartRecipientIncluded(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartTimeMs(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional uint64 start_time_ms = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.getStartTimeMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.setStartTimeMs = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes start_recipient = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.getStartRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes start_recipient = 2; + * This is a type-conversion wrapper around `getStartRecipient()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.getStartRecipient_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartRecipient())); +}; + + +/** + * optional bytes start_recipient = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartRecipient()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.getStartRecipient_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartRecipient())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.setStartRecipient = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.clearStartRecipient = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.hasStartRecipient = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool start_recipient_included = 3; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.getStartRecipientIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.setStartRecipientIncluded = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.clearStartRecipientIncluded = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo.prototype.hasStartRecipientIncluded = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes token_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); +}; + + +/** + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional StartAtInfo start_at_info = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.getStartAtInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.setStartAtInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.clearStartAtInfo = function() { + return this.setStartAtInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.hasStartAtInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 limit = 3; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.setLimit = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.clearLimit = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.hasLimit = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool prove = 4; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional GetTokenPreProgrammedDistributionsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.serializeBinaryToWriter + ); + } +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + TOKEN_DISTRIBUTIONS: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + tokenDistributions: (f = msg.getTokenDistributions()) && proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.toObject(includeInstance, f), + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.deserializeBinaryFromReader); + msg.setTokenDistributions(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.Proof; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.ResponseMetadata; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenDistributions(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.serializeBinaryToWriter + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.toObject = function(includeInstance, msg) { + var f, obj = { + recipientId: msg.getRecipientId_asB64(), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRecipientId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRecipientId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes recipient_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.getRecipientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes recipient_id = 1; + * This is a type-conversion wrapper around `getRecipientId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.getRecipientId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRecipientId())); +}; + + +/** + * optional bytes recipient_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRecipientId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.getRecipientId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRecipientId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.setRecipientId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 amount = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.toObject = function(includeInstance, msg) { + var f, obj = { + timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), + distributionsList: jspb.Message.toObjectList(msg.getDistributionsList(), + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.deserializeBinaryFromReader); + msg.addDistributions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getDistributionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 timestamp = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated TokenDistributionEntry distributions = 2; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.getDistributionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.setDistributionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.addDistributions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.prototype.clearDistributionsList = function() { + return this.setDistributionsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.toObject = function(includeInstance, msg) { + var f, obj = { + tokenDistributionsList: jspb.Message.toObjectList(msg.getTokenDistributionsList(), + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions; + return proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.deserializeBinaryFromReader); + msg.addTokenDistributions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenDistributionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated TokenTimedDistributionEntry token_distributions = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.prototype.getTokenDistributionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.prototype.setTokenDistributionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.prototype.addTokenDistributions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions.prototype.clearTokenDistributionsList = function() { + return this.setTokenDistributionsList([]); +}; + + +/** + * optional TokenDistributions token_distributions = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.getTokenDistributions = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.setTokenDistributions = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.clearTokenDistributions = function() { + return this.setTokenDistributions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.hasTokenDistributions = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetTokenPreProgrammedDistributionsResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all diff --git a/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.d.ts b/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.d.ts index 962048d3a10..78116e10177 100644 --- a/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.d.ts +++ b/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.d.ts @@ -337,6 +337,15 @@ type PlatformgetTokenStatuses = { readonly responseType: typeof platform_pb.GetTokenStatusesResponse; }; +type PlatformgetTokenPreProgrammedDistributions = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetTokenPreProgrammedDistributionsRequest; + readonly responseType: typeof platform_pb.GetTokenPreProgrammedDistributionsResponse; +}; + type PlatformgetTokenTotalSupply = { readonly methodName: string; readonly service: typeof Platform; @@ -421,6 +430,7 @@ export class Platform { static readonly getIdentityTokenInfos: PlatformgetIdentityTokenInfos; static readonly getIdentitiesTokenInfos: PlatformgetIdentitiesTokenInfos; static readonly getTokenStatuses: PlatformgetTokenStatuses; + static readonly getTokenPreProgrammedDistributions: PlatformgetTokenPreProgrammedDistributions; static readonly getTokenTotalSupply: PlatformgetTokenTotalSupply; static readonly getGroupInfo: PlatformgetGroupInfo; static readonly getGroupInfos: PlatformgetGroupInfos; @@ -793,6 +803,15 @@ export class PlatformClient { requestMessage: platform_pb.GetTokenStatusesRequest, callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenStatusesResponse|null) => void ): UnaryResponse; + getTokenPreProgrammedDistributions( + requestMessage: platform_pb.GetTokenPreProgrammedDistributionsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenPreProgrammedDistributionsResponse|null) => void + ): UnaryResponse; + getTokenPreProgrammedDistributions( + requestMessage: platform_pb.GetTokenPreProgrammedDistributionsRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenPreProgrammedDistributionsResponse|null) => void + ): UnaryResponse; getTokenTotalSupply( requestMessage: platform_pb.GetTokenTotalSupplyRequest, metadata: grpc.Metadata, diff --git a/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.js b/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.js index 8e713eaaaa3..3a5bab94009 100644 --- a/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.js +++ b/packages/dapi-grpc/clients/platform/v0/web/platform_pb_service.js @@ -343,6 +343,15 @@ Platform.getTokenStatuses = { responseType: platform_pb.GetTokenStatusesResponse }; +Platform.getTokenPreProgrammedDistributions = { + methodName: "getTokenPreProgrammedDistributions", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetTokenPreProgrammedDistributionsRequest, + responseType: platform_pb.GetTokenPreProgrammedDistributionsResponse +}; + Platform.getTokenTotalSupply = { methodName: "getTokenTotalSupply", service: Platform, @@ -1542,6 +1551,37 @@ PlatformClient.prototype.getTokenStatuses = function getTokenStatuses(requestMes }; }; +PlatformClient.prototype.getTokenPreProgrammedDistributions = function getTokenPreProgrammedDistributions(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getTokenPreProgrammedDistributions, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + PlatformClient.prototype.getTokenTotalSupply = function getTokenTotalSupply(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/packages/dapi-grpc/protos/platform/v0/platform.proto b/packages/dapi-grpc/protos/platform/v0/platform.proto index a071a3174bd..8842fb10350 100644 --- a/packages/dapi-grpc/protos/platform/v0/platform.proto +++ b/packages/dapi-grpc/protos/platform/v0/platform.proto @@ -60,6 +60,7 @@ service Platform { rpc getIdentityTokenInfos(GetIdentityTokenInfosRequest) returns (GetIdentityTokenInfosResponse); rpc getIdentitiesTokenInfos(GetIdentitiesTokenInfosRequest) returns (GetIdentitiesTokenInfosResponse); rpc getTokenStatuses(GetTokenStatusesRequest) returns (GetTokenStatusesResponse); + rpc getTokenPreProgrammedDistributions(GetTokenPreProgrammedDistributionsRequest) returns (GetTokenPreProgrammedDistributionsResponse); rpc getTokenTotalSupply(GetTokenTotalSupplyRequest) returns (GetTokenTotalSupplyResponse); rpc getGroupInfo(GetGroupInfoRequest) returns (GetGroupInfoResponse); rpc getGroupInfos(GetGroupInfosRequest) returns (GetGroupInfosResponse); @@ -1417,6 +1418,50 @@ message GetTokenStatusesResponse { } } +message GetTokenPreProgrammedDistributionsRequest { + message GetTokenPreProgrammedDistributionsRequestV0 { + bytes token_id = 1; + message StartAtInfo { + uint64 start_time_ms = 1; + optional bytes start_recipient = 2; + optional bool start_recipient_included = 3; + } + optional StartAtInfo start_at_info = 2; + optional uint32 limit = 3; + bool prove = 4; + } + oneof version { + GetTokenPreProgrammedDistributionsRequestV0 v0 = 1; + } +} + +message GetTokenPreProgrammedDistributionsResponse { + message GetTokenPreProgrammedDistributionsResponseV0 { + message TokenDistributionEntry { + bytes recipient_id = 1; + uint64 amount = 2; + } + + message TokenTimedDistributionEntry { + uint64 timestamp = 1; + repeated TokenDistributionEntry distributions = 2; + } + + message TokenDistributions { + repeated TokenTimedDistributionEntry token_distributions = 1; + } + + oneof result { + TokenDistributions token_distributions = 1; + Proof proof = 2; + } + ResponseMetadata metadata = 3; + } + oneof version { + GetTokenPreProgrammedDistributionsResponseV0 v0 = 1; + } +} + message GetTokenTotalSupplyRequest { message GetTokenTotalSupplyRequestV0 { bytes token_id = 1; diff --git a/packages/dapi/test/unit/externalApis/drive/fetchProofForStateTransitionFactory.spec.js b/packages/dapi/test/unit/externalApis/drive/fetchProofForStateTransitionFactory.spec.js index 91376c94c95..23b86a94a66 100644 --- a/packages/dapi/test/unit/externalApis/drive/fetchProofForStateTransitionFactory.spec.js +++ b/packages/dapi/test/unit/externalApis/drive/fetchProofForStateTransitionFactory.spec.js @@ -13,6 +13,8 @@ const { default: loadWasmDpp, DashPlatformProtocol, StateTransitionTypes } = req const generateRandomIdentifierAsync = require('@dashevo/wasm-dpp/lib/test/utils/generateRandomIdentifierAsync'); const getDocumentsFixture = require('@dashevo/wasm-dpp/lib/test/fixtures/getDocumentsFixture'); +const getBlsAdapterMock = require('@dashevo/wasm-dpp/lib/test/mocks/getBlsAdapterMock'); +const createStateRepositoryMock = require('@dashevo/wasm-dpp/lib/test/mocks/createStateRepositoryMock'); const fetchProofForStateTransitionFactory = require('../../../../lib/externalApis/drive/fetchProofForStateTransitionFactory'); const getBlsAdapterMock = require('@dashevo/wasm-dpp/lib/test/mocks/getBlsAdapterMock'); const createStateRepositoryMock = require('@dashevo/wasm-dpp/lib/test/mocks/createStateRepositoryMock'); @@ -102,7 +104,7 @@ describe('fetchProofForStateTransition', () => { .equal(dataContractsProofResponse.serializeBinary()); }); - it('should fetch documents proofs', async function it() { + it('should fetch documents proofs', async () => { const documents = await getDocumentsFixture(); const identityId = documents[0].getOwnerId(); diff --git a/packages/js-dapi-client/lib/methods/platform/getIdentityKeys/getIdentityKeysFactory.js b/packages/js-dapi-client/lib/methods/platform/getIdentityKeys/getIdentityKeysFactory.js index 68b20db334e..4bc32a03a65 100644 --- a/packages/js-dapi-client/lib/methods/platform/getIdentityKeys/getIdentityKeysFactory.js +++ b/packages/js-dapi-client/lib/methods/platform/getIdentityKeys/getIdentityKeysFactory.js @@ -4,10 +4,14 @@ const { GetIdentityKeysRequest, KeyRequestType, SpecificKeys, + AllKeys, }, } = require('@dashevo/dapi-grpc'); + const { UInt32Value } = require('google-protobuf/google/protobuf/wrappers_pb'); +const { GetIdentityKeysRequestV0 } = GetIdentityKeysRequest; + const GetIdentityKeysResponse = require('./GetIdentityKeysResponse'); const InvalidResponseError = require('../response/errors/InvalidResponseError'); @@ -20,25 +24,30 @@ function getIdentityKeysFactory(grpcTransport) { * Fetch the version upgrade votes status * @typedef {getIdentityKeys} * @param {Buffer} identityId - * @param {number[]} keyIds + * @param {number[]=} keyIds * @param {number} limit * @param {DAPIClientOptions & {prove: boolean}} [options] * @returns {Promise} */ async function getIdentityKeys(identityId, keyIds, limit = 100, options = {}) { - const { GetIdentityKeysRequestV0 } = GetIdentityKeysRequest; - const getIdentityKeysRequest = new GetIdentityKeysRequest(); - if (Buffer.isBuffer(identityId)) { // eslint-disable-next-line no-param-reassign identityId = Buffer.from(identityId); } + const getIdentityKeysRequest = new GetIdentityKeysRequest(); + const requestType = new KeyRequestType(); + + if (keyIds) { + requestType.setSpecificKeys(new SpecificKeys().setKeyIdsList(keyIds)); + } else { + requestType.setAllKeys(new AllKeys()); + } + getIdentityKeysRequest.setV0( new GetIdentityKeysRequestV0() .setIdentityId(identityId) - .setRequestType(new KeyRequestType() - .setSpecificKeys(new SpecificKeys().setKeyIdsList(keyIds))) + .setRequestType(requestType) .setLimit(new UInt32Value([limit])) .setProve(!!options.prove), ); diff --git a/packages/js-dapi-client/test/unit/methods/platform/getIdentityKeys/getIdentityKeysFactory.spec.js b/packages/js-dapi-client/test/unit/methods/platform/getIdentityKeys/getIdentityKeysFactory.spec.js index b1368ee41b9..6a99dc0e471 100644 --- a/packages/js-dapi-client/test/unit/methods/platform/getIdentityKeys/getIdentityKeysFactory.spec.js +++ b/packages/js-dapi-client/test/unit/methods/platform/getIdentityKeys/getIdentityKeysFactory.spec.js @@ -7,6 +7,7 @@ const { Proof: ProofResponse, KeyRequestType, SpecificKeys, + AllKeys, }, } = require('@dashevo/dapi-grpc'); const { UInt32Value } = require('google-protobuf/google/protobuf/wrappers_pb'); @@ -24,6 +25,7 @@ describe('getIdentityKeysFactory', () => { let getIdentityKeys; let options; let response; + let metadata; let keys; let identityId; let keyIds; @@ -42,7 +44,7 @@ describe('getIdentityKeysFactory', () => { metadataFixture = getMetadataFixture(); proofFixture = getProofFixture(); - const metadata = new ResponseMetadata(); + metadata = new ResponseMetadata(); metadata.setHeight(metadataFixture.height); metadata.setCoreChainLockedHeight(metadataFixture.coreChainLockedHeight); metadata.setTimeMs(metadataFixture.timeMs); @@ -74,8 +76,14 @@ describe('getIdentityKeysFactory', () => { }; }); - it('should return identity keys', async () => { - const result = await getIdentityKeys(identityId, keyIds, limit, options); + it('should return specific identity keys', async () => { + response.setV0( + new GetIdentityKeysResponseV0() + .setKeys(new Keys().setKeysBytesList([keys[0]])) + .setMetadata(metadata), + ); + + const result = await getIdentityKeys(identityId, [keyIds[0]], limit, options); const { GetIdentityKeysRequestV0 } = GetIdentityKeysRequest; const request = new GetIdentityKeysRequest(); @@ -83,7 +91,37 @@ describe('getIdentityKeysFactory', () => { new GetIdentityKeysRequestV0() .setIdentityId(identityId) .setRequestType(new KeyRequestType().setSpecificKeys(new SpecificKeys() - .setKeyIdsList(keyIds))) + .setKeyIdsList([keyIds[0]]))) + .setLimit(new UInt32Value([limit])) + .setProve(false), + ); + + expect(grpcTransportMock.request).to.be.calledOnceWithExactly( + PlatformPromiseClient, + 'getIdentityKeys', + request, + options, + ); + expect(result.getIdentityKeys()).to.deep.equal([keys[0]]); + expect(result.getMetadata()).to.deep.equal(metadataFixture); + expect(result.getProof()).to.equal(undefined); + }); + + it('should return all identity keys', async () => { + response.setV0( + new GetIdentityKeysResponseV0() + .setKeys(new Keys().setKeysBytesList(keys)) + .setMetadata(metadata), + ); + + const result = await getIdentityKeys(identityId, null, limit, options); + + const { GetIdentityKeysRequestV0 } = GetIdentityKeysRequest; + const request = new GetIdentityKeysRequest(); + request.setV0( + new GetIdentityKeysRequestV0() + .setIdentityId(identityId) + .setRequestType(new KeyRequestType().setAllKeys(new AllKeys())) .setLimit(new UInt32Value([limit])) .setProve(false), ); diff --git a/packages/rs-dpp/src/data_contract/associated_token/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/mod.rs index ac8095f7293..099f3e29b6f 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/mod.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/mod.rs @@ -1,6 +1,7 @@ pub mod token_configuration; pub mod token_configuration_convention; pub mod token_configuration_item; +pub mod token_distribution_key; pub mod token_distribution_rules; pub mod token_perpetual_distribution; pub mod token_pre_programmed_distribution; diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_distribution_key.rs b/packages/rs-dpp/src/data_contract/associated_token/token_distribution_key.rs new file mode 100644 index 00000000000..e3ae314754b --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_distribution_key.rs @@ -0,0 +1,31 @@ +use crate::data_contract::associated_token::token_perpetual_distribution::distribution_recipient::TokenDistributionRecipient; +use crate::errors::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use platform_value::Identifier; +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq)] +pub enum DistributionType { + PreProgrammed, + Perpetual, +} + +#[derive( + Serialize, + Deserialize, + Decode, + Encode, + PlatformSerialize, + PlatformDeserialize, + Debug, + Clone, + PartialEq, + Eq, +)] +#[platform_serialize(unversioned)] +pub struct TokenDistributionKey { + pub token_id: Identifier, + pub recipient: TokenDistributionRecipient, + pub distribution_type: DistributionType, +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_function/encode.rs b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_function/encode.rs index 80ca17b4fab..2d693dd8ae8 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_function/encode.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_function/encode.rs @@ -3,6 +3,14 @@ use crate::data_contract::associated_token::token_perpetual_distribution::distri use bincode::{BorrowDecode, Decode, Encode}; use ordered_float::NotNan; +/// Helper function to decode a `NotNan` safely. +fn decode_not_nan( + decoder: &mut D, +) -> Result, bincode::error::DecodeError> { + NotNan::new(f64::decode(decoder)?) + .map_err(|_| bincode::error::DecodeError::OtherString("Invalid float: NaN".into())) +} + // Implement Encode for DistributionFunction impl Encode for DistributionFunction { fn encode( @@ -10,42 +18,56 @@ impl Encode for DistributionFunction { encoder: &mut E, ) -> Result<(), bincode::error::EncodeError> { match self { + DistributionFunction::FixedAmount { n } => { + 0u8.encode(encoder)?; + n.encode(encoder)?; + } + DistributionFunction::StepDecreasingAmount { + step_count, + decrease_per_interval, + n, + } => { + 1u8.encode(encoder)?; + step_count.encode(encoder)?; + decrease_per_interval.into_inner().encode(encoder)?; + n.encode(encoder)?; + } DistributionFunction::LinearInteger { a, b } => { - 0u8.encode(encoder)?; // Variant index for LinearInteger + 2u8.encode(encoder)?; a.encode(encoder)?; b.encode(encoder)?; } DistributionFunction::LinearFloat { a, b } => { - 1u8.encode(encoder)?; // Variant index for LinearFloat - a.into_inner().encode(encoder)?; // Encode the NotNan value as f64 + 3u8.encode(encoder)?; + a.into_inner().encode(encoder)?; b.encode(encoder)?; } DistributionFunction::PolynomialInteger { a, n, b } => { - 2u8.encode(encoder)?; // Variant index for PolynomialInteger + 4u8.encode(encoder)?; a.encode(encoder)?; n.encode(encoder)?; b.encode(encoder)?; } DistributionFunction::PolynomialFloat { a, n, b } => { - 3u8.encode(encoder)?; // Variant index for PolynomialFloat + 5u8.encode(encoder)?; a.into_inner().encode(encoder)?; n.into_inner().encode(encoder)?; b.encode(encoder)?; } DistributionFunction::Exponential { a, b, c } => { - 4u8.encode(encoder)?; // Variant index for Exponential + 6u8.encode(encoder)?; a.into_inner().encode(encoder)?; b.into_inner().encode(encoder)?; c.encode(encoder)?; } DistributionFunction::Logarithmic { a, b, c } => { - 5u8.encode(encoder)?; // Variant index for Logarithmic + 7u8.encode(encoder)?; a.into_inner().encode(encoder)?; b.into_inner().encode(encoder)?; c.encode(encoder)?; } DistributionFunction::Stepwise(steps) => { - 6u8.encode(encoder)?; // Variant index for Stepwise + 8u8.encode(encoder)?; steps.encode(encoder)?; } } @@ -61,54 +83,54 @@ impl Decode for DistributionFunction { let variant = u8::decode(decoder)?; match variant { 0 => { + let n = TokenAmount::decode(decoder)?; + Ok(Self::FixedAmount { n }) + } + 1 => { + let step_count = u64::decode(decoder)?; + let decrease_per_interval = decode_not_nan(decoder)?; + let n = TokenAmount::decode(decoder)?; + Ok(Self::StepDecreasingAmount { + step_count, + decrease_per_interval, + n, + }) + } + 2 => { let a = i64::decode(decoder)?; let b = SignedTokenAmount::decode(decoder)?; Ok(Self::LinearInteger { a, b }) } - 1 => { - let a = NotNan::new(f64::decode(decoder)?).map_err(|_| { - bincode::error::DecodeError::OtherString("Invalid float: NaN".into()) - })?; + 3 => { + let a = decode_not_nan(decoder)?; let b = SignedTokenAmount::decode(decoder)?; Ok(Self::LinearFloat { a, b }) } - 2 => { + 4 => { let a = i64::decode(decoder)?; let n = i64::decode(decoder)?; let b = SignedTokenAmount::decode(decoder)?; Ok(Self::PolynomialInteger { a, n, b }) } - 3 => { - let a = NotNan::new(f64::decode(decoder)?).map_err(|_| { - bincode::error::DecodeError::OtherString("Invalid float: NaN".into()) - })?; - let n = NotNan::new(f64::decode(decoder)?).map_err(|_| { - bincode::error::DecodeError::OtherString("Invalid float: NaN".into()) - })?; + 5 => { + let a = decode_not_nan(decoder)?; + let n = decode_not_nan(decoder)?; let b = SignedTokenAmount::decode(decoder)?; Ok(Self::PolynomialFloat { a, n, b }) } - 4 => { - let a = NotNan::new(f64::decode(decoder)?).map_err(|_| { - bincode::error::DecodeError::OtherString("Invalid float: NaN".into()) - })?; - let b = NotNan::new(f64::decode(decoder)?).map_err(|_| { - bincode::error::DecodeError::OtherString("Invalid float: NaN".into()) - })?; + 6 => { + let a = decode_not_nan(decoder)?; + let b = decode_not_nan(decoder)?; let c = SignedTokenAmount::decode(decoder)?; Ok(Self::Exponential { a, b, c }) } - 5 => { - let a = NotNan::new(f64::decode(decoder)?).map_err(|_| { - bincode::error::DecodeError::OtherString("Invalid float: NaN".into()) - })?; - let b = NotNan::new(f64::decode(decoder)?).map_err(|_| { - bincode::error::DecodeError::OtherString("Invalid float: NaN".into()) - })?; + 7 => { + let a = decode_not_nan(decoder)?; + let b = decode_not_nan(decoder)?; let c = SignedTokenAmount::decode(decoder)?; Ok(Self::Logarithmic { a, b, c }) } - 6 => { + 8 => { let steps = Vec::<(u64, TokenAmount)>::decode(decoder)?; Ok(Self::Stepwise(steps)) } @@ -119,60 +141,67 @@ impl Decode for DistributionFunction { } } +// Implement BorrowDecode for DistributionFunction impl<'de> BorrowDecode<'de> for DistributionFunction { fn borrow_decode>( decoder: &mut D, ) -> Result { - let variant = u8::borrow_decode(decoder)?; // Decode the variant tag - + let variant = u8::borrow_decode(decoder)?; match variant { 0 => { - let a = i64::borrow_decode(decoder)?; - let b = SignedTokenAmount::borrow_decode(decoder)?; - Ok(DistributionFunction::LinearInteger { a, b }) + let n = TokenAmount::borrow_decode(decoder)?; + Ok(Self::FixedAmount { n }) } 1 => { - let a = NotNan::::new(f64::borrow_decode(decoder)?) - .map_err(|e| bincode::error::DecodeError::OtherString(e.to_string()))?; - let b = SignedTokenAmount::borrow_decode(decoder)?; - Ok(DistributionFunction::LinearFloat { a, b }) + let step_count = u64::borrow_decode(decoder)?; + let decrease_per_interval = decode_not_nan(decoder)?; + let n = TokenAmount::borrow_decode(decoder)?; + Ok(Self::StepDecreasingAmount { + step_count, + decrease_per_interval, + n, + }) } 2 => { let a = i64::borrow_decode(decoder)?; - let n = i64::borrow_decode(decoder)?; let b = SignedTokenAmount::borrow_decode(decoder)?; - Ok(DistributionFunction::PolynomialInteger { a, n, b }) + Ok(Self::LinearInteger { a, b }) } 3 => { - let a = NotNan::::new(f64::borrow_decode(decoder)?) - .map_err(|e| bincode::error::DecodeError::OtherString(e.to_string()))?; - let n = NotNan::::new(f64::borrow_decode(decoder)?) - .map_err(|e| bincode::error::DecodeError::OtherString(e.to_string()))?; + let a = decode_not_nan(decoder)?; let b = SignedTokenAmount::borrow_decode(decoder)?; - Ok(DistributionFunction::PolynomialFloat { a, n, b }) + Ok(Self::LinearFloat { a, b }) } 4 => { - let a = NotNan::::new(f64::borrow_decode(decoder)?) - .map_err(|e| bincode::error::DecodeError::OtherString(e.to_string()))?; - let b = NotNan::::new(f64::borrow_decode(decoder)?) - .map_err(|e| bincode::error::DecodeError::OtherString(e.to_string()))?; - let c = SignedTokenAmount::borrow_decode(decoder)?; - Ok(DistributionFunction::Exponential { a, b, c }) + let a = i64::borrow_decode(decoder)?; + let n = i64::borrow_decode(decoder)?; + let b = SignedTokenAmount::borrow_decode(decoder)?; + Ok(Self::PolynomialInteger { a, n, b }) } 5 => { - let a = NotNan::::new(f64::borrow_decode(decoder)?) - .map_err(|e| bincode::error::DecodeError::OtherString(e.to_string()))?; - let b = NotNan::::new(f64::borrow_decode(decoder)?) - .map_err(|e| bincode::error::DecodeError::OtherString(e.to_string()))?; - let c = SignedTokenAmount::borrow_decode(decoder)?; - Ok(DistributionFunction::Logarithmic { a, b, c }) + let a = decode_not_nan(decoder)?; + let n = decode_not_nan(decoder)?; + let b = SignedTokenAmount::borrow_decode(decoder)?; + Ok(Self::PolynomialFloat { a, n, b }) } 6 => { + let a = decode_not_nan(decoder)?; + let b = decode_not_nan(decoder)?; + let c = SignedTokenAmount::borrow_decode(decoder)?; + Ok(Self::Exponential { a, b, c }) + } + 7 => { + let a = decode_not_nan(decoder)?; + let b = decode_not_nan(decoder)?; + let c = SignedTokenAmount::borrow_decode(decoder)?; + Ok(Self::Logarithmic { a, b, c }) + } + 8 => { let steps = Vec::<(u64, TokenAmount)>::borrow_decode(decoder)?; - Ok(DistributionFunction::Stepwise(steps)) + Ok(Self::Stepwise(steps)) } _ => Err(bincode::error::DecodeError::OtherString( - "Invalid variant tag for DistributionFunction".to_string(), + "Invalid variant".into(), )), } } diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_function/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_function/mod.rs index 1fa7af8bf20..134f906cf00 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_function/mod.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_function/mod.rs @@ -7,6 +7,37 @@ mod encode; #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, PartialOrd)] pub enum DistributionFunction { + /// A fixed amount of tokens is emitted for each period in the reward distribution type. + /// + /// # Formula + /// - `f(x) = n` + /// + /// # Use Case + /// - Simplicity + /// - Stable reward emissions + /// + /// # Example + /// - If we emit 5 tokens per block, and 3 blocks have passed, the `Release` call will release 15 tokens. + FixedAmount { n: TokenAmount }, + + /// The amount of tokens decreases in predefined steps at fixed intervals. + /// + /// # Formula + /// - `f(x) = n * (1 - decrease_per_interval)^(x / step_count)` + /// + /// # Use Case + /// - Mimics Bitcoin and Dash Core emission models + /// - Encourages early participation by providing higher rewards initially + /// + /// # Example + /// - Bitcoin: A 50% decrease every 210,000 blocks (~4 years) + /// - Dash: A ~7% decrease every 210,000 blocks (~1 year) + StepDecreasingAmount { + step_count: u64, + decrease_per_interval: NotNan, + n: TokenAmount, + }, + /// A linear function emits tokens in increasing or decreasing amounts over time (integer precision). /// /// # Formula @@ -145,6 +176,22 @@ pub enum DistributionFunction { impl fmt::Display for DistributionFunction { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { + DistributionFunction::FixedAmount { n } => { + write!(f, "FixedAmount: {} tokens per period", n) + } + DistributionFunction::StepDecreasingAmount { + step_count, + decrease_per_interval, + n, + } => { + write!( + f, + "StepDecreasingAmount: {} tokens, decreasing by {:.3}% every {} steps", + n, + decrease_per_interval.into_inner() * 100.0, + step_count + ) + } DistributionFunction::LinearInteger { a, b } => { write!(f, "LinearInteger: f(x) = {} * x + {}", a, b) } diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_recipient.rs b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_recipient.rs new file mode 100644 index 00000000000..1244588c6ae --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_recipient.rs @@ -0,0 +1,31 @@ +use bincode::{Decode, Encode}; +use platform_value::Identifier; +use serde::{Deserialize, Serialize}; +use std::fmt; + +#[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, Copy, PartialEq, Eq, PartialOrd)] +pub enum TokenDistributionRecipient { + /// Distribute to the contract Owner + ContractOwner, + /// Distribute to a single identity + Identity(Identifier), + /// Distribute tokens by participation + /// This distribution can only happen when choosing epoch based distribution + EvonodesByParticipation, +} + +impl fmt::Display for TokenDistributionRecipient { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + TokenDistributionRecipient::ContractOwner => { + write!(f, "ContractOwner") + } + TokenDistributionRecipient::Identity(identifier) => { + write!(f, "Identity({})", identifier) + } + TokenDistributionRecipient::EvonodesByParticipation => { + write!(f, "EvonodesByParticipation") + } + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/methods/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/methods/mod.rs new file mode 100644 index 00000000000..027fc1ccf13 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/methods/mod.rs @@ -0,0 +1,44 @@ +use v0::TokenPerpetualDistributionV0Methods; +use crate::block::block_info::BlockInfo; +use crate::data_contract::associated_token::token_perpetual_distribution::distribution_recipient::TokenDistributionRecipient; +use crate::data_contract::associated_token::token_perpetual_distribution::methods::v0::TokenPerpetualDistributionV0Accessors; +use crate::data_contract::associated_token::token_perpetual_distribution::reward_distribution_type::RewardDistributionType; +use crate::data_contract::associated_token::token_perpetual_distribution::TokenPerpetualDistribution; + +pub mod v0; + +impl TokenPerpetualDistributionV0Accessors for TokenPerpetualDistribution { + fn distribution_type(&self) -> &RewardDistributionType { + match self { + TokenPerpetualDistribution::V0(v0) => &v0.distribution_type, + } + } + + fn set_distribution_type(&mut self, distribution_type: RewardDistributionType) { + match self { + TokenPerpetualDistribution::V0(v0) => v0.distribution_type = distribution_type, + } + } + + fn distribution_recipient(&self) -> TokenDistributionRecipient { + match self { + TokenPerpetualDistribution::V0(v0) => v0.distribution_recipient, + } + } + + fn set_distribution_recipient(&mut self, distribution_recipient: TokenDistributionRecipient) { + match self { + TokenPerpetualDistribution::V0(v0) => { + v0.distribution_recipient = distribution_recipient + } + } + } +} + +impl TokenPerpetualDistributionV0Methods for TokenPerpetualDistribution { + fn next_interval(&self, block_info: &BlockInfo) -> u64 { + match self { + TokenPerpetualDistribution::V0(v0) => v0.next_interval(block_info), + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/methods/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/methods/v0/mod.rs new file mode 100644 index 00000000000..367f5c4a9d7 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/methods/v0/mod.rs @@ -0,0 +1,25 @@ +use crate::block::block_info::BlockInfo; +use crate::data_contract::associated_token::token_perpetual_distribution::distribution_recipient::TokenDistributionRecipient; +use crate::data_contract::associated_token::token_perpetual_distribution::reward_distribution_type::RewardDistributionType; + +/// Accessor trait for `TokenPerpetualDistribution`, providing getter and setter methods +/// for its distribution type and recipient. +pub trait TokenPerpetualDistributionV0Accessors { + /// Gets the distribution type used in the token distribution. + fn distribution_type(&self) -> &RewardDistributionType; + + /// Sets the distribution type for the token distribution. + fn set_distribution_type(&mut self, distribution_type: RewardDistributionType); + + /// Gets the distribution recipient for the token distribution. + fn distribution_recipient(&self) -> TokenDistributionRecipient; + + /// Sets the distribution recipient for the token distribution. + fn set_distribution_recipient(&mut self, distribution_recipient: TokenDistributionRecipient); +} + +/// Methods trait for `TokenPerpetualDistribution` +pub trait TokenPerpetualDistributionV0Methods { + /// we use u64 as a catch-all for any type of interval we might have, eg time, block or epoch + fn next_interval(&self, block_info: &BlockInfo) -> u64; +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/mod.rs index da47067ff2c..758ec8b3881 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/mod.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/mod.rs @@ -1,14 +1,33 @@ use crate::data_contract::associated_token::token_perpetual_distribution::v0::TokenPerpetualDistributionV0; +use crate::errors::ProtocolError; use bincode::{Decode, Encode}; use derive_more::From; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; use serde::{Deserialize, Serialize}; use std::fmt; pub mod distribution_function; +pub mod distribution_recipient; +pub mod methods; +pub mod reward_distribution_type; pub mod v0; -#[derive(Serialize, Deserialize, Encode, Decode, Debug, Clone, PartialEq, Eq, PartialOrd, From)] +#[derive( + Serialize, + Deserialize, + Encode, + Decode, + PlatformSerialize, + PlatformDeserialize, + Debug, + Clone, + PartialEq, + Eq, + PartialOrd, + From, +)] #[serde(tag = "$format_version")] +#[platform_serialize(unversioned)] pub enum TokenPerpetualDistribution { #[serde(rename = "0")] V0(TokenPerpetualDistributionV0), diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/reward_distribution_type/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/reward_distribution_type/mod.rs new file mode 100644 index 00000000000..c95f8b0d0af --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/reward_distribution_type/mod.rs @@ -0,0 +1,44 @@ +use crate::balances::credits::TokenAmount; +use crate::data_contract::associated_token::token_perpetual_distribution::distribution_function::DistributionFunction; +use crate::prelude::{BlockHeightInterval, EpochInterval, TimestampMillisInterval}; +use bincode::{Decode, Encode}; +use serde::{Deserialize, Serialize}; +use std::fmt; + +#[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq, PartialOrd)] +pub enum RewardDistributionType { + /// An amount of tokens is emitted every n blocks + BlockBasedDistribution(BlockHeightInterval, TokenAmount, DistributionFunction), + /// An amount of tokens is emitted every amount of time given + TimeBasedDistribution(TimestampMillisInterval, TokenAmount, DistributionFunction), + /// An amount of tokens is emitted every amount of epochs + EpochBasedDistribution(EpochInterval, TokenAmount, DistributionFunction), +} + +impl fmt::Display for RewardDistributionType { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + RewardDistributionType::BlockBasedDistribution(interval, amount, function) => { + write!( + f, + "BlockBasedDistribution: {} tokens every {} blocks using {}", + amount, interval, function + ) + } + RewardDistributionType::TimeBasedDistribution(interval, amount, function) => { + write!( + f, + "TimeBasedDistribution: {} tokens every {} milliseconds using {}", + amount, interval, function + ) + } + RewardDistributionType::EpochBasedDistribution(interval, amount, function) => { + write!( + f, + "EpochBasedDistribution: {} tokens every {} epochs using {}", + amount, interval, function + ) + } + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/v0/methods.rs b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/v0/methods.rs new file mode 100644 index 00000000000..9a321c593f2 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/v0/methods.rs @@ -0,0 +1,26 @@ +use crate::block::block_info::BlockInfo; +use crate::data_contract::associated_token::token_perpetual_distribution::methods::v0::TokenPerpetualDistributionV0Methods; +use crate::data_contract::associated_token::token_perpetual_distribution::reward_distribution_type::RewardDistributionType; +use crate::data_contract::associated_token::token_perpetual_distribution::v0::TokenPerpetualDistributionV0; + +impl TokenPerpetualDistributionV0Methods for TokenPerpetualDistributionV0 { + fn next_interval(&self, block_info: &BlockInfo) -> u64 { + match self.distribution_type { + // If the distribution is based on block height, return the next height where emissions occur. + RewardDistributionType::BlockBasedDistribution(interval, _, _) => { + (block_info.height - block_info.height % interval).saturating_add(interval) + } + + // If the distribution is based on time, return the next timestamp in milliseconds. + RewardDistributionType::TimeBasedDistribution(interval, _, _) => { + (block_info.time_ms - block_info.time_ms % interval).saturating_add(interval) + } + + // If the distribution is based on epochs, return the next epoch index. + RewardDistributionType::EpochBasedDistribution(interval, _, _) => { + (block_info.epoch.index - block_info.epoch.index % interval) + .saturating_add(interval) as u64 + } + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/v0/mod.rs index 81d9bfa39e0..004782c876f 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/v0/mod.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/v0/mod.rs @@ -1,81 +1,27 @@ -use crate::balances::credits::TokenAmount; -use crate::data_contract::associated_token::token_perpetual_distribution::distribution_function::DistributionFunction; -use crate::prelude::{BlockHeightInterval, EpochInterval, TimestampMillisInterval}; -use bincode::Encode; -use platform_serialization::de::Decode; +mod methods; + +use bincode::{Encode, Decode}; use serde::{Deserialize, Serialize}; use std::fmt; - -pub type BaseTokenAmount = TokenAmount; - -#[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq, PartialOrd)] -pub enum RewardDistributionType { - /// A fixed amount of tokens is emitted every n blocks - BlockFixed(BlockHeightInterval, TokenAmount), - /// A fixed amount of tokens is emitted every amount of time given - TimeFixed(TimestampMillisInterval, TokenAmount), - /// A fixed amount of tokens is emitted every amount of epochs - EpochFixed(EpochInterval, TokenAmount), - /// A variable amount of tokens is emitted every amount of time given - TimeVariable( - TimestampMillisInterval, - BaseTokenAmount, - DistributionFunction, - ), - /// A variable amount of tokens is emitted every amount of epochs - EpochVariable(EpochInterval, BaseTokenAmount, DistributionFunction), -} +use crate::data_contract::associated_token::token_perpetual_distribution::distribution_recipient::TokenDistributionRecipient; +use crate::data_contract::associated_token::token_perpetual_distribution::reward_distribution_type::RewardDistributionType; #[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq, PartialOrd)] #[serde(rename_all = "camelCase")] pub struct TokenPerpetualDistributionV0 { /// The distribution type that the token will use pub distribution_type: RewardDistributionType, - /// Is the release of the token automatic if the owner id has enough balance? - pub automatic_release: bool, -} - -impl fmt::Display for RewardDistributionType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - RewardDistributionType::BlockFixed(interval, amount) => { - write!(f, "BlockFixed: {} tokens every {} blocks", amount, interval) - } - RewardDistributionType::TimeFixed(interval, amount) => { - write!( - f, - "TimeFixed: {} tokens every {} milliseconds", - amount, interval - ) - } - RewardDistributionType::EpochFixed(interval, amount) => { - write!(f, "EpochFixed: {} tokens every {} epochs", amount, interval) - } - RewardDistributionType::TimeVariable(interval, base_amount, function) => { - write!( - f, - "TimeVariable: Base {} tokens with function {} every {} milliseconds", - base_amount, function, interval - ) - } - RewardDistributionType::EpochVariable(interval, base_amount, function) => { - write!( - f, - "EpochVariable: Base {} tokens with function {} every {} epochs", - base_amount, function, interval - ) - } - } - } + /// The recipient type + pub distribution_recipient: TokenDistributionRecipient, } impl fmt::Display for TokenPerpetualDistributionV0 { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( f, - "TokenPerpetualDistributionV0 {{\n distribution_type: {},\n automatic_release: {}\n}}", + "TokenPerpetualDistribution {{\n distribution_type: {},\n distribution_recipient: {}\n}}", self.distribution_type, - self.automatic_release + self.distribution_recipient, ) } } diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_pre_programmed_distribution/methods/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_pre_programmed_distribution/methods/mod.rs new file mode 100644 index 00000000000..0cd2875602a --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_pre_programmed_distribution/methods/mod.rs @@ -0,0 +1,41 @@ +use crate::balances::credits::TokenAmount; +use crate::data_contract::associated_token::token_pre_programmed_distribution::TokenPreProgrammedDistribution; +use crate::prelude::TimestampMillis; +use platform_value::Identifier; +use std::collections::BTreeMap; +use v0::TokenPreProgrammedDistributionV0Methods; + +pub mod v0; + +impl TokenPreProgrammedDistributionV0Methods for TokenPreProgrammedDistribution { + fn distributions(&self) -> &BTreeMap> { + match self { + TokenPreProgrammedDistribution::V0(v0) => &v0.distributions, + } + } + + fn set_distributions( + &mut self, + distributions: BTreeMap>, + ) { + match self { + TokenPreProgrammedDistribution::V0(v0) => v0.distributions = distributions, + } + } + + fn add_distribution( + &mut self, + time: TimestampMillis, + recipient: Identifier, + amount: TokenAmount, + ) { + match self { + TokenPreProgrammedDistribution::V0(v0) => { + v0.distributions + .entry(time) + .or_default() + .insert(recipient, amount); + } + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_pre_programmed_distribution/methods/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_pre_programmed_distribution/methods/v0/mod.rs new file mode 100644 index 00000000000..b93778844d0 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_pre_programmed_distribution/methods/v0/mod.rs @@ -0,0 +1,24 @@ +use crate::balances::credits::TokenAmount; +use crate::prelude::TimestampMillis; +use platform_value::Identifier; +use std::collections::BTreeMap; + +/// Trait for managing pre-programmed token distributions. +pub trait TokenPreProgrammedDistributionV0Methods { + /// Gets the scheduled token distributions. + fn distributions(&self) -> &BTreeMap>; + + /// Sets the scheduled token distributions. + fn set_distributions( + &mut self, + distributions: BTreeMap>, + ); + + /// Adds a new token distribution for a recipient at a specific time. + fn add_distribution( + &mut self, + time: TimestampMillis, + recipient: Identifier, + amount: TokenAmount, + ); +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_pre_programmed_distribution/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_pre_programmed_distribution/mod.rs index 8ade8f657a9..2edbf6ac4f0 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_pre_programmed_distribution/mod.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_pre_programmed_distribution/mod.rs @@ -4,6 +4,7 @@ use derive_more::From; use serde::{Deserialize, Serialize}; use std::fmt; +pub mod methods; pub mod v0; #[derive(Serialize, Deserialize, Encode, Decode, Debug, Clone, PartialEq, Eq, From)] diff --git a/packages/rs-dpp/src/errors/consensus/codes.rs b/packages/rs-dpp/src/errors/consensus/codes.rs index 9f1d7b7c626..fa1583ea088 100644 --- a/packages/rs-dpp/src/errors/consensus/codes.rs +++ b/packages/rs-dpp/src/errors/consensus/codes.rs @@ -254,6 +254,7 @@ impl ErrorWithCode for StateError { Self::NewAuthorizedActionTakerGroupDoesNotExistError(_) => 40158, Self::NewAuthorizedActionTakerMainGroupNotSetError(_) => 40159, Self::InvalidGroupPositionError(_) => 40160, + Self::TokenIsPausedError(_) => 40161, // Identity Errors: 40200-40299 Self::IdentityAlreadyExistsError(_) => 40200, diff --git a/packages/rs-dpp/src/errors/consensus/state/state_error.rs b/packages/rs-dpp/src/errors/consensus/state/state_error.rs index e76d6b2c5b3..d373725981b 100644 --- a/packages/rs-dpp/src/errors/consensus/state/state_error.rs +++ b/packages/rs-dpp/src/errors/consensus/state/state_error.rs @@ -52,6 +52,7 @@ use crate::consensus::state::voting::vote_poll_not_available_for_voting_error::V use crate::consensus::state::voting::vote_poll_not_found_error::VotePollNotFoundError; use super::document::document_timestamps_are_equal_error::DocumentTimestampsAreEqualError; +use super::token::TokenIsPausedError; #[derive( Error, Debug, PartialEq, Encode, Decode, PlatformSerialize, PlatformDeserialize, Clone, @@ -255,6 +256,9 @@ pub enum StateError { #[error(transparent)] InvalidGroupPositionError(InvalidGroupPositionError), + + #[error(transparent)] + TokenIsPausedError(TokenIsPausedError), } impl From for ConsensusError { diff --git a/packages/rs-dpp/src/errors/consensus/state/token/mod.rs b/packages/rs-dpp/src/errors/consensus/state/token/mod.rs index f28964addf7..9c2a5401ae8 100644 --- a/packages/rs-dpp/src/errors/consensus/state/token/mod.rs +++ b/packages/rs-dpp/src/errors/consensus/state/token/mod.rs @@ -6,6 +6,7 @@ mod new_authorized_action_taker_group_does_not_exist_error; mod new_authorized_action_taker_identity_does_not_exist_error; mod new_authorized_action_taker_main_group_not_set_error; mod new_tokens_destination_identity_does_not_exist_error; +mod token_is_paused_error; mod token_mint_past_max_supply_error; mod token_setting_max_supply_to_less_than_current_supply_error; mod unauthorized_token_action_error; @@ -18,6 +19,7 @@ pub use new_authorized_action_taker_group_does_not_exist_error::*; pub use new_authorized_action_taker_identity_does_not_exist_error::*; pub use new_authorized_action_taker_main_group_not_set_error::*; pub use new_tokens_destination_identity_does_not_exist_error::*; +pub use token_is_paused_error::*; pub use token_mint_past_max_supply_error::*; pub use token_setting_max_supply_to_less_than_current_supply_error::*; pub use unauthorized_token_action_error::*; diff --git a/packages/rs-dpp/src/errors/consensus/state/token/token_is_paused_error.rs b/packages/rs-dpp/src/errors/consensus/state/token/token_is_paused_error.rs new file mode 100644 index 00000000000..5681940847f --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/state/token/token_is_paused_error.rs @@ -0,0 +1,32 @@ +use crate::consensus::state::state_error::StateError; +use crate::consensus::ConsensusError; +use crate::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use platform_value::Identifier; +use thiserror::Error; + +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error("Token {} is paused.", token_id)] +#[platform_serialize(unversioned)] +pub struct TokenIsPausedError { + token_id: Identifier, +} + +impl TokenIsPausedError { + pub fn new(token_id: Identifier) -> Self { + Self { token_id } + } + + pub fn token_id(&self) -> &Identifier { + &self.token_id + } +} + +impl From for ConsensusError { + fn from(err: TokenIsPausedError) -> Self { + Self::StateError(StateError::TokenIsPausedError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/state/token/unauthorized_token_action_error.rs b/packages/rs-dpp/src/errors/consensus/state/token/unauthorized_token_action_error.rs index a1275eb7fdf..ac5dca1ef05 100644 --- a/packages/rs-dpp/src/errors/consensus/state/token/unauthorized_token_action_error.rs +++ b/packages/rs-dpp/src/errors/consensus/state/token/unauthorized_token_action_error.rs @@ -11,11 +11,7 @@ use thiserror::Error; Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, )] #[error( - "Identity {} is not authorized to perform action: {} on token: {}. Authorized action takers: {:?}", - identity_id, - token_id, - action, - authorized_action_takers + "Identity {identity_id} is not authorized to perform action: {action} on token: {token_id}. Authorized action takers: {authorized_action_takers:?}", )] #[platform_serialize(unversioned)] pub struct UnauthorizedTokenActionError { diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transition.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transition.rs index 535f79932ee..e2b208afb66 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transition.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transition.rs @@ -120,7 +120,8 @@ pub trait DocumentTransitionV0Methods { fn get_dynamic_property(&self, path: &str) -> Option<&Value>; /// get the id fn get_id(&self) -> Identifier; - /// get the document type + /// get the entropy + fn entropy(&self) -> Option>; fn document_type_name(&self) -> &String; /// get the data contract id fn data_contract_id(&self) -> Identifier; @@ -177,6 +178,17 @@ impl DocumentTransitionV0Methods for DocumentTransition { self.base().document_type_name() } + fn entropy(&self) -> Option> { + match self { + DocumentTransition::Create(t) => Some(Vec::from(t.entropy())), + DocumentTransition::Replace(t) => None, + DocumentTransition::Delete(t) => None, + DocumentTransition::Transfer(t) => None, + DocumentTransition::UpdatePrice(t) => None, + DocumentTransition::Purchase(t) => None, + } + } + fn data_contract_id(&self) -> Identifier { self.base().data_contract_id() } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0/mod.rs index c27da679746..b7cb38400f1 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0/mod.rs @@ -7,9 +7,6 @@ use platform_value::Identifier; use serde::{Deserialize, Serialize}; use std::fmt; -mod property_names { - pub const AMOUNT: &str = "$amount"; -} /// The Identifier fields in [`TokenFreezeTransition`] pub use super::super::document_base_transition::IDENTIFIER_FIELDS; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0/mod.rs index abdf7892c53..a3e86da8d95 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0/mod.rs @@ -7,9 +7,6 @@ use platform_value::Identifier; use serde::{Deserialize, Serialize}; use std::fmt; -mod property_names { - pub const AMOUNT: &str = "$amount"; -} /// The Identifier fields in [`TokenUnfreezeTransition`] pub use super::super::document_base_transition::IDENTIFIER_FIELDS; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs index 7523e6d5f4e..9895e738b9e 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs @@ -17,10 +17,6 @@ use crate::identity::IdentityPublicKey; use crate::prelude::IdentityNonce; #[cfg(feature = "state-transition-signing")] use crate::prelude::UserFeeIncrease; -#[cfg(feature = "state-transition-signing")] -use crate::prelude::{ - DerivationEncryptionKeyIndex, RecipientKeyIndex, RootEncryptionKeyIndex, SenderKeyIndex, -}; use crate::state_transition::batch_transition::batched_transition::BatchedTransition; use crate::state_transition::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; use crate::state_transition::batch_transition::methods::v1::DocumentsBatchTransitionMethodsV1; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs index 75c9d8b5ca3..e68792f3316 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs @@ -9,10 +9,7 @@ use crate::identity::signer::Signer; #[cfg(feature = "state-transition-signing")] use crate::identity::IdentityPublicKey; #[cfg(feature = "state-transition-signing")] -use crate::prelude::{ - DerivationEncryptionKeyIndex, IdentityNonce, RecipientKeyIndex, RootEncryptionKeyIndex, - SenderKeyIndex, UserFeeIncrease, -}; +use crate::prelude::{IdentityNonce, UserFeeIncrease}; use crate::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; use crate::state_transition::batch_transition::token_transfer_transition::{ PrivateEncryptedNote, SharedEncryptedNote, diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs index fb46ee1fed7..eff8b16880a 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs @@ -12,10 +12,6 @@ use crate::prelude::IdentityNonce; use crate::prelude::IdentityPublicKey; #[cfg(feature = "state-transition-signing")] use crate::prelude::UserFeeIncrease; -#[cfg(feature = "state-transition-signing")] -use crate::prelude::{ - DerivationEncryptionKeyIndex, RecipientKeyIndex, RootEncryptionKeyIndex, SenderKeyIndex, -}; use crate::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; use crate::state_transition::batch_transition::batched_transition::{ BatchedTransition, BatchedTransitionMutRef, BatchedTransitionRef, diff --git a/packages/rs-dpp/src/tokens/token_event.rs b/packages/rs-dpp/src/tokens/token_event.rs index 5de7b5c8820..fa5675dc5af 100644 --- a/packages/rs-dpp/src/tokens/token_event.rs +++ b/packages/rs-dpp/src/tokens/token_event.rs @@ -5,8 +5,7 @@ use crate::data_contract::associated_token::token_configuration_item::TokenConfi use crate::data_contract::document_type::DocumentTypeRef; use crate::document::{Document, DocumentV0}; use crate::prelude::{ - DataContract, DerivationEncryptionKeyIndex, IdentityNonce, RecipientKeyIndex, - RootEncryptionKeyIndex, SenderKeyIndex, + DataContract, DerivationEncryptionKeyIndex, IdentityNonce, RootEncryptionKeyIndex, }; use bincode::{Decode, Encode}; use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; @@ -21,8 +20,8 @@ pub type TokenEventPersonalEncryptedNote = Option<( DerivationEncryptionKeyIndex, Vec, )>; -use crate::state_transition::batch_transition::token_transfer_transition::SharedEncryptedNote; use crate::serialization::PlatformSerializableWithPlatformVersion; +use crate::state_transition::batch_transition::token_transfer_transition::SharedEncryptedNote; use crate::tokens::emergency_action::TokenEmergencyAction; use crate::ProtocolError; diff --git a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs index a0537bbd1bd..1557075db17 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs @@ -24,7 +24,11 @@ use drive::drive::identity::withdrawals::paths::{ use drive::drive::prefunded_specialized_balances::prefunded_specialized_balances_for_voting_path_vec; use drive::drive::system::misc_path; use drive::drive::tokens::paths::{ - tokens_root_path, TOKEN_BALANCES_KEY, TOKEN_IDENTITY_INFO_KEY, TOKEN_STATUS_INFO_KEY, + token_distributions_root_path, token_timed_distributions_path, tokens_root_path, + TOKEN_BALANCES_KEY, TOKEN_BLOCK_TIMED_DISTRIBUTIONS_KEY, TOKEN_DISTRIBUTIONS_KEY, + TOKEN_EPOCH_TIMED_DISTRIBUTIONS_KEY, TOKEN_IDENTITY_INFO_KEY, TOKEN_MS_TIMED_DISTRIBUTIONS_KEY, + TOKEN_PERPETUAL_DISTRIBUTIONS_KEY, TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS_KEY, + TOKEN_STATUS_INFO_KEY, TOKEN_TIMED_DISTRIBUTIONS_KEY, }; use drive::drive::votes::paths::vote_end_date_queries_tree_path_vec; use drive::drive::RootTree; @@ -96,6 +100,100 @@ impl Platform { Ok(()) } + /// Initializes an empty sum tree for withdrawal transactions required for protocol version 4. + /// + /// This function is called during the transition to protocol version 4 to set up + /// an empty sum tree at the specified path if it does not already exist. + /// + /// # Parameters + /// + /// * `transaction`: A reference to the transaction context in which the changes should be applied. + /// * `platform_version`: The current platform version containing the updated protocol version and relevant configuration details. + /// + /// # Returns + /// + /// * `Ok(())`: If the transition to version 4 was successful. + /// * `Err(Error)`: If there was an issue creating or updating the necessary data structures. + fn transition_to_version_4( + &self, + platform_state: &PlatformState, + block_info: &BlockInfo, + transaction: &Transaction, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + // We are adding the withdrawal transactions sum amount tree + let path = get_withdrawal_root_path(); + self.drive.grove_insert_if_not_exists( + (&path).into(), + &WITHDRAWAL_TRANSACTIONS_SUM_AMOUNT_TREE_KEY, + Element::empty_sum_tree(), + Some(transaction), + None, + &platform_version.drive, + )?; + // We are adding a tree to store broadcasted transactions that might expire + self.drive.grove_insert_if_not_exists( + (&path).into(), + &WITHDRAWAL_TRANSACTIONS_BROADCASTED_KEY, + Element::empty_tree(), + Some(transaction), + None, + &platform_version.drive, + )?; + // We need to add all masternode owner keys + // This is because owner identities only had a withdrawal key + // But no owner key + for masternode in platform_state.full_masternode_list().values() { + let masternode_id = masternode.pro_tx_hash.to_byte_array(); + let key_request = IdentityKeysRequest { + identity_id: masternode_id, + request_type: KeyRequestType::AllKeys, + limit: None, + offset: None, + }; + + let old_owner_identity_keys = self + .drive + .fetch_identity_keys::( + key_request, + Some(transaction), + platform_version, + )?; + + if old_owner_identity_keys.is_empty() { + continue; + } + + let last_key_id = *old_owner_identity_keys + .keys() + .max() + .expect("there must be keys, we already checked"); + + let new_owner_key = Self::get_owner_identity_owner_key( + masternode.state.owner_address, + last_key_id + 1, + platform_version, + )?; + + tracing::trace!( + identity_id = ?masternode_id, + withdrawal_key = ?new_owner_key, + method = "transition_to_version_4", + "add new owner key to owner identity" + ); + + self.drive.add_new_non_unique_keys_to_identity( + masternode_id, + vec![new_owner_key], + block_info, + true, + Some(transaction), + platform_version, + )?; + } + Ok(()) + } + /// Initializes the wallet contract that supports mobile wallets with additional /// functionality /// @@ -265,6 +363,8 @@ impl Platform { &platform_version.drive, )?; + // The root token trees + let path = tokens_root_path(); self.drive.grove_insert_if_not_exists( (&path).into(), @@ -293,121 +393,99 @@ impl Platform { &platform_version.drive, )?; - let path = misc_path(); self.drive.grove_insert_if_not_exists( (&path).into(), - TOTAL_TOKEN_SUPPLIES_STORAGE_KEY.as_slice(), - Element::empty_big_sum_tree(), + &[TOKEN_DISTRIBUTIONS_KEY], + Element::empty_tree(), Some(transaction), None, &platform_version.drive, )?; - let contract = - load_system_data_contract(SystemDataContract::TokenHistory, platform_version)?; + // The token distribution trees - self.drive.insert_contract( - &contract, - *block_info, - true, + let token_distributions_path = token_distributions_root_path(); + + self.drive.grove_insert_if_not_exists( + (&token_distributions_path).into(), + &[TOKEN_TIMED_DISTRIBUTIONS_KEY], + Element::empty_tree(), Some(transaction), - platform_version, + None, + &platform_version.drive, )?; - Ok(()) - } + self.drive.grove_insert_if_not_exists( + (&token_distributions_path).into(), + &[TOKEN_PERPETUAL_DISTRIBUTIONS_KEY], + Element::empty_tree(), + Some(transaction), + None, + &platform_version.drive, + )?; - /// Initializes an empty sum tree for withdrawal transactions required for protocol version 4. - /// - /// This function is called during the transition to protocol version 4 to set up - /// an empty sum tree at the specified path if it does not already exist. - /// - /// # Parameters - /// - /// * `transaction`: A reference to the transaction context in which the changes should be applied. - /// * `platform_version`: The current platform version containing the updated protocol version and relevant configuration details. - /// - /// # Returns - /// - /// * `Ok(())`: If the transition to version 4 was successful. - /// * `Err(Error)`: If there was an issue creating or updating the necessary data structures. - fn transition_to_version_4( - &self, - platform_state: &PlatformState, - block_info: &BlockInfo, - transaction: &Transaction, - platform_version: &PlatformVersion, - ) -> Result<(), Error> { - // We are adding the withdrawal transactions sum amount tree - let path = get_withdrawal_root_path(); self.drive.grove_insert_if_not_exists( - (&path).into(), - &WITHDRAWAL_TRANSACTIONS_SUM_AMOUNT_TREE_KEY, - Element::empty_sum_tree(), + (&token_distributions_path).into(), + &[TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS_KEY], + Element::empty_tree(), Some(transaction), None, &platform_version.drive, )?; - // We are adding a tree to store broadcasted transactions that might expire + + // The token time distribution trees + let timed_distributions_path = token_timed_distributions_path(); + self.drive.grove_insert_if_not_exists( - (&path).into(), - &WITHDRAWAL_TRANSACTIONS_BROADCASTED_KEY, + (&timed_distributions_path).into(), + &[TOKEN_MS_TIMED_DISTRIBUTIONS_KEY], Element::empty_tree(), Some(transaction), None, &platform_version.drive, )?; - // We need to add all masternode owner keys - // This is because owner identities only had a withdrawal key - // But no owner key - for masternode in platform_state.full_masternode_list().values() { - let masternode_id = masternode.pro_tx_hash.to_byte_array(); - let key_request = IdentityKeysRequest { - identity_id: masternode_id, - request_type: KeyRequestType::AllKeys, - limit: None, - offset: None, - }; - let old_owner_identity_keys = self - .drive - .fetch_identity_keys::( - key_request, - Some(transaction), - platform_version, - )?; + self.drive.grove_insert_if_not_exists( + (&timed_distributions_path).into(), + &[TOKEN_BLOCK_TIMED_DISTRIBUTIONS_KEY], + Element::empty_tree(), + Some(transaction), + None, + &platform_version.drive, + )?; - if old_owner_identity_keys.is_empty() { - continue; - } + self.drive.grove_insert_if_not_exists( + (&timed_distributions_path).into(), + &[TOKEN_EPOCH_TIMED_DISTRIBUTIONS_KEY], + Element::empty_tree(), + Some(transaction), + None, + &platform_version.drive, + )?; - let last_key_id = *old_owner_identity_keys - .keys() - .max() - .expect("there must be keys, we already checked"); + // The token total supply - let new_owner_key = Self::get_owner_identity_owner_key( - masternode.state.owner_address, - last_key_id + 1, - platform_version, - )?; + let path = misc_path(); + self.drive.grove_insert_if_not_exists( + (&path).into(), + TOTAL_TOKEN_SUPPLIES_STORAGE_KEY.as_slice(), + Element::empty_big_sum_tree(), + Some(transaction), + None, + &platform_version.drive, + )?; - tracing::trace!( - identity_id = ?masternode_id, - withdrawal_key = ?new_owner_key, - method = "transition_to_version_4", - "add new owner key to owner identity" - ); + let contract = + load_system_data_contract(SystemDataContract::TokenHistory, platform_version)?; + + self.drive.insert_contract( + &contract, + *block_info, + true, + Some(transaction), + platform_version, + )?; - self.drive.add_new_non_unique_keys_to_identity( - masternode_id, - vec![new_owner_key], - block_info, - true, - Some(transaction), - platform_version, - )?; - } Ok(()) } } diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_transfer_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_transfer_transition_action/state_v0/mod.rs index a40b0f30401..43d272522f1 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_transfer_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_transfer_transition_action/state_v0/mod.rs @@ -1,11 +1,12 @@ use dpp::block::block_info::BlockInfo; use dpp::consensus::ConsensusError; use dpp::consensus::state::state_error::StateError; -use dpp::consensus::state::token::{IdentityDoesNotHaveEnoughTokenBalanceError, IdentityTokenAccountFrozenError}; +use dpp::consensus::state::token::{IdentityDoesNotHaveEnoughTokenBalanceError, IdentityTokenAccountFrozenError, TokenIsPausedError}; use dpp::prelude::Identifier; use dpp::tokens::info::v0::IdentityTokenInfoV0Accessors; +use dpp::tokens::status::v0::TokenStatusV0Accessors; use dpp::validation::SimpleConsensusValidationResult; -use drive::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::{TokenTransferTransitionAction}; +use drive::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::TokenTransferTransitionAction; use dpp::version::PlatformVersion; use drive::query::TransactionArg; use drive::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::v0::TokenTransferTransitionActionAccessorsV0; @@ -60,7 +61,6 @@ impl TokenTransferTransitionActionStateValidationV0 for TokenTransferTransitionA .unwrap_or_default(); execution_context.add_operation(ValidationOperation::RetrieveIdentityTokenBalance); if balance < self.amount() { - // The identity does not exist return Ok(SimpleConsensusValidationResult::new_with_error( ConsensusError::StateError(StateError::IdentityDoesNotHaveEnoughTokenBalanceError( IdentityDoesNotHaveEnoughTokenBalanceError::new( @@ -75,16 +75,16 @@ impl TokenTransferTransitionActionStateValidationV0 for TokenTransferTransitionA } // We need to verify that our token account is not frozen - - // We need to verify that we have enough of the token - let info = platform.drive.fetch_identity_token_info( + let (info, fee_result) = platform.drive.fetch_identity_token_info_with_costs( self.token_id().to_buffer(), owner_id.to_buffer(), + block_info, + true, transaction, platform_version, )?; + execution_context.add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); if let Some(info) = info { - // We have an info, we need to check that we are not frozen if info.frozen() == true { return Ok(SimpleConsensusValidationResult::new_with_error( ConsensusError::StateError(StateError::IdentityTokenAccountFrozenError( @@ -98,6 +98,25 @@ impl TokenTransferTransitionActionStateValidationV0 for TokenTransferTransitionA } }; + // We need to verify that the token is not paused + let (token_status, fee_result) = platform.drive.fetch_token_status_with_costs( + self.token_id().to_buffer(), + block_info, + true, + transaction, + platform_version, + )?; + execution_context.add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); + if let Some(status) = token_status { + if status.paused() { + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::TokenIsPausedError( + TokenIsPausedError::new(self.token_id()), + )), + )); + } + } + Ok(SimpleConsensusValidationResult::new()) } } diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/mod.rs index e2cef7ac75a..7069e90904f 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/mod.rs @@ -145,6 +145,7 @@ mod tests { use crate::platform_types::state_transitions_processing_result::StateTransitionExecutionResult; use crate::test::helpers::setup::TestPlatformBuilder; use assert_matches::assert_matches; + use dpp::balances::credits::TokenAmount; use dpp::block::block_info::BlockInfo; use dpp::consensus::basic::BasicError; use dpp::consensus::ConsensusError; @@ -159,12 +160,15 @@ mod tests { use dpp::data_contract::DataContract; use dpp::identity::accessors::IdentityGettersV0; use dpp::identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0; + use dpp::identity::TimestampMillis; + use dpp::prelude::Identifier; use dpp::serialization::PlatformSerializable; use dpp::state_transition::data_contract_create_transition::methods::DataContractCreateTransitionMethodsV0; use dpp::state_transition::data_contract_create_transition::DataContractCreateTransition; use dpp::tests::json_document::json_document_to_contract_with_ids; use dpp::tokens::calculate_token_id; use platform_version::version::PlatformVersion; + use std::collections::BTreeMap; #[test] fn test_data_contract_creation_with_contested_unique_index() { @@ -357,618 +361,832 @@ mod tests { .unwrap() .expect("expected to commit transaction"); } + #[cfg(test)] + mod tokens { + use super::*; + use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; + use dpp::data_contract::associated_token::token_distribution_rules::accessors::v0::TokenDistributionRulesV0Setters; - #[test] - fn test_data_contract_creation_with_single_token() { - let platform_version = PlatformVersion::latest(); - let mut platform = TestPlatformBuilder::new() - .build_with_mock_rpc() - .set_genesis_state(); - - let platform_state = platform.state.load(); - - let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); - - let mut data_contract = json_document_to_contract_with_ids( - "tests/supporting_files/contract/basic-token/basic-token.json", - None, - None, - false, //no need to validate the data contracts in tests for drive - platform_version, - ) - .expect("expected to get json based contract"); - - let identity_id = identity.id(); - - let base_supply_start_amount = 0; - - { - let token_config = data_contract - .tokens_mut() - .expect("expected tokens") - .get_mut(&0) - .expect("expected first token"); - token_config.set_base_supply(base_supply_start_amount); - } - - let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); - - let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); - - let data_contract_create_transition = DataContractCreateTransition::new_from_data_contract( - data_contract, - 1, - &identity.into_partial_identity_info(), - key.id(), - &signer, - platform_version, - None, - ) - .expect("expect to create documents batch transition"); - - let data_contract_create_serialized_transition = data_contract_create_transition - .serialize_to_bytes() - .expect("expected documents batch serialized state transition"); - - let transaction = platform.drive.grove.start_transaction(); - - let processing_result = platform - .platform - .process_raw_state_transitions( - &vec![data_contract_create_serialized_transition.clone()], - &platform_state, - &BlockInfo::default(), - &transaction, - platform_version, - false, - None, - ) - .expect("expected to process state transition"); - - assert_matches!( - processing_result.execution_results().as_slice(), - [StateTransitionExecutionResult::SuccessfulExecution(_, _)] - ); - - platform - .drive - .grove - .commit_transaction(transaction) - .unwrap() - .expect("expected to commit transaction"); - - let token_balance = platform - .drive - .fetch_identity_token_balance(token_id, identity_id.to_buffer(), None, platform_version) - .expect("expected to fetch token balance"); - assert_eq!(token_balance, None); - } - - #[test] - fn test_data_contract_creation_with_single_token_and_group() { - let platform_version = PlatformVersion::latest(); - let mut platform = TestPlatformBuilder::new() - .build_with_mock_rpc() - .set_genesis_state(); - - let platform_state = platform.state.load(); - - let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); - - let (identity_2, _, _) = setup_identity(&mut platform, 234, dash_to_credits!(0.1)); + mod basic_creation { + use super::*; + #[test] + fn test_data_contract_creation_with_single_token() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); - let (identity_3, _, _) = setup_identity(&mut platform, 45, dash_to_credits!(0.1)); + let platform_state = platform.state.load(); - let mut data_contract = json_document_to_contract_with_ids( - "tests/supporting_files/contract/basic-token/basic-token.json", - None, - None, - false, //no need to validate the data contracts in tests for drive - platform_version, - ) - .expect("expected to get json based contract"); + let (identity, signer, key) = + setup_identity(&mut platform, 958, dash_to_credits!(0.1)); - let identity_id = identity.id(); - - let base_supply_start_amount = 0; + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let identity_id = identity.id(); + + let base_supply_start_amount = 0; + + { + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_base_supply(base_supply_start_amount); + } + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let data_contract_create_serialized_transition = data_contract_create_transition + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![data_contract_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_matches!( + processing_result.execution_results().as_slice(), + [StateTransitionExecutionResult::SuccessfulExecution(_, _)] + ); - { - let groups = data_contract.groups_mut().expect("expected tokens"); - groups.insert( - 0, - Group::V0(GroupV0 { - members: [(identity.id(), 1), (identity_2.id(), 1)].into(), - required_power: 2, - }), - ); - groups.insert( - 1, - Group::V0(GroupV0 { - members: [ - (identity.id(), 1), - (identity_3.id(), 1), - (identity_2.id(), 2), - ] - .into(), - required_power: 2, - }), - ); - let token_config = data_contract - .tokens_mut() - .expect("expected tokens") - .get_mut(&0) - .expect("expected first token"); - token_config.set_main_control_group(Some(1)); - token_config.set_base_supply(base_supply_start_amount); - token_config.set_manual_minting_rules(ChangeControlRules::V0(ChangeControlRulesV0 { - authorized_to_make_change: AuthorizedActionTakers::Group(0), - // We have no group at position 1, we should get an error - admin_action_takers: AuthorizedActionTakers::MainGroup, - changing_authorized_action_takers_to_no_one_allowed: false, - changing_admin_action_takers_to_no_one_allowed: false, - self_changing_admin_action_takers_allowed: false, - })); - } + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } - let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + #[test] + fn test_data_contract_creation_with_single_token_and_group() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); - let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + let platform_state = platform.state.load(); - let data_contract_create_transition = DataContractCreateTransition::new_from_data_contract( - data_contract, - 1, - &identity.into_partial_identity_info(), - key.id(), - &signer, - platform_version, - None, - ) - .expect("expect to create documents batch transition"); + let (identity, signer, key) = + setup_identity(&mut platform, 958, dash_to_credits!(0.1)); - let data_contract_create_serialized_transition = data_contract_create_transition - .serialize_to_bytes() - .expect("expected documents batch serialized state transition"); + let (identity_2, _, _) = setup_identity(&mut platform, 234, dash_to_credits!(0.1)); - let transaction = platform.drive.grove.start_transaction(); + let (identity_3, _, _) = setup_identity(&mut platform, 45, dash_to_credits!(0.1)); - let processing_result = platform - .platform - .process_raw_state_transitions( - &vec![data_contract_create_serialized_transition.clone()], - &platform_state, - &BlockInfo::default(), - &transaction, - platform_version, - false, - None, - ) - .expect("expected to process state transition"); - - assert_matches!( - processing_result.execution_results().as_slice(), - [StateTransitionExecutionResult::SuccessfulExecution(_, _)] - ); - - platform - .drive - .grove - .commit_transaction(transaction) - .unwrap() - .expect("expected to commit transaction"); + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let identity_id = identity.id(); + + let base_supply_start_amount = 0; + + { + let groups = data_contract.groups_mut().expect("expected tokens"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + ); + groups.insert( + 1, + Group::V0(GroupV0 { + members: [ + (identity.id(), 1), + (identity_3.id(), 1), + (identity_2.id(), 2), + ] + .into(), + required_power: 2, + }), + ); + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_main_control_group(Some(1)); + token_config.set_base_supply(base_supply_start_amount); + token_config.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + // We have no group at position 1, we should get an error + admin_action_takers: AuthorizedActionTakers::MainGroup, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, + }, + )); + } + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let data_contract_create_serialized_transition = data_contract_create_transition + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![data_contract_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_matches!( + processing_result.execution_results().as_slice(), + [StateTransitionExecutionResult::SuccessfulExecution(_, _)] + ); - let token_balance = platform - .drive - .fetch_identity_token_balance(token_id, identity_id.to_buffer(), None, platform_version) - .expect("expected to fetch token balance"); - assert_eq!(token_balance, None); - } + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } - #[test] - fn test_data_contract_creation_with_single_token_with_starting_balance() { - let platform_version = PlatformVersion::latest(); - let mut platform = TestPlatformBuilder::new() - .build_with_mock_rpc() - .set_genesis_state(); + #[test] + fn test_data_contract_creation_with_single_token_with_starting_balance() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); - let platform_state = platform.state.load(); + let platform_state = platform.state.load(); - let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + let (identity, signer, key) = + setup_identity(&mut platform, 958, dash_to_credits!(0.1)); - let mut data_contract = json_document_to_contract_with_ids( - "tests/supporting_files/contract/basic-token/basic-token.json", - None, - None, - false, //no need to validate the data contracts in tests for drive - platform_version, - ) - .expect("expected to get json based contract"); - - let base_supply_start_amount = 10000; + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let base_supply_start_amount = 10000; + + { + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_base_supply(base_supply_start_amount); + } + + let identity_id = identity.id(); + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_serialized_transition = data_contract_create_transition + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![data_contract_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_matches!( + processing_result.execution_results().as_slice(), + [StateTransitionExecutionResult::SuccessfulExecution(_, _)] + ); - { - let token_config = data_contract - .tokens_mut() - .expect("expected tokens") - .get_mut(&0) - .expect("expected first token"); - token_config.set_base_supply(base_supply_start_amount); + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(base_supply_start_amount)); + } } - let identity_id = identity.id(); - - let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); - - let data_contract_create_transition = DataContractCreateTransition::new_from_data_contract( - data_contract, - 1, - &identity.into_partial_identity_info(), - key.id(), - &signer, - platform_version, - None, - ) - .expect("expect to create documents batch transition"); - - let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + mod pre_programmed_distribution { + use super::*; + use dpp::data_contract::associated_token::token_pre_programmed_distribution::v0::TokenPreProgrammedDistributionV0; + use dpp::data_contract::associated_token::token_pre_programmed_distribution::TokenPreProgrammedDistribution; + use drive::drive::Drive; - let data_contract_create_serialized_transition = data_contract_create_transition - .serialize_to_bytes() - .expect("expected documents batch serialized state transition"); + #[test] + fn test_data_contract_pre_programmed_distribution() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); - let transaction = platform.drive.grove.start_transaction(); - - let processing_result = platform - .platform - .process_raw_state_transitions( - &vec![data_contract_create_serialized_transition.clone()], - &platform_state, - &BlockInfo::default(), - &transaction, - platform_version, - false, - None, - ) - .expect("expected to process state transition"); + let platform_state = platform.state.load(); - assert_matches!( - processing_result.execution_results().as_slice(), - [StateTransitionExecutionResult::SuccessfulExecution(_, _)] - ); + let (identity, signer, key) = + setup_identity(&mut platform, 958, dash_to_credits!(0.1)); - platform - .drive - .grove - .commit_transaction(transaction) - .unwrap() - .expect("expected to commit transaction"); + let (identity_2, _, _) = setup_identity(&mut platform, 5456, dash_to_credits!(0.1)); - let token_balance = platform - .drive - .fetch_identity_token_balance(token_id, identity_id.to_buffer(), None, platform_version) - .expect("expected to fetch token balance"); - assert_eq!(token_balance, Some(base_supply_start_amount)); - } + let (identity_3, _, _) = setup_identity(&mut platform, 123, dash_to_credits!(0.1)); - mod token_errors { - use super::*; - #[test] - fn test_data_contract_creation_with_single_token_with_starting_balance_over_limit_should_cause_error( - ) { - let platform_version = PlatformVersion::latest(); - let mut platform = TestPlatformBuilder::new() - .build_with_mock_rpc() - .set_genesis_state(); + let (identity_4, _, _) = setup_identity(&mut platform, 548, dash_to_credits!(0.1)); - let platform_state = platform.state.load(); + let (identity_5, _, _) = setup_identity(&mut platform, 467, dash_to_credits!(0.1)); - let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); - let mut data_contract = json_document_to_contract_with_ids( - "tests/supporting_files/contract/basic-token/basic-token.json", - None, - None, - false, //no need to validate the data contracts in tests for drive - platform_version, - ) - .expect("expected to get json based contract"); + let identity_id = identity.id(); - let base_supply_start_amount = u64::MAX; + let base_supply_start_amount = 0; - { let token_config = data_contract .tokens_mut() .expect("expected tokens") .get_mut(&0) .expect("expected first token"); token_config.set_base_supply(base_supply_start_amount); - } - - let identity_id = identity.id(); - - let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); - - let data_contract_create_transition = - DataContractCreateTransition::new_from_data_contract( - data_contract, - 1, - &identity.into_partial_identity_info(), - key.id(), - &signer, - platform_version, - None, - ) - .expect("expect to create documents batch transition"); - let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); - - let data_contract_create_serialized_transition = data_contract_create_transition - .serialize_to_bytes() - .expect("expected documents batch serialized state transition"); - - let transaction = platform.drive.grove.start_transaction(); + // Create a new BTreeMap to store distributions + let mut distributions: BTreeMap< + TimestampMillis, + BTreeMap, + > = BTreeMap::new(); + + // Create distributions for different timestamps + distributions.insert( + 1700000000000, // Example timestamp (milliseconds) + BTreeMap::from([ + (identity.id(), 10), // Identity 1 gets 10 tokens + (identity_2.id(), 5), // Identity 2 gets 5 tokens + ]), + ); - let processing_result = platform - .platform - .process_raw_state_transitions( - &vec![data_contract_create_serialized_transition.clone()], - &platform_state, - &BlockInfo::default(), - &transaction, - platform_version, - false, - None, - ) - .expect("expected to process state transition"); - assert_matches!( - processing_result.execution_results().as_slice(), - [StateTransitionExecutionResult::PaidConsensusError( - ConsensusError::BasicError(BasicError::InvalidTokenBaseSupplyError(_)), - _ - )] - ); + distributions.insert( + 1700005000000, // Another timestamp + BTreeMap::from([ + (identity_3.id(), 15), // Identity 3 gets 15 tokens + (identity_4.id(), 20), // Identity 4 gets 20 tokens + (identity_5.id(), 25), // Identity 5 gets 25 tokens + ]), + ); - platform - .drive - .grove - .commit_transaction(transaction) - .unwrap() - .expect("expected to commit transaction"); + token_config + .distribution_rules_mut() + .set_pre_programmed_distribution(Some(TokenPreProgrammedDistribution::V0( + TokenPreProgrammedDistributionV0 { + distributions: distributions.clone(), + }, + ))); + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let data_contract_create_serialized_transition = data_contract_create_transition + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![data_contract_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_matches!( + processing_result.execution_results().as_slice(), + [StateTransitionExecutionResult::SuccessfulExecution(_, _)] + ); - let token_balance = platform - .drive - .fetch_identity_token_balance( + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + + let fetched_distributions = platform + .drive + .fetch_token_pre_programmed_distributions( + token_id, + None, + None, + None, + platform_version, + ) + .expect("expected to fetch pre-programmed distributions"); + + assert_eq!(fetched_distributions, distributions); + + let proved_distributions = platform + .drive + .prove_token_pre_programmed_distributions( + token_id, + None, + None, + None, + platform_version, + ) + .expect("expected to prove pre-programmed distributions"); + + let verified_pre_programmed_distributions: BTreeMap< + TimestampMillis, + BTreeMap, + > = Drive::verify_token_pre_programmed_distributions( + proved_distributions.as_slice(), token_id, - identity_id.to_buffer(), None, + None, + false, platform_version, ) - .expect("expected to fetch token balance"); - assert_eq!(token_balance, None); - } - - #[test] - fn test_data_contract_creation_with_single_token_needing_group_that_does_not_exist() { - let platform_version = PlatformVersion::latest(); - let mut platform = TestPlatformBuilder::new() - .build_with_mock_rpc() - .set_genesis_state(); - - let platform_state = platform.state.load(); - - let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); - - let (identity_2, _, _) = setup_identity(&mut platform, 564, dash_to_credits!(0.1)); - - let mut data_contract = json_document_to_contract_with_ids( - "tests/supporting_files/contract/basic-token/basic-token.json", - None, - None, - false, //no need to validate the data contracts in tests for drive - platform_version, - ) - .expect("expected to get json based contract"); - - let identity_id = identity.id(); + .expect("expected to verify proof") + .1; - { - let groups = data_contract.groups_mut().expect("expected tokens"); - groups.insert( - 0, - Group::V0(GroupV0 { - members: [(identity.id(), 1), (identity_2.id(), 1)].into(), - required_power: 2, - }), - ); - let token_config = data_contract - .tokens_mut() - .expect("expected tokens") - .get_mut(&0) - .expect("expected first token"); - token_config.set_manual_minting_rules(ChangeControlRules::V0( - ChangeControlRulesV0 { - authorized_to_make_change: AuthorizedActionTakers::Group(0), - // We have no group at position 1, we should get an error - admin_action_takers: AuthorizedActionTakers::Group(1), - changing_authorized_action_takers_to_no_one_allowed: false, - changing_admin_action_takers_to_no_one_allowed: false, - self_changing_admin_action_takers_allowed: false, - }, - )); + assert_eq!(verified_pre_programmed_distributions, distributions); } + } - let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); - - let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); - - let data_contract_create_transition = - DataContractCreateTransition::new_from_data_contract( - data_contract, - 1, - &identity.into_partial_identity_info(), - key.id(), - &signer, - platform_version, - None, - ) - .expect("expect to create documents batch transition"); + mod token_errors { + use super::*; + #[test] + fn test_data_contract_creation_with_single_token_with_starting_balance_over_limit_should_cause_error( + ) { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); - let data_contract_create_serialized_transition = data_contract_create_transition - .serialize_to_bytes() - .expect("expected documents batch serialized state transition"); + let platform_state = platform.state.load(); - let transaction = platform.drive.grove.start_transaction(); + let (identity, signer, key) = + setup_identity(&mut platform, 958, dash_to_credits!(0.1)); - let processing_result = platform - .platform - .process_raw_state_transitions( - &vec![data_contract_create_serialized_transition.clone()], - &platform_state, - &BlockInfo::default(), - &transaction, - platform_version, - false, + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", None, - ) - .expect("expected to process state transition"); - - assert_matches!( - processing_result.execution_results().as_slice(), - [StateTransitionExecutionResult::PaidConsensusError( - ConsensusError::BasicError(BasicError::GroupPositionDoesNotExistError(_)), - _ - )] - ); - - platform - .drive - .grove - .commit_transaction(transaction) - .unwrap() - .expect("expected to commit transaction"); - - let token_balance = platform - .drive - .fetch_identity_token_balance( - token_id, - identity_id.to_buffer(), None, + false, //no need to validate the data contracts in tests for drive platform_version, ) - .expect("expected to fetch token balance"); - assert_eq!(token_balance, None); - } - - #[test] - fn test_data_contract_creation_with_single_token_setting_main_group_that_does_not_exist() { - let platform_version = PlatformVersion::latest(); - let mut platform = TestPlatformBuilder::new() - .build_with_mock_rpc() - .set_genesis_state(); - - let platform_state = platform.state.load(); - - let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); - - let (identity_2, _, _) = setup_identity(&mut platform, 564, dash_to_credits!(0.1)); + .expect("expected to get json based contract"); + + let base_supply_start_amount = u64::MAX; + + { + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_base_supply(base_supply_start_amount); + } + + let identity_id = identity.id(); + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_serialized_transition = data_contract_create_transition + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![data_contract_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + assert_matches!( + processing_result.execution_results().as_slice(), + [StateTransitionExecutionResult::PaidConsensusError( + ConsensusError::BasicError(BasicError::InvalidTokenBaseSupplyError(_)), + _ + )] + ); - let mut data_contract = json_document_to_contract_with_ids( - "tests/supporting_files/contract/basic-token/basic-token.json", - None, - None, - false, //no need to validate the data contracts in tests for drive - platform_version, - ) - .expect("expected to get json based contract"); + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } - let identity_id = identity.id(); + #[test] + fn test_data_contract_creation_with_single_token_needing_group_that_does_not_exist() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); - { - let groups = data_contract.groups_mut().expect("expected tokens"); - groups.insert( - 0, - Group::V0(GroupV0 { - members: [(identity.id(), 1), (identity_2.id(), 1)].into(), - required_power: 2, - }), - ); - let token_config = data_contract - .tokens_mut() - .expect("expected tokens") - .get_mut(&0) - .expect("expected first token"); - token_config.set_main_control_group(Some(1)); - token_config.set_manual_minting_rules(ChangeControlRules::V0( - ChangeControlRulesV0 { - authorized_to_make_change: AuthorizedActionTakers::Group(0), - // We have no group at position 1, we should get an error - admin_action_takers: AuthorizedActionTakers::MainGroup, - changing_authorized_action_takers_to_no_one_allowed: false, - changing_admin_action_takers_to_no_one_allowed: false, - self_changing_admin_action_takers_allowed: false, - }, - )); - } + let platform_state = platform.state.load(); - let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + let (identity, signer, key) = + setup_identity(&mut platform, 958, dash_to_credits!(0.1)); - let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + let (identity_2, _, _) = setup_identity(&mut platform, 564, dash_to_credits!(0.1)); - let data_contract_create_transition = - DataContractCreateTransition::new_from_data_contract( - data_contract, - 1, - &identity.into_partial_identity_info(), - key.id(), - &signer, - platform_version, + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, None, + false, //no need to validate the data contracts in tests for drive + platform_version, ) - .expect("expect to create documents batch transition"); + .expect("expected to get json based contract"); + + let identity_id = identity.id(); + + { + let groups = data_contract.groups_mut().expect("expected tokens"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + ); + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + // We have no group at position 1, we should get an error + admin_action_takers: AuthorizedActionTakers::Group(1), + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, + }, + )); + } + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let data_contract_create_serialized_transition = data_contract_create_transition + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![data_contract_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_matches!( + processing_result.execution_results().as_slice(), + [StateTransitionExecutionResult::PaidConsensusError( + ConsensusError::BasicError(BasicError::GroupPositionDoesNotExistError(_)), + _ + )] + ); - let data_contract_create_serialized_transition = data_contract_create_transition - .serialize_to_bytes() - .expect("expected documents batch serialized state transition"); + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } - let transaction = platform.drive.grove.start_transaction(); + #[test] + fn test_data_contract_creation_with_single_token_setting_main_group_that_does_not_exist( + ) { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); - let processing_result = platform - .platform - .process_raw_state_transitions( - &vec![data_contract_create_serialized_transition.clone()], - &platform_state, - &BlockInfo::default(), - &transaction, - platform_version, - false, - None, - ) - .expect("expected to process state transition"); + let platform_state = platform.state.load(); - assert_matches!( - processing_result.execution_results().as_slice(), - [StateTransitionExecutionResult::PaidConsensusError( - ConsensusError::BasicError(BasicError::GroupPositionDoesNotExistError(_)), - _ - )] - ); + let (identity, signer, key) = + setup_identity(&mut platform, 958, dash_to_credits!(0.1)); - platform - .drive - .grove - .commit_transaction(transaction) - .unwrap() - .expect("expected to commit transaction"); + let (identity_2, _, _) = setup_identity(&mut platform, 564, dash_to_credits!(0.1)); - let token_balance = platform - .drive - .fetch_identity_token_balance( - token_id, - identity_id.to_buffer(), + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, None, + false, //no need to validate the data contracts in tests for drive platform_version, ) - .expect("expected to fetch token balance"); - assert_eq!(token_balance, None); + .expect("expected to get json based contract"); + + let identity_id = identity.id(); + + { + let groups = data_contract.groups_mut().expect("expected tokens"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + ); + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_main_control_group(Some(1)); + token_config.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + // We have no group at position 1, we should get an error + admin_action_takers: AuthorizedActionTakers::MainGroup, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, + }, + )); + } + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let data_contract_create_serialized_transition = data_contract_create_transition + .serialize_to_bytes() + .expect("expected documents batch serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![data_contract_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_matches!( + processing_result.execution_results().as_slice(), + [StateTransitionExecutionResult::PaidConsensusError( + ConsensusError::BasicError(BasicError::GroupPositionDoesNotExistError(_)), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } } } diff --git a/packages/rs-drive-abci/src/query/service.rs b/packages/rs-drive-abci/src/query/service.rs index 24f14039a58..156ae629983 100644 --- a/packages/rs-drive-abci/src/query/service.rs +++ b/packages/rs-drive-abci/src/query/service.rs @@ -37,7 +37,8 @@ use dapi_grpc::platform::v0::{ GetPrefundedSpecializedBalanceResponse, GetProofsRequest, GetProofsResponse, GetProtocolVersionUpgradeStateRequest, GetProtocolVersionUpgradeStateResponse, GetProtocolVersionUpgradeVoteStatusRequest, GetProtocolVersionUpgradeVoteStatusResponse, - GetStatusRequest, GetStatusResponse, GetTokenStatusesRequest, GetTokenStatusesResponse, + GetStatusRequest, GetStatusResponse, GetTokenPreProgrammedDistributionsRequest, + GetTokenPreProgrammedDistributionsResponse, GetTokenStatusesRequest, GetTokenStatusesResponse, GetTokenTotalSupplyRequest, GetTokenTotalSupplyResponse, GetTotalCreditsInPlatformRequest, GetTotalCreditsInPlatformResponse, GetVotePollsByEndDateRequest, GetVotePollsByEndDateResponse, WaitForStateTransitionResultRequest, WaitForStateTransitionResultResponse, @@ -676,6 +677,18 @@ impl PlatformService for QueryService { .await } + async fn get_token_pre_programmed_distributions( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_token_pre_programmed_distributions, + "get_token_pre_programmed_distributions", + ) + .await + } + async fn get_token_total_supply( &self, request: Request, diff --git a/packages/rs-drive-abci/src/query/token_queries/mod.rs b/packages/rs-drive-abci/src/query/token_queries/mod.rs index fe97942dd10..9b4efdf4707 100644 --- a/packages/rs-drive-abci/src/query/token_queries/mod.rs +++ b/packages/rs-drive-abci/src/query/token_queries/mod.rs @@ -2,5 +2,6 @@ mod identities_token_balances; mod identities_token_infos; mod identity_token_balances; mod identity_token_infos; +mod token_pre_programmed_distributions; mod token_status; mod token_total_supply; diff --git a/packages/rs-drive-abci/src/query/token_queries/token_pre_programmed_distributions/mod.rs b/packages/rs-drive-abci/src/query/token_queries/token_pre_programmed_distributions/mod.rs new file mode 100644 index 00000000000..52acb851640 --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/token_pre_programmed_distributions/mod.rs @@ -0,0 +1,66 @@ +use crate::error::query::QueryError; +use crate::error::Error; +use crate::platform_types::platform::Platform; +use crate::platform_types::platform_state::PlatformState; +use crate::query::QueryValidationResult; +use dapi_grpc::platform::v0::get_token_pre_programmed_distributions_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_token_pre_programmed_distributions_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{ + GetTokenPreProgrammedDistributionsRequest, GetTokenPreProgrammedDistributionsResponse, +}; +use dpp::version::PlatformVersion; +mod v0; + +impl Platform { + /// Querying of an identity's token infos by a public key hash + pub fn query_token_pre_programmed_distributions( + &self, + GetTokenPreProgrammedDistributionsRequest { version }: GetTokenPreProgrammedDistributionsRequest, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let Some(version) = version else { + return Ok(QueryValidationResult::new_with_error( + QueryError::DecodingError( + "could not decode identity token infos query".to_string(), + ), + )); + }; + + let feature_version_bounds = &platform_version + .drive_abci + .query + .token_queries + .token_pre_programmed_distributions; + + let feature_version = match &version { + RequestVersion::V0(_) => 0, + }; + if !feature_version_bounds.check_version(feature_version) { + return Ok(QueryValidationResult::new_with_error( + QueryError::UnsupportedQueryVersion( + "token_pre_programmed_distributions".to_string(), + feature_version_bounds.min_version, + feature_version_bounds.max_version, + platform_version.protocol_version, + feature_version, + ), + )); + } + + match version { + RequestVersion::V0(request_v0) => { + let result = self.query_token_pre_programmed_distributions_v0( + request_v0, + platform_state, + platform_version, + )?; + Ok( + result.map(|response_v0| GetTokenPreProgrammedDistributionsResponse { + version: Some(ResponseVersion::V0(response_v0)), + }), + ) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/token_queries/token_pre_programmed_distributions/v0/mod.rs b/packages/rs-drive-abci/src/query/token_queries/token_pre_programmed_distributions/v0/mod.rs new file mode 100644 index 00000000000..0f7cd34f2bb --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/token_pre_programmed_distributions/v0/mod.rs @@ -0,0 +1,140 @@ +use dapi_grpc::platform::v0::get_token_pre_programmed_distributions_request::get_token_pre_programmed_distributions_request_v0::StartAtInfo; +use crate::error::query::QueryError; +use crate::error::Error; +use crate::platform_types::platform::Platform; +use crate::platform_types::platform_state::PlatformState; +use crate::query::QueryValidationResult; +use dapi_grpc::platform::v0::get_token_pre_programmed_distributions_request::GetTokenPreProgrammedDistributionsRequestV0; +use dapi_grpc::platform::v0::get_token_pre_programmed_distributions_response::{get_token_pre_programmed_distributions_response_v0, GetTokenPreProgrammedDistributionsResponseV0}; +use dapi_grpc::platform::v0::get_token_pre_programmed_distributions_response::get_token_pre_programmed_distributions_response_v0::{TokenDistributions, TokenDistributionEntry, TokenTimedDistributionEntry}; +use dpp::check_validation_result_with_data; +use dpp::identifier::Identifier; +use dpp::validation::ValidationResult; +use dpp::version::PlatformVersion; +use drive::drive::tokens::distribution::queries::QueryPreProgrammedDistributionStartAt; +use drive::error::query::QuerySyntaxError; + +impl Platform { + pub(super) fn query_token_pre_programmed_distributions_v0( + &self, + GetTokenPreProgrammedDistributionsRequestV0 { + token_id, + start_at_info, + limit, + prove, + }: GetTokenPreProgrammedDistributionsRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let config = &self.config.drive; + let token_id: Identifier = + check_validation_result_with_data!(token_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "token_id must be a valid identifier (32 bytes long)".to_string(), + ) + })); + + let limit = limit + .map_or(Some(config.default_query_limit), |limit_value| { + if limit_value == 0 + || limit_value > u16::MAX as u32 + || limit_value as u16 > config.default_query_limit + { + None + } else { + Some(limit_value as u16) + } + }) + .ok_or(drive::error::Error::Query(QuerySyntaxError::InvalidLimit( + format!("limit greater than max limit {}", config.max_query_limit), + )))?; + + let start_at = match start_at_info { + None => None, + Some(StartAtInfo { + start_time_ms, + start_recipient, + start_recipient_included, + }) => { + let start_at_recipient = match start_recipient { + None => None, + Some(identifier) => { + let recipient_id: Identifier = check_validation_result_with_data!( + identifier.try_into().map_err(|_| { + QueryError::InvalidArgument( + "start_recipient must be a valid identifier (32 bytes long)" + .to_string(), + ) + }) + ); + Some((recipient_id, start_recipient_included.unwrap_or(true))) + } + }; + + Some(QueryPreProgrammedDistributionStartAt { + start_at_time: start_time_ms, + start_at_recipient, + }) + } + }; + + let response = if prove { + let proof = check_validation_result_with_data!(self + .drive + .prove_token_pre_programmed_distributions( + token_id.into_buffer(), + start_at, + Some(limit), + None, + platform_version, + )); + + GetTokenPreProgrammedDistributionsResponseV0 { + result: Some( + get_token_pre_programmed_distributions_response_v0::Result::Proof( + self.response_proof_v0(platform_state, proof), + ), + ), + metadata: Some(self.response_metadata_v0(platform_state)), + } + } else { + let token_distributions = self + .drive + .fetch_token_pre_programmed_distributions( + token_id.into_buffer(), + start_at, + Some(limit), + None, + platform_version, + )? + .into_iter() + .map(|(timestamp, distributions_for_time)| { + let distributions = distributions_for_time + .into_iter() + .map(|(recipient, amount)| TokenDistributionEntry { + recipient_id: recipient.to_vec(), + amount, + }) + .collect(); + TokenTimedDistributionEntry { + timestamp, + distributions, + } + }) + .collect(); + + GetTokenPreProgrammedDistributionsResponseV0 { + result: Some( + get_token_pre_programmed_distributions_response_v0::Result::TokenDistributions( + TokenDistributions { + token_distributions, + }, + ), + ), + metadata: Some(self.response_metadata_v0(platform_state)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} diff --git a/packages/rs-drive/src/drive/contract/insert/insert_contract/v1/mod.rs b/packages/rs-drive/src/drive/contract/insert/insert_contract/v1/mod.rs index 826ccfe97ad..93e6707a2c0 100644 --- a/packages/rs-drive/src/drive/contract/insert/insert_contract/v1/mod.rs +++ b/packages/rs-drive/src/drive/contract/insert/insert_contract/v1/mod.rs @@ -215,6 +215,37 @@ impl Drive { &platform_version.drive, )?; + if let Some(perpetual_distribution) = + token_config.distribution_rules().perpetual_distribution() + { + self.add_perpetual_distribution( + token_id.to_buffer(), + contract.owner_id().to_buffer(), + perpetual_distribution, + block_info, + estimated_costs_only_with_layer_info, + &mut batch_operations, + transaction, + platform_version, + )?; + } + + if let Some(pre_programmed_distribution) = token_config + .distribution_rules() + .pre_programmed_distribution() + { + self.add_pre_programmed_distributions( + token_id.to_buffer(), + contract.owner_id().to_buffer(), + pre_programmed_distribution, + block_info, + estimated_costs_only_with_layer_info, + &mut batch_operations, + transaction, + platform_version, + )?; + } + let path_holding_total_token_supply = total_tokens_root_supply_path_vec(); if token_config.base_supply() > 0 { diff --git a/packages/rs-drive/src/drive/initialization/v1/mod.rs b/packages/rs-drive/src/drive/initialization/v1/mod.rs index fe70af42b2a..9b0b8fad1d8 100644 --- a/packages/rs-drive/src/drive/initialization/v1/mod.rs +++ b/packages/rs-drive/src/drive/initialization/v1/mod.rs @@ -5,7 +5,11 @@ use crate::util::batch::GroveDbOpBatch; use crate::drive::system::misc_path_vec; use crate::drive::tokens::paths::{ - tokens_root_path_vec, TOKEN_BALANCES_KEY, TOKEN_IDENTITY_INFO_KEY, TOKEN_STATUS_INFO_KEY, + token_distributions_root_path_vec, token_timed_distributions_path_vec, tokens_root_path_vec, + TOKEN_BALANCES_KEY, TOKEN_BLOCK_TIMED_DISTRIBUTIONS_KEY, TOKEN_DISTRIBUTIONS_KEY, + TOKEN_EPOCH_TIMED_DISTRIBUTIONS_KEY, TOKEN_IDENTITY_INFO_KEY, TOKEN_MS_TIMED_DISTRIBUTIONS_KEY, + TOKEN_PERPETUAL_DISTRIBUTIONS_KEY, TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS_KEY, + TOKEN_STATUS_INFO_KEY, TOKEN_TIMED_DISTRIBUTIONS_KEY, }; use crate::drive::{Drive, RootTree}; use crate::error::Error; @@ -58,24 +62,74 @@ impl Drive { Element::empty_big_sum_tree(), ); + let tokens_root_path = tokens_root_path_vec(); + batch.add_insert( - tokens_root_path_vec(), + tokens_root_path.clone(), vec![TOKEN_BALANCES_KEY], Element::empty_big_sum_tree(), ); batch.add_insert( - tokens_root_path_vec(), + tokens_root_path.clone(), vec![TOKEN_IDENTITY_INFO_KEY], Element::empty_tree(), ); batch.add_insert( - tokens_root_path_vec(), + tokens_root_path.clone(), vec![TOKEN_STATUS_INFO_KEY], Element::empty_tree(), ); + batch.add_insert( + tokens_root_path, + vec![TOKEN_DISTRIBUTIONS_KEY], + Element::empty_tree(), + ); + + // Token Distributions Subtree + let token_distributions_path = token_distributions_root_path_vec(); + + batch.add_insert( + token_distributions_path.clone(), + vec![TOKEN_TIMED_DISTRIBUTIONS_KEY], + Element::empty_tree(), + ); + + batch.add_insert( + token_distributions_path.clone(), + vec![TOKEN_PERPETUAL_DISTRIBUTIONS_KEY], + Element::empty_tree(), + ); + + batch.add_insert( + token_distributions_path, + vec![TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS_KEY], + Element::empty_tree(), + ); + + // Token Timed Distributions Subtree + let token_timed_distributions_path = token_timed_distributions_path_vec(); + + batch.add_insert( + token_timed_distributions_path.clone(), + vec![TOKEN_MS_TIMED_DISTRIBUTIONS_KEY], + Element::empty_tree(), + ); + + batch.add_insert( + token_timed_distributions_path.clone(), + vec![TOKEN_BLOCK_TIMED_DISTRIBUTIONS_KEY], + Element::empty_tree(), + ); + + batch.add_insert( + token_timed_distributions_path, + vec![TOKEN_EPOCH_TIMED_DISTRIBUTIONS_KEY], + Element::empty_tree(), + ); + Ok(()) } } diff --git a/packages/rs-drive/src/drive/tokens/distribution/add_perpetual_distribution/mod.rs b/packages/rs-drive/src/drive/tokens/distribution/add_perpetual_distribution/mod.rs new file mode 100644 index 00000000000..90e65e7abd7 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/distribution/add_perpetual_distribution/mod.rs @@ -0,0 +1,53 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::associated_token::token_perpetual_distribution::TokenPerpetualDistribution; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Adds a TokenPerpetualDistribution to the state tree. + pub fn add_perpetual_distribution( + &self, + token_id: [u8; 32], + owner_id: [u8; 32], + distribution: &TokenPerpetualDistribution, + block_info: &BlockInfo, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + batch_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version + .drive + .methods + .token + .distribution + .add_perpetual_distribution + { + 0 => self.add_perpetual_distribution_v0( + token_id, + owner_id, + distribution, + block_info, + estimated_costs_only_with_layer_info, + batch_operations, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_perpetual_distribution".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/distribution/add_perpetual_distribution/v0/mod.rs b/packages/rs-drive/src/drive/tokens/distribution/add_perpetual_distribution/v0/mod.rs new file mode 100644 index 00000000000..7cefe3e95fc --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/distribution/add_perpetual_distribution/v0/mod.rs @@ -0,0 +1,109 @@ +use crate::drive::tokens::paths::{ + token_root_perpetual_distributions_path_vec, TokenPerpetualDistributionPaths, + TOKEN_PERPETUAL_DISTRIBUTIONS_KEY, +}; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::{BatchInsertApplyType, QueryTarget}; +use crate::util::object_size_info::PathKeyElementInfo; +use crate::util::storage_flags::StorageFlags; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::associated_token::token_distribution_key::{ + DistributionType, TokenDistributionKey, +}; +use dpp::data_contract::associated_token::token_perpetual_distribution::methods::v0::TokenPerpetualDistributionV0Accessors; +use dpp::data_contract::associated_token::token_perpetual_distribution::TokenPerpetualDistribution; +use dpp::serialization::PlatformSerializable; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::reference_path::ReferencePathType; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; +use std::collections::HashMap; + +impl Drive { + /// Version 0 of `add_perpetual_distribution` + pub(super) fn add_perpetual_distribution_v0( + &self, + token_id: [u8; 32], + owner_id: [u8; 32], + distribution: &TokenPerpetualDistribution, + block_info: &BlockInfo, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + batch_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + if estimated_costs_only_with_layer_info.is_some() { + // Drive::add_estimation_costs_for_perpetual_distribution( + // estimated_costs_only_with_layer_info, + // &platform_version.drive, + // )?; + } + let serialized_distribution = distribution.serialize_to_bytes()?; + + // Storage flags for cleanup logic + let storage_flags = StorageFlags::new_single_epoch(block_info.epoch.index, Some(owner_id)); + + // Path for the perpetual distribution tree + let perpetual_distributions_path = token_root_perpetual_distributions_path_vec(); + + let insert_type = if estimated_costs_only_with_layer_info.is_none() { + BatchInsertApplyType::StatefulBatchInsert + } else { + BatchInsertApplyType::StatelessBatchInsert { + in_tree_type: TreeType::NormalTree, + target: QueryTarget::QueryTargetValue(serialized_distribution.len() as u32), + } + }; + + // We do a `if_not_exists` just to be extra careful + let inserted = self.batch_insert_if_not_exists( + PathKeyElementInfo::<0>::PathKeyElement(( + perpetual_distributions_path, + token_id.to_vec(), + Element::new_item(serialized_distribution), + )), + insert_type, + transaction, + batch_operations, + &platform_version.drive, + )?; + + if !inserted { + return Err(Error::Drive(DriveError::CorruptedCodeExecution("we can not insert the perpetual distribution as it already existed, this should have been validated before insertion"))); + } + + // We will distribute for the first time on the next interval + let distribution_path_for_next_interval = + distribution.distribution_path_for_next_interval(block_info); + + let distribution_key = TokenDistributionKey { + token_id: token_id.into(), + recipient: distribution.distribution_recipient(), + distribution_type: DistributionType::Perpetual, + }; + + let serialized_key = distribution_key.serialize_consume_to_bytes()?; + + let remaining_reference = vec![vec![TOKEN_PERPETUAL_DISTRIBUTIONS_KEY], token_id.to_vec()]; + + let reference = ReferencePathType::UpstreamRootHeightReference(2, remaining_reference); + + // Now we create the reference + self.batch_insert( + PathKeyElementInfo::<0>::PathKeyElement(( + distribution_path_for_next_interval, + serialized_key, + Element::new_reference_with_flags(reference, storage_flags.to_some_element_flags()), + )), + batch_operations, + &platform_version.drive, + )?; + + Ok(()) + } +} diff --git a/packages/rs-drive/src/drive/tokens/distribution/add_pre_programmed_distribution/mod.rs b/packages/rs-drive/src/drive/tokens/distribution/add_pre_programmed_distribution/mod.rs new file mode 100644 index 00000000000..1c7413d0f5e --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/distribution/add_pre_programmed_distribution/mod.rs @@ -0,0 +1,83 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::associated_token::token_pre_programmed_distribution::TokenPreProgrammedDistribution; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Adds a list of pre-programmed distributions to the state tree. + /// + /// This function inserts pre-programmed token distributions, ensuring they are properly structured + /// within the storage tree. It creates necessary subtrees, validates input values, and associates + /// each distribution entry with the appropriate identifiers and timestamps. + /// + /// # Parameters + /// - `token_id`: The unique identifier of the token for which distributions are being added. + /// - `owner_id`: The identifier of the entity that owns the distributions. + /// - `distribution`: A `TokenPreProgrammedDistribution` containing the scheduled distributions. + /// - `block_info`: Metadata about the current block, including epoch information. + /// - `estimated_costs_only_with_layer_info`: If provided, stores estimated cost calculations + /// instead of applying the changes. + /// - `batch_operations`: The list of low-level operations to be executed as a batch. + /// - `transaction`: The transaction context for this operation. + /// - `platform_version`: The version of the platform to determine the correct function variant. + /// + /// # Behavior + /// - Ensures that the root path for pre-programmed distributions exists. + /// - Inserts a new distribution entry if one does not already exist. + /// - Stores distributions as sum trees, allowing for quick retrieval of total distributions at + /// a given time. + /// - Uses reference paths to map distributions to their corresponding execution times. + /// - Prevents overflow errors by ensuring token amounts do not exceed `i64::MAX`. + /// + /// # Returns + /// - `Ok(())` if the distributions are successfully added. + /// - `Err(Error::Drive(DriveError::UnknownVersionMismatch))` if an unsupported platform version + /// is encountered. + /// - `Err(Error::Protocol(ProtocolError::Overflow))` if a distribution amount exceeds the + /// maximum allowed value. + pub fn add_pre_programmed_distributions( + &self, + token_id: [u8; 32], + owner_id: [u8; 32], + distribution: &TokenPreProgrammedDistribution, + block_info: &BlockInfo, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + batch_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version + .drive + .methods + .token + .distribution + .add_pre_programmed_distributions + { + 0 => self.add_pre_programmed_distributions_v0( + token_id, + owner_id, + distribution, + block_info, + estimated_costs_only_with_layer_info, + batch_operations, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_pre_programmed_distributions".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/distribution/add_pre_programmed_distribution/v0/mod.rs b/packages/rs-drive/src/drive/tokens/distribution/add_pre_programmed_distribution/v0/mod.rs new file mode 100644 index 00000000000..800e7385b89 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/distribution/add_pre_programmed_distribution/v0/mod.rs @@ -0,0 +1,187 @@ +use crate::drive::tokens::paths::{ + token_ms_timed_at_time_distributions_path_vec, token_ms_timed_distributions_path_vec, + token_pre_programmed_at_time_distribution_path_vec, token_pre_programmed_distributions_path, + token_root_pre_programmed_distributions_path, TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS_KEY, +}; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::BatchInsertTreeApplyType; +use crate::util::object_size_info::{DriveKeyInfo, PathInfo, PathKeyElementInfo}; +use crate::util::storage_flags::StorageFlags; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::associated_token::token_distribution_key::{ + DistributionType, TokenDistributionKey, +}; +use dpp::data_contract::associated_token::token_perpetual_distribution::distribution_recipient::TokenDistributionRecipient; +use dpp::data_contract::associated_token::token_pre_programmed_distribution::methods::v0::TokenPreProgrammedDistributionV0Methods; +use dpp::data_contract::associated_token::token_pre_programmed_distribution::TokenPreProgrammedDistribution; +use dpp::serialization::PlatformSerializable; +use dpp::version::PlatformVersion; +use dpp::ProtocolError; +use grovedb::batch::KeyInfoPath; +use grovedb::reference_path::ReferencePathType; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; +use std::collections::HashMap; + +impl Drive { + /// Version 0 of `add_perpetual_distribution` + pub(super) fn add_pre_programmed_distributions_v0( + &self, + token_id: [u8; 32], + owner_id: [u8; 32], + distribution: &TokenPreProgrammedDistribution, + block_info: &BlockInfo, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + batch_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + if let Some(estimated_costs_only_with_layer_info) = estimated_costs_only_with_layer_info { + Drive::add_estimation_costs_for_token_pre_programmed_distribution( + token_id, + distribution.distributions().keys(), + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + + Drive::add_estimation_costs_for_root_token_ms_interval_distribution( + distribution.distributions().keys(), + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + } + let storage_flags = StorageFlags::new_single_epoch(block_info.epoch.index, Some(owner_id)); + + let pre_programmed_distributions_path = token_root_pre_programmed_distributions_path(); + + // Insert the tree for this token's perpetual distribution + let apply_tree_type_no_storage_flags = if estimated_costs_only_with_layer_info.is_none() { + BatchInsertTreeApplyType::StatefulBatchInsertTree + } else { + BatchInsertTreeApplyType::StatelessBatchInsertTree { + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, + flags_len: 0, + } + }; + + let apply_tree_type_with_storage_flags = if estimated_costs_only_with_layer_info.is_none() { + BatchInsertTreeApplyType::StatefulBatchInsertTree + } else { + BatchInsertTreeApplyType::StatelessBatchInsertTree { + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, + flags_len: storage_flags.serialized_size(), + } + }; + + let token_tree_key_info = DriveKeyInfo::Key(token_id.to_vec()); + let pre_programmed_distributions_path_key_info = token_tree_key_info.add_path_info::<3>( + PathInfo::PathFixedSizeArray(pre_programmed_distributions_path), + ); + + let inserted = self.batch_insert_empty_tree_if_not_exists( + pre_programmed_distributions_path_key_info, + TreeType::NormalTree, + None, // we will never clean this part up + apply_tree_type_no_storage_flags, + transaction, + &mut None, + batch_operations, + &platform_version.drive, + )?; + + if !inserted { + return Err(Error::Drive(DriveError::CorruptedCodeExecution("we can not insert the pre programmed distribution as it already existed, this should have been validated before insertion"))); + } + let pre_programmed_distributions_path = token_pre_programmed_distributions_path(&token_id); + + for (time, distribution) in distribution.distributions() { + self.batch_insert_empty_sum_tree( + pre_programmed_distributions_path, + DriveKeyInfo::Key(time.to_be_bytes().to_vec()), + None, // we will never clean this part up + batch_operations, + &platform_version.drive, + )?; + + let ms_time_distribution_path = token_ms_timed_distributions_path_vec(); + + let time_tree_key_info = DriveKeyInfo::Key(time.to_be_bytes().to_vec()); + let time_tree_reference_path_key_info = time_tree_key_info + .add_path_info::<0>(PathInfo::PathAsVec(ms_time_distribution_path)); + + self.batch_insert_empty_tree_if_not_exists( + time_tree_reference_path_key_info, + TreeType::NormalTree, + Some(&storage_flags), + apply_tree_type_with_storage_flags, + transaction, + &mut None, + batch_operations, + &platform_version.drive, + )?; + + let pre_programmed_at_time_distribution_path = + token_pre_programmed_at_time_distribution_path_vec(token_id, *time); + let ms_time_at_time_distribution_path = + token_ms_timed_at_time_distributions_path_vec(*time); + + for (recipient, amount) in distribution { + if *amount > i64::MAX as u64 { + return Err(Error::Protocol(ProtocolError::Overflow( + "distribution amount over i64::Max", + ))); + } + // We use a sum tree to be able to ask "at this time how much was distributed" + self.batch_insert( + PathKeyElementInfo::<0>::PathKeyElement(( + pre_programmed_at_time_distribution_path.clone(), + recipient.to_vec(), + Element::new_sum_item(*amount as i64), + )), + batch_operations, + &platform_version.drive, + )?; + + let distribution_key = TokenDistributionKey { + token_id: token_id.into(), + recipient: TokenDistributionRecipient::Identity(*recipient), + distribution_type: DistributionType::PreProgrammed, + }; + + let serialized_key = distribution_key.serialize_consume_to_bytes()?; + + let remaining_reference = vec![ + vec![TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS_KEY], + token_id.to_vec(), + time.to_be_bytes().to_vec(), + recipient.to_vec(), + ]; + + let reference = + ReferencePathType::UpstreamRootHeightReference(2, remaining_reference); + + // Now we create the reference + self.batch_insert( + PathKeyElementInfo::<0>::PathKeyElement(( + ms_time_at_time_distribution_path.clone(), + serialized_key, + Element::new_reference_with_flags( + reference, + storage_flags.to_some_element_flags(), + ), + )), + batch_operations, + &platform_version.drive, + )?; + } + } + + Ok(()) + } +} diff --git a/packages/rs-drive/src/drive/tokens/distribution/fetch/mod.rs b/packages/rs-drive/src/drive/tokens/distribution/fetch/mod.rs new file mode 100644 index 00000000000..9396b4148ce --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/distribution/fetch/mod.rs @@ -0,0 +1,104 @@ +mod pre_programmed_distributions; + +use crate::drive::tokens::distribution::queries::QueryPreProgrammedDistributionStartAt; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::balances::credits::TokenAmount; +use dpp::prelude::{Identifier, TimestampMillis}; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; +use std::collections::BTreeMap; + +impl Drive { + /// Fetches the pre‑programmed distributions for a token, using the appropriate versioned method. + /// + /// This method queries the pre‑programmed distributions tree at the path + /// `token_pre_programmed_distributions_path_vec(token_id)`. It constructs a nested mapping where: + /// + /// - **Outer keys:** Timestamps (`TimestampMillis`) representing each distribution time. + /// - **Inner keys:** Recipient identifiers (`Identifier`). + /// - **Values:** Token amounts (`TokenAmount`). + /// + /// The method dispatches to the correct versioned implementation based on the `platform_version`. + /// + /// # Parameters + /// + /// - `token_id`: The 32‑byte identifier for the token. + /// - `transaction`: The current GroveDB transaction. + /// - `platform_version`: The platform version to determine the method variant. + /// + /// # Returns + /// + /// A `Result` containing a nested `BTreeMap` on success or an `Error` on failure. + pub fn fetch_token_pre_programmed_distributions( + &self, + token_id: [u8; 32], + start_at: Option, + limit: Option, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + self.fetch_token_pre_programmed_distributions_operations( + token_id, + start_at, + limit, + &mut vec![], + transaction, + platform_version, + ) + } + /// Fetches the pre‑programmed distributions for a token, using the appropriate versioned method. + /// + /// This method queries the pre‑programmed distributions tree at the path + /// `token_pre_programmed_distributions_path_vec(token_id)`. It constructs a nested mapping where: + /// + /// - **Outer keys:** Timestamps (`TimestampMillis`) representing each distribution time. + /// - **Inner keys:** Recipient identifiers (`Identifier`). + /// - **Values:** Token amounts (`TokenAmount`). + /// + /// The method dispatches to the correct versioned implementation based on the `platform_version`. + /// + /// # Parameters + /// + /// - `token_id`: The 32‑byte identifier for the token. + /// - `drive_operations`: A mutable vector to accumulate low-level drive operations. + /// - `transaction`: The current GroveDB transaction. + /// - `platform_version`: The platform version to determine the method variant. + /// + /// # Returns + /// + /// A `Result` containing a nested `BTreeMap` on success or an `Error` on failure. + pub(crate) fn fetch_token_pre_programmed_distributions_operations( + &self, + token_id: [u8; 32], + start_at: Option, + limit: Option, + drive_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .token + .fetch + .pre_programmed_distributions + { + 0 => self.fetch_token_pre_programmed_distributions_operations_v0( + token_id, + start_at, + limit, + drive_operations, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_token_pre_programmed_distributions_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/distribution/fetch/pre_programmed_distributions/mod.rs b/packages/rs-drive/src/drive/tokens/distribution/fetch/pre_programmed_distributions/mod.rs new file mode 100644 index 00000000000..1b642c6eaf4 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/distribution/fetch/pre_programmed_distributions/mod.rs @@ -0,0 +1,89 @@ +use crate::drive::tokens::distribution::queries::{ + pre_programmed_distributions_query, QueryPreProgrammedDistributionStartAt, +}; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::balances::credits::TokenAmount; +use dpp::identifier::Identifier; +use dpp::identity::TimestampMillis; +use grovedb::query_result_type::{QueryResultElement, QueryResultType}; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +impl Drive { + /// Fetches the pre‑programmed distributions for a token. + /// + /// This method queries the backing store for the pre‑programmed distributions tree at the path + /// defined by `token_pre_programmed_distributions_path_vec(token_id)`. It then extracts a nested + /// mapping where: + /// + /// - **Outer keys:** Are timestamps (`TimestampMillis`) representing each distribution time, + /// extracted from the 5th path component (index 4). The time is expected to be stored as 4 bytes in big‑endian. + /// - **Inner keys:** Are recipient identifiers (`Identifier`) derived from the query key. + /// - **Values:** Are token amounts (`TokenAmount`), extracted from elements that are sum items. + /// + /// # Parameters + /// + /// - `token_id`: The 32‑byte identifier for the token. + /// - `drive_operations`: A mutable vector to accumulate low-level drive operations. + /// - `transaction`: The current GroveDB transaction. + /// - `platform_version`: The platform version to use. + /// + /// # Returns + /// + /// A `Result` containing a nested `BTreeMap` on success or an `Error` on failure. + pub(super) fn fetch_token_pre_programmed_distributions_operations_v0( + &self, + token_id: [u8; 32], + start_at: Option, + limit: Option, + drive_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + let path_query = pre_programmed_distributions_query(token_id, start_at, limit); + + let results = self + .grove_get_raw_path_query( + &path_query, + transaction, + QueryResultType::QueryPathKeyElementTrioResultType, + drive_operations, + &platform_version.drive, + )? + .0; + + let mut map: BTreeMap> = BTreeMap::new(); + + for result_item in results.elements.into_iter() { + if let QueryResultElement::PathKeyElementTrioResultItem((mut path, key, element)) = + result_item + { + if let Some(last) = path.pop() { + if last.len() != 8 { + return Err(Error::Drive(DriveError::CorruptedDriveState( + format!("time key in pre-programmed distributions is not 8 bytes, got {} bytes instead", last.len()), + ))); + } + let mut time_bytes = [0u8; 8]; + time_bytes.copy_from_slice(last.as_slice()); + let time = TimestampMillis::from_be_bytes(time_bytes); + let recipient = Identifier::from_bytes(key.as_slice())?; + let sum_item = element.as_sum_item_value()?; + if sum_item < 0 { + return Err(Error::Drive(DriveError::CorruptedDriveState( + "negative token amount in pre-programmed distribution".to_string(), + ))); + } + let token_amount: TokenAmount = sum_item as TokenAmount; + map.entry(time).or_default().insert(recipient, token_amount); + } + } + } + + Ok(map) + } +} diff --git a/packages/rs-drive/src/drive/tokens/distribution/mod.rs b/packages/rs-drive/src/drive/tokens/distribution/mod.rs new file mode 100644 index 00000000000..7fd9a456813 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/distribution/mod.rs @@ -0,0 +1,11 @@ +#[cfg(feature = "server")] +mod add_perpetual_distribution; +#[cfg(feature = "server")] +mod add_pre_programmed_distribution; +#[cfg(feature = "server")] +mod fetch; + +#[cfg(feature = "server")] +mod prove; +/// Token distribution queries +pub mod queries; diff --git a/packages/rs-drive/src/drive/tokens/distribution/prove/mod.rs b/packages/rs-drive/src/drive/tokens/distribution/prove/mod.rs new file mode 100644 index 00000000000..a4a6bed83b4 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/distribution/prove/mod.rs @@ -0,0 +1,101 @@ +mod pre_programmed_distributions; + +use crate::drive::tokens::distribution::queries::QueryPreProgrammedDistributionStartAt; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + /// Proves the pre‑programmed distributions for a token, using the appropriate versioned method. + /// + /// This method queries the pre‑programmed distributions tree at the path + /// `token_pre_programmed_distributions_path_vec(token_id)`. It constructs a nested mapping where: + /// + /// - **Outer keys:** Timestamps (`TimestampMillis`) representing each distribution time. + /// - **Inner keys:** Recipient identifiers (`Identifier`). + /// - **Values:** Token amounts (`TokenAmount`). + /// + /// The method dispatches to the correct versioned implementation based on the `platform_version`. + /// + /// # Parameters + /// + /// - `token_id`: The 32‑byte identifier for the token. + /// - `transaction`: The current GroveDB transaction. + /// - `platform_version`: The platform version to determine the method variant. + /// + /// # Returns + /// + /// A `Result` containing a nested `BTreeMap` on success or an `Error` on failure. + pub fn prove_token_pre_programmed_distributions( + &self, + token_id: [u8; 32], + start_at: Option, + limit: Option, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.prove_token_pre_programmed_distributions_operations( + token_id, + start_at, + limit, + &mut vec![], + transaction, + platform_version, + ) + } + /// Proves the pre‑programmed distributions for a token, using the appropriate versioned method. + /// + /// This method queries the pre‑programmed distributions tree at the path + /// `token_pre_programmed_distributions_path_vec(token_id)`. It constructs a nested mapping where: + /// + /// - **Outer keys:** Timestamps (`TimestampMillis`) representing each distribution time. + /// - **Inner keys:** Recipient identifiers (`Identifier`). + /// - **Values:** Token amounts (`TokenAmount`). + /// + /// The method dispatches to the correct versioned implementation based on the `platform_version`. + /// + /// # Parameters + /// + /// - `token_id`: The 32‑byte identifier for the token. + /// - `drive_operations`: A mutable vector to accumulate low-level drive operations. + /// - `transaction`: The current GroveDB transaction. + /// - `platform_version`: The platform version to determine the method variant. + /// + /// # Returns + /// + /// A `Result` containing a nested `BTreeMap` on success or an `Error` on failure. + pub(crate) fn prove_token_pre_programmed_distributions_operations( + &self, + token_id: [u8; 32], + start_at: Option, + limit: Option, + drive_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .prove + .pre_programmed_distributions + { + 0 => self.prove_token_pre_programmed_distributions_operations_v0( + token_id, + start_at, + limit, + drive_operations, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_pre_programmed_distributions_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/distribution/prove/pre_programmed_distributions/mod.rs b/packages/rs-drive/src/drive/tokens/distribution/prove/pre_programmed_distributions/mod.rs new file mode 100644 index 00000000000..546c04c7cf5 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/distribution/prove/pre_programmed_distributions/mod.rs @@ -0,0 +1,50 @@ +use crate::drive::tokens::distribution::queries::{ + pre_programmed_distributions_query, QueryPreProgrammedDistributionStartAt, +}; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; + +impl Drive { + /// Fetches the pre‑programmed distributions for a token as a proof. + /// + /// This method queries the backing store for the pre‑programmed distributions tree at the path + /// defined by `token_pre_programmed_distributions_path_vec(token_id)`. It then extracts a nested + /// mapping where: + /// + /// - **Outer keys:** Are timestamps (`TimestampMillis`) representing each distribution time, + /// extracted from the 5th path component (index 4). The time is expected to be stored as 4 bytes in big‑endian. + /// - **Inner keys:** Are recipient identifiers (`Identifier`) derived from the query key. + /// - **Values:** Are token amounts (`TokenAmount`), extracted from elements that are sum items. + /// + /// # Parameters + /// + /// - `token_id`: The 32‑byte identifier for the token. + /// - `drive_operations`: A mutable vector to accumulate low-level drive operations. + /// - `transaction`: The current GroveDB transaction. + /// - `platform_version`: The platform version to use. + /// + /// # Returns + /// + /// A `Result` containing a nested `BTreeMap` on success or an `Error` on failure. + pub(super) fn prove_token_pre_programmed_distributions_operations_v0( + &self, + token_id: [u8; 32], + start_at: Option, + limit: Option, + drive_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let path_query = pre_programmed_distributions_query(token_id, start_at, limit); + + self.grove_get_proved_path_query( + &path_query, + transaction, + drive_operations, + &platform_version.drive, + ) + } +} diff --git a/packages/rs-drive/src/drive/tokens/distribution/queries.rs b/packages/rs-drive/src/drive/tokens/distribution/queries.rs new file mode 100644 index 00000000000..b676a24db5b --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/distribution/queries.rs @@ -0,0 +1,81 @@ +use crate::drive::tokens::paths::token_pre_programmed_distributions_path_vec; +use crate::query::QueryItem; +use dpp::identifier::Identifier; +use dpp::prelude::{StartAtIncluded, TimestampMillis}; +use grovedb::{PathQuery, Query, SizedQuery}; + +/// Defines the starting point for a query on pre-programmed token distributions. +/// +/// # Usage +/// +/// This struct is used to define a query range when retrieving pre-programmed distributions. +/// It allows queries to start at a specific point instead of always fetching the full dataset. +pub struct QueryPreProgrammedDistributionStartAt { + /// The timestamp (in milliseconds) from which distributions should be queried. + /// Only distributions at or after this time will be included. + pub start_at_time: TimestampMillis, + + /// An optional recipient filter that specifies a recipient to start querying from within the given timestamp. + /// + /// - If `Some((recipient, StartAtIncluded::Yes))`, the query will start **from** this recipient. + /// - If `Some((recipient, StartAtIncluded::No))`, the query will start **after** this recipient. + /// - If `None`, the query will return all recipients from `start_at_time`. + pub start_at_recipient: Option<(Identifier, StartAtIncluded)>, +} + +/// Constructs a query that fetches the entire pre‑programmed distributions subtree for a token. +/// +/// The query uses the path returned by `token_pre_programmed_distributions_path_vec(token_id)` and +/// inserts a full‑range query (i.e. `RangeFull`) so that all time keys are returned. +/// +/// # Parameters +/// +/// - `token_id`: The 32‑byte identifier for the token. +/// - `limit`: An optional limit +/// +/// # Returns +/// +/// A `PathQuery` that, when executed, will return all entries under the token’s +/// pre‑programmed distributions tree. +pub fn pre_programmed_distributions_query( + token_id: [u8; 32], + start_at: Option, + limit: Option, +) -> PathQuery { + let path = token_pre_programmed_distributions_path_vec(token_id); + let query = match start_at { + None => { + let mut query = Query::new_range_full(); + query.set_subquery(Query::new_range_full()); + query + } + Some(QueryPreProgrammedDistributionStartAt { + start_at_time, + start_at_recipient, + }) => { + let mut query = Query::new_single_query_item(QueryItem::RangeFrom( + start_at_time.to_be_bytes().to_vec().., + )); + query.set_subquery(Query::new_range_full()); + if let Some((start_at_recipient, included)) = start_at_recipient { + let subquery = if included { + Query::new_single_query_item(QueryItem::RangeFrom( + start_at_recipient.to_vec().., + )) + } else { + Query::new_single_query_item(QueryItem::RangeAfter( + start_at_recipient.to_vec().., + )) + }; + query.add_conditional_subquery( + QueryItem::Key(start_at_time.to_be_bytes().to_vec()), + None, + Some(subquery), + ) + } + query + } + }; + + PathQuery::new(path, SizedQuery::new(query, limit, None)) +} diff --git a/packages/rs-drive/src/drive/tokens/estimated_costs/for_root_token_ms_interval_distribution/mod.rs b/packages/rs-drive/src/drive/tokens/estimated_costs/for_root_token_ms_interval_distribution/mod.rs new file mode 100644 index 00000000000..7ea7d03fd5a --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/estimated_costs/for_root_token_ms_interval_distribution/mod.rs @@ -0,0 +1,40 @@ +mod v0; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use dpp::prelude::TimestampMillis; +use dpp::version::drive_versions::DriveVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerInformation; +use std::collections::HashMap; + +impl Drive { + pub(crate) fn add_estimation_costs_for_root_token_ms_interval_distribution<'a, I>( + times: I, + estimated_costs_only_with_layer_info: &mut HashMap, + drive_version: &DriveVersion, + ) -> Result<(), Error> + where + I: IntoIterator + ExactSizeIterator, + { + match drive_version + .methods + .identity + .cost_estimation + .for_root_token_ms_interval_distribution + { + 0 => { + Self::add_estimation_costs_for_root_token_ms_interval_distribution_v0( + times, + estimated_costs_only_with_layer_info, + ); + Ok(()) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_estimation_costs_for_root_token_ms_interval_distribution".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/estimated_costs/for_root_token_ms_interval_distribution/v0/mod.rs b/packages/rs-drive/src/drive/tokens/estimated_costs/for_root_token_ms_interval_distribution/v0/mod.rs new file mode 100644 index 00000000000..6efd7d1575d --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/estimated_costs/for_root_token_ms_interval_distribution/v0/mod.rs @@ -0,0 +1,65 @@ +use crate::drive::tokens::paths::{ + token_ms_timed_at_time_distributions_path_vec, token_ms_timed_distributions_path_vec, + token_timed_distributions_path_vec, +}; +use crate::drive::Drive; +use crate::util::type_constants::{ + DEFAULT_HASH_SIZE_U32, DEFAULT_HASH_SIZE_U8, U64_SIZE_U8, U8_SIZE_U8, +}; +use dpp::prelude::TimestampMillis; +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerCount::EstimatedLevel; +use grovedb::EstimatedLayerSizes::{AllReference, AllSubtrees}; +use grovedb::EstimatedSumTrees::NoSumTrees; +use grovedb::{EstimatedLayerInformation, TreeType}; +use std::collections::HashMap; + +impl Drive { + pub(super) fn add_estimation_costs_for_root_token_ms_interval_distribution_v0<'a, I>( + times: I, + estimated_costs_only_with_layer_info: &mut HashMap, + ) where + I: IntoIterator + ExactSizeIterator, + { + // 1. Insert estimation for the generic timed distributions tree. + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_owned_path(token_timed_distributions_path_vec()), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(0, false), // 0 because ms is on top + estimated_layer_sizes: AllSubtrees(U8_SIZE_U8, NoSumTrees, None), + }, + ); + + // 2. Insert estimation for the millisecond-timed distributions tree. + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_owned_path(token_ms_timed_distributions_path_vec()), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(10, false), // we can have a lot of times + estimated_layer_sizes: AllSubtrees(U64_SIZE_U8, NoSumTrees, None), + }, + ); + + // 3. For each provided timestamp, add an estimation entry for the at-time ms distribution sum tree. + for time in times { + let key = KeyInfoPath::from_known_owned_path( + token_ms_timed_at_time_distributions_path_vec(*time), + ); + estimated_costs_only_with_layer_info.insert( + key, + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + // We assume a shallow sum tree for the distribution entries at a given time. + estimated_layer_count: EstimatedLevel(1, false), + // Each distribution entry is estimated with a fixed size. + estimated_layer_sizes: AllReference( + DEFAULT_HASH_SIZE_U8, + DEFAULT_HASH_SIZE_U32 * 2 + 2, + None, + ), + }, + ); + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_pre_programmed_distribution/mod.rs b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_pre_programmed_distribution/mod.rs new file mode 100644 index 00000000000..b83b6c58961 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_pre_programmed_distribution/mod.rs @@ -0,0 +1,72 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use dpp::prelude::TimestampMillis; +use dpp::version::drive_versions::DriveVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerInformation; +use std::collections::HashMap; + +impl Drive { + /// Adds cost estimation entries for a token's pre-programmed distribution tree. + /// + /// This function updates the provided `estimated_costs_only_with_layer_info` hashmap with estimation entries + /// for each layer in the pre-programmed distribution tree associated with a specific token. The tree structure + /// includes: + /// + /// - The root level of the pre-programmed distributions. + /// - The token-specific subtree (keyed by `token_id`). + /// - One sum tree per distribution time (each timestamp in `times`). + /// + /// The function selects the appropriate estimation logic based on the provided `drive_version`. + /// + /// # Parameters + /// + /// - `token_id`: The 32-byte identifier for the token whose pre-programmed distribution tree is being estimated. + /// - `times`: A vector of timestamps (in milliseconds) for which pre-programmed distributions exist. + /// - `estimated_costs_only_with_layer_info`: A mutable hashmap that maps `KeyInfoPath` to `EstimatedLayerInformation`. + /// This cache is used by Grovedb to track the estimated storage costs for each layer in the tree. + /// - `drive_version`: The drive version that determines which estimation logic to use. + /// + /// # Returns + /// + /// - `Ok(())` if the estimation entries were successfully added. + /// - `Err(DriveError::UnknownVersionMismatch)` if the provided `drive_version` does not match any supported version. + /// + /// # Errors + /// + /// Returns an error if the `drive_version` is not recognized, ensuring that only supported estimation + /// implementations are applied. + pub(crate) fn add_estimation_costs_for_token_pre_programmed_distribution<'a, I>( + token_id: [u8; 32], + times: I, + estimated_costs_only_with_layer_info: &mut HashMap, + drive_version: &DriveVersion, + ) -> Result<(), Error> + where + I: IntoIterator + ExactSizeIterator, + { + match drive_version + .methods + .identity + .cost_estimation + .for_token_pre_programmed_distribution + { + 0 => { + Self::add_estimation_costs_for_token_pre_programmed_distribution_v0( + token_id, + times, + estimated_costs_only_with_layer_info, + ); + Ok(()) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_estimation_costs_for_pre_programmed_distribution".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_pre_programmed_distribution/v0/mod.rs b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_pre_programmed_distribution/v0/mod.rs new file mode 100644 index 00000000000..43590bf1d4f --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_pre_programmed_distribution/v0/mod.rs @@ -0,0 +1,81 @@ +use crate::drive::tokens::paths::{ + token_distributions_root_path_vec, token_pre_programmed_at_time_distribution_path_vec, + token_pre_programmed_distributions_path_vec, token_root_pre_programmed_distributions_path_vec, +}; +use crate::drive::Drive; +use crate::util::type_constants::{DEFAULT_HASH_SIZE_U8, U64_SIZE_U32, U64_SIZE_U8, U8_SIZE_U8}; +use dpp::prelude::TimestampMillis; +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerCount::{ApproximateElements, EstimatedLevel}; +use grovedb::EstimatedLayerSizes::{AllItems, AllSubtrees}; +use grovedb::EstimatedSumTrees::{AllSumTrees, NoSumTrees}; +use grovedb::{EstimatedLayerInformation, TreeType}; +use std::collections::HashMap; + +impl Drive { + /// Version 0 of the estimation function for pre-programmed distributions. + /// + /// This function adds estimation cost entries for: + /// 1. The root pre-programmed distributions tree. + /// 2. The token-specific subtree (using `token_id`). + /// 3. Each time-specific sum tree for every timestamp in `times`. + /// + /// # Parameters + /// - `token_id`: The identifier for the token. + /// - `times`: A vector of timestamps (in milliseconds) for which pre-programmed distributions exist. + /// - `estimated_costs_only_with_layer_info`: A mutable hashmap that holds estimated layer information. + pub(crate) fn add_estimation_costs_for_token_pre_programmed_distribution_v0<'a, I>( + token_id: [u8; 32], + times: I, + estimated_costs_only_with_layer_info: &mut HashMap, + ) where + I: IntoIterator + ExactSizeIterator, + { + // 1. Add estimation for the root distributions tree. + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_owned_path(token_distributions_root_path_vec()), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(1, false), // We should be on the first level + estimated_layer_sizes: AllSubtrees(U8_SIZE_U8, NoSumTrees, None), + }, + ); + + // 2. Add estimation for the root pre-programmed distributions tree. + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_owned_path(token_root_pre_programmed_distributions_path_vec()), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(10, false), // Just an estimate + estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_SIZE_U8, NoSumTrees, None), + }, + ); + + // 3. Add estimation for the token-specific pre-programmed distributions subtree. + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_owned_path(token_pre_programmed_distributions_path_vec( + token_id, + )), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + // At this level, expect as many children as there are time entries. + estimated_layer_count: ApproximateElements(times.len() as u32), + estimated_layer_sizes: AllSubtrees(U64_SIZE_U8, AllSumTrees, None), + }, + ); + + // 4. For each provided timestamp, add an estimation for the at-time sum tree. + for time in times { + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_owned_path( + token_pre_programmed_at_time_distribution_path_vec(token_id, *time), + ), + EstimatedLayerInformation { + tree_type: TreeType::SumTree, + estimated_layer_count: EstimatedLevel(3, false), // probably not that many + estimated_layer_sizes: AllItems(DEFAULT_HASH_SIZE_U8, U64_SIZE_U32, None), + }, + ); + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/estimated_costs/mod.rs b/packages/rs-drive/src/drive/tokens/estimated_costs/mod.rs index 8028de53755..b0ebc0bb9d1 100644 --- a/packages/rs-drive/src/drive/tokens/estimated_costs/mod.rs +++ b/packages/rs-drive/src/drive/tokens/estimated_costs/mod.rs @@ -9,3 +9,9 @@ pub mod for_token_identity_infos; /// Module for handling operations related to token status information. pub mod for_token_status_infos; + +/// Module for handling operations related to token pre-programmed distribution. +pub mod for_token_pre_programmed_distribution; + +/// Module for handling operations related to token interval distribution. +pub mod for_root_token_ms_interval_distribution; diff --git a/packages/rs-drive/src/drive/tokens/mod.rs b/packages/rs-drive/src/drive/tokens/mod.rs index 146fd9b29b3..c6ba59c841d 100644 --- a/packages/rs-drive/src/drive/tokens/mod.rs +++ b/packages/rs-drive/src/drive/tokens/mod.rs @@ -44,8 +44,9 @@ pub mod unfreeze; #[cfg(feature = "server")] pub mod calculate_total_tokens_balance; -/// Token status module, like if the token is paused -pub mod status; - +/// Distribution module +pub mod distribution; /// Token paths pub mod paths; +/// Token status module, like if the token is paused +pub mod status; diff --git a/packages/rs-drive/src/drive/tokens/paths.rs b/packages/rs-drive/src/drive/tokens/paths.rs index ce5b8ef89ce..8e212c58c78 100644 --- a/packages/rs-drive/src/drive/tokens/paths.rs +++ b/packages/rs-drive/src/drive/tokens/paths.rs @@ -1,12 +1,57 @@ use crate::drive::RootTree; +use dpp::block::block_info::BlockInfo; +use dpp::block::epoch::EpochIndex; +use dpp::data_contract::associated_token::token_perpetual_distribution::methods::v0::TokenPerpetualDistributionV0Accessors; +use dpp::data_contract::associated_token::token_perpetual_distribution::reward_distribution_type::RewardDistributionType; +use dpp::data_contract::associated_token::token_perpetual_distribution::TokenPerpetualDistribution; +use dpp::prelude::{BlockHeight, TimestampMillis}; + +// ROOT TOKEN LEVEL /// Key for accessing token status information. -pub const TOKEN_STATUS_INFO_KEY: u8 = 96; +pub const TOKEN_STATUS_INFO_KEY: u8 = 64; /// Key for accessing token identity information tree. -pub const TOKEN_IDENTITY_INFO_KEY: u8 = 160; +pub const TOKEN_IDENTITY_INFO_KEY: u8 = 192; /// Key for accessing token balances tree. pub const TOKEN_BALANCES_KEY: u8 = 128; +/// Key for token distributions sub level +pub const TOKEN_DISTRIBUTIONS_KEY: u8 = 32; + +// The Token Merk tree looks like +// TOKEN_BALANCES_KEY +// / \ +// TOKEN_STATUS_INFO_KEY TOKEN_IDENTITY_INFO_KEY +// / +// TOKEN_DISTRIBUTIONS_KEY + +// The token distribution Tree level + +/// Key for the perpetual distributions. +pub const TOKEN_TIMED_DISTRIBUTIONS_KEY: u8 = 128; + +/// Key for the perpetual distributions. +pub const TOKEN_PERPETUAL_DISTRIBUTIONS_KEY: u8 = 64; + +/// Key for the pre-programmed distributions +pub const TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS_KEY: u8 = 192; + +// The Token Distribution Merk tree looks like +// TOKEN_TIMED_DISTRIBUTIONS_KEY +// / \ +// TOKEN_PERPETUAL_DISTRIBUTIONS_KEY TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS_KEY + +// Then inside the timed distribution Merk tree we have + +/// Key for the millisecond timed token distributions. +pub const TOKEN_MS_TIMED_DISTRIBUTIONS_KEY: u8 = 128; + +/// Key for the block timed token distributions. +pub const TOKEN_BLOCK_TIMED_DISTRIBUTIONS_KEY: u8 = 64; + +/// Key for the epoch timed token distributions. +pub const TOKEN_EPOCH_TIMED_DISTRIBUTIONS_KEY: u8 = 192; + /// The path for the balances tree pub fn tokens_root_path() -> [&'static [u8]; 1] { @@ -64,6 +109,271 @@ pub fn token_statuses_root_path_vec() -> Vec> { vec![vec![RootTree::Tokens as u8], vec![TOKEN_STATUS_INFO_KEY]] } +/// Returns the root path for token distributions as a fixed-size array of byte slices. +pub fn token_distributions_root_path() -> [&'static [u8]; 2] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_DISTRIBUTIONS_KEY], + ] +} + +/// Returns the root path for token distributions as a vector of byte vectors. +pub fn token_distributions_root_path_vec() -> Vec> { + vec![vec![RootTree::Tokens as u8], vec![TOKEN_DISTRIBUTIONS_KEY]] +} + +/// The path for the token timed distributions tree +pub fn token_timed_distributions_path() -> [&'static [u8]; 3] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_DISTRIBUTIONS_KEY], + &[TOKEN_TIMED_DISTRIBUTIONS_KEY], + ] +} + +/// The path for the token timed distributions tree as a vector +pub fn token_timed_distributions_path_vec() -> Vec> { + vec![ + vec![RootTree::Tokens as u8], + vec![TOKEN_DISTRIBUTIONS_KEY], + vec![TOKEN_TIMED_DISTRIBUTIONS_KEY], + ] +} + +/// The path for the token perpetual distributions tree +pub fn token_root_perpetual_distributions_path() -> [&'static [u8]; 3] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_DISTRIBUTIONS_KEY], + &[TOKEN_PERPETUAL_DISTRIBUTIONS_KEY], + ] +} + +/// The path for the token perpetual distributions tree as a vector +pub fn token_root_perpetual_distributions_path_vec() -> Vec> { + vec![ + vec![RootTree::Tokens as u8], + vec![TOKEN_DISTRIBUTIONS_KEY], + vec![TOKEN_PERPETUAL_DISTRIBUTIONS_KEY], + ] +} + +/// The path for the token perpetual distributions tree for a token +pub fn token_perpetual_distributions_path(token_id: &[u8; 32]) -> [&[u8]; 4] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_DISTRIBUTIONS_KEY], + &[TOKEN_PERPETUAL_DISTRIBUTIONS_KEY], + token_id, + ] +} + +/// The path for the token perpetual distributions tree for a token as a vector +pub fn token_perpetual_distributions_path_vec(token_id: [u8; 32]) -> Vec> { + vec![ + vec![RootTree::Tokens as u8], + vec![TOKEN_DISTRIBUTIONS_KEY], + vec![TOKEN_PERPETUAL_DISTRIBUTIONS_KEY], + token_id.to_vec(), + ] +} + +/// The path for the token pre-programmed distributions tree +pub fn token_root_pre_programmed_distributions_path() -> [&'static [u8]; 3] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_DISTRIBUTIONS_KEY], + &[TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS_KEY], + ] +} + +/// The path for the token pre-programmed distributions tree as a vector +pub fn token_root_pre_programmed_distributions_path_vec() -> Vec> { + vec![ + vec![RootTree::Tokens as u8], + vec![TOKEN_DISTRIBUTIONS_KEY], + vec![TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS_KEY], + ] +} + +/// The path for the token pre-programmed distributions tree +pub fn token_pre_programmed_distributions_path(token_id: &[u8; 32]) -> [&[u8]; 4] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_DISTRIBUTIONS_KEY], + &[TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS_KEY], + token_id, + ] +} + +/// The path for the token pre-programmed distributions tree as a vector +pub fn token_pre_programmed_distributions_path_vec(token_id: [u8; 32]) -> Vec> { + vec![ + vec![RootTree::Tokens as u8], + vec![TOKEN_DISTRIBUTIONS_KEY], + vec![TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS_KEY], + token_id.to_vec(), + ] +} + +/// The path for the token pre-programmed distribution tree at a given time +/// These refer to sum trees +pub fn token_pre_programmed_at_time_distribution_path<'a>( + token_id: &'a [u8; 32], + time_bytes: &'a [u8; 4], +) -> [&'a [u8]; 5] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_DISTRIBUTIONS_KEY], + &[TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS_KEY], + token_id, + time_bytes, + ] +} + +/// The path for the token pre-programmed distribution tree at a given time as a vector +/// These refer to sum trees +pub fn token_pre_programmed_at_time_distribution_path_vec( + token_id: [u8; 32], + timestamp: TimestampMillis, +) -> Vec> { + vec![ + vec![RootTree::Tokens as u8], + vec![TOKEN_DISTRIBUTIONS_KEY], + vec![TOKEN_PRE_PROGRAMMED_DISTRIBUTIONS_KEY], + token_id.to_vec(), + timestamp.to_be_bytes().to_vec(), + ] +} + +/// The path for the millisecond timed token distributions tree +pub fn token_ms_timed_distributions_path() -> [&'static [u8]; 4] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_DISTRIBUTIONS_KEY], + &[TOKEN_TIMED_DISTRIBUTIONS_KEY], + &[TOKEN_MS_TIMED_DISTRIBUTIONS_KEY], + ] +} + +/// The path for the millisecond timed token distributions tree as a vector +pub fn token_ms_timed_distributions_path_vec() -> Vec> { + vec![ + vec![RootTree::Tokens as u8], + vec![TOKEN_DISTRIBUTIONS_KEY], + vec![TOKEN_TIMED_DISTRIBUTIONS_KEY], + vec![TOKEN_MS_TIMED_DISTRIBUTIONS_KEY], + ] +} + +/// The path for the millisecond timed token distributions tree +pub fn token_ms_timed_at_time_distributions_path(timestamp_bytes: &[u8; 4]) -> [&[u8]; 5] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_DISTRIBUTIONS_KEY], + &[TOKEN_TIMED_DISTRIBUTIONS_KEY], + &[TOKEN_MS_TIMED_DISTRIBUTIONS_KEY], + timestamp_bytes, + ] +} + +/// The path for the millisecond timed token distributions tree as a vector +pub fn token_ms_timed_at_time_distributions_path_vec(time: TimestampMillis) -> Vec> { + vec![ + vec![RootTree::Tokens as u8], + vec![TOKEN_DISTRIBUTIONS_KEY], + vec![TOKEN_TIMED_DISTRIBUTIONS_KEY], + vec![TOKEN_MS_TIMED_DISTRIBUTIONS_KEY], + time.to_be_bytes().to_vec(), + ] +} + +/// The path for the block timed token distributions tree +pub fn token_block_timed_distributions_path() -> [&'static [u8]; 4] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_DISTRIBUTIONS_KEY], + &[TOKEN_TIMED_DISTRIBUTIONS_KEY], + &[TOKEN_BLOCK_TIMED_DISTRIBUTIONS_KEY], + ] +} + +/// The path for the block timed token distributions tree as a vector +pub fn token_block_timed_distributions_path_vec() -> Vec> { + vec![ + vec![RootTree::Tokens as u8], + vec![TOKEN_DISTRIBUTIONS_KEY], + vec![TOKEN_TIMED_DISTRIBUTIONS_KEY], + vec![TOKEN_BLOCK_TIMED_DISTRIBUTIONS_KEY], + ] +} + +/// The path for the block timed at a specific block height token distributions tree +pub fn token_block_timed_at_block_distributions_path(block_height_bytes: &[u8; 4]) -> [&[u8]; 5] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_DISTRIBUTIONS_KEY], + &[TOKEN_TIMED_DISTRIBUTIONS_KEY], + &[TOKEN_BLOCK_TIMED_DISTRIBUTIONS_KEY], + block_height_bytes, + ] +} + +/// The path for the block timed at a specific block height token distributions tree as a vector +pub fn token_block_timed_at_block_distributions_path_vec( + block_height: BlockHeight, +) -> Vec> { + vec![ + vec![RootTree::Tokens as u8], + vec![TOKEN_DISTRIBUTIONS_KEY], + vec![TOKEN_TIMED_DISTRIBUTIONS_KEY], + vec![TOKEN_BLOCK_TIMED_DISTRIBUTIONS_KEY], + block_height.to_be_bytes().to_vec(), + ] +} + +/// The path for the epoch timed token distributions tree +pub fn token_epoch_timed_distributions_path() -> [&'static [u8]; 4] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_DISTRIBUTIONS_KEY], + &[TOKEN_TIMED_DISTRIBUTIONS_KEY], + &[TOKEN_EPOCH_TIMED_DISTRIBUTIONS_KEY], + ] +} + +/// The path for the epoch timed token distributions tree as a vector +pub fn token_epoch_timed_distributions_path_vec() -> Vec> { + vec![ + vec![RootTree::Tokens as u8], + vec![TOKEN_DISTRIBUTIONS_KEY], + vec![TOKEN_TIMED_DISTRIBUTIONS_KEY], + vec![TOKEN_EPOCH_TIMED_DISTRIBUTIONS_KEY], + ] +} + +/// The path for the epoch timed at a specific epoch token distributions tree +pub fn token_epoch_timed_at_epoch_distributions_path(epoch_index_bytes: &[u8; 2]) -> [&[u8]; 5] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_DISTRIBUTIONS_KEY], + &[TOKEN_TIMED_DISTRIBUTIONS_KEY], + &[TOKEN_EPOCH_TIMED_DISTRIBUTIONS_KEY], + epoch_index_bytes, + ] +} + +/// The path for the epoch timed at a specific epoch token distributions tree as a vector +pub fn token_epoch_timed_at_epoch_distributions_path_vec(epoch_index: EpochIndex) -> Vec> { + vec![ + vec![RootTree::Tokens as u8], + vec![TOKEN_DISTRIBUTIONS_KEY], + vec![TOKEN_TIMED_DISTRIBUTIONS_KEY], + vec![TOKEN_EPOCH_TIMED_DISTRIBUTIONS_KEY], + epoch_index.to_be_bytes().to_vec(), + ] +} + /// The path for the token balances tree pub fn token_balances_path(token_id: &[u8; 32]) -> [&[u8]; 3] { @@ -103,3 +413,66 @@ pub fn token_identity_infos_path_vec(token_id: [u8; 32]) -> Vec> { token_id.to_vec(), ] } + +/// Paths for the token perpetual distribution +pub trait TokenPerpetualDistributionPaths { + /// Returns the path where the perpetual distribution times should be stored. + fn root_distribution_path(&self) -> Vec>; + + /// Returns the path where the perpetual distribution should be stored. + fn distribution_path(&self, unit: u64) -> Vec>; + /// Returns the path where the perpetual distribution should be stored. + fn distribution_path_for_next_interval(&self, block_info: &BlockInfo) -> Vec>; +} + +impl TokenPerpetualDistributionPaths for TokenPerpetualDistribution { + fn root_distribution_path(&self) -> Vec> { + match self.distribution_type() { + RewardDistributionType::BlockBasedDistribution(_, _, _) => { + token_block_timed_distributions_path_vec() + } + RewardDistributionType::TimeBasedDistribution(_, _, _) => { + token_ms_timed_distributions_path_vec() + } + RewardDistributionType::EpochBasedDistribution(_, _, _) => { + token_epoch_timed_distributions_path_vec() + } + } + } + + fn distribution_path(&self, unit: u64) -> Vec> { + match self.distribution_type() { + RewardDistributionType::BlockBasedDistribution(_, _, _) => { + token_block_timed_at_block_distributions_path_vec(unit) + } + RewardDistributionType::TimeBasedDistribution(_, _, _) => { + token_ms_timed_at_time_distributions_path_vec(unit) + } + RewardDistributionType::EpochBasedDistribution(_, _, _) => { + token_epoch_timed_at_epoch_distributions_path_vec(unit as EpochIndex) + } + } + } + + fn distribution_path_for_next_interval(&self, block_info: &BlockInfo) -> Vec> { + match self.distribution_type() { + // If the distribution is based on block height, return the next height where emissions occur. + RewardDistributionType::BlockBasedDistribution(interval, _, _) => { + let height = block_info.height - block_info.height % interval + interval; + token_block_timed_at_block_distributions_path_vec(height) + } + + // If the distribution is based on time, return the next timestamp in milliseconds. + RewardDistributionType::TimeBasedDistribution(interval, _, _) => { + let time = block_info.time_ms - block_info.time_ms % interval + interval; + token_ms_timed_at_time_distributions_path_vec(time) + } + + // If the distribution is based on epochs, return the next epoch index. + RewardDistributionType::EpochBasedDistribution(interval, _, _) => { + let index = block_info.epoch.index - block_info.epoch.index % interval + interval; + token_epoch_timed_at_epoch_distributions_path_vec(index) + } + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/mod.rs index dfe33f1a82e..6fd5f24a8eb 100644 --- a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/mod.rs @@ -2,7 +2,7 @@ use derive_more::From; use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; use dpp::identifier::Identifier; -use dpp::prelude::{DerivationEncryptionKeyIndex, RecipientKeyIndex, RootEncryptionKeyIndex, SenderKeyIndex}; +use dpp::prelude::{DerivationEncryptionKeyIndex, RootEncryptionKeyIndex}; use dpp::state_transition::batch_transition::token_transfer_transition::{PrivateEncryptedNote, SharedEncryptedNote}; /// transformer module diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/mod.rs index b5766e16a36..7cec7fc2be0 100644 --- a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/mod.rs @@ -4,8 +4,7 @@ use std::sync::Arc; use dpp::identifier::Identifier; use dpp::prelude::{ - DerivationEncryptionKeyIndex, IdentityNonce, RecipientKeyIndex, RootEncryptionKeyIndex, - SenderKeyIndex, + DerivationEncryptionKeyIndex, IdentityNonce, RootEncryptionKeyIndex, }; use dpp::state_transition::batch_transition::token_transfer_transition::{PrivateEncryptedNote, SharedEncryptedNote}; use crate::drive::contract::DataContractFetchInfo; diff --git a/packages/rs-drive/src/util/grove_operations/batch_insert_empty_sum_tree/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_insert_empty_sum_tree/v0/mod.rs index fb76aa3f18c..ce546e65907 100644 --- a/packages/rs-drive/src/util/grove_operations/batch_insert_empty_sum_tree/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/batch_insert_empty_sum_tree/v0/mod.rs @@ -8,7 +8,7 @@ use grovedb::batch::KeyInfoPath; impl Drive { /// Pushes an "insert empty tree" operation to `drive_operations`. - pub(crate) fn batch_insert_empty_sum_tree_v0<'a, 'c, P>( + pub(super) fn batch_insert_empty_sum_tree_v0<'a, 'c, P>( &'a self, path: P, key_info: DriveKeyInfo<'c>, diff --git a/packages/rs-drive/src/util/grove_operations/batch_insert_empty_tree_if_not_exists/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_insert_empty_tree_if_not_exists/v0/mod.rs index e1b0dc30b38..48b6760cf5d 100644 --- a/packages/rs-drive/src/util/grove_operations/batch_insert_empty_tree_if_not_exists/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/batch_insert_empty_tree_if_not_exists/v0/mod.rs @@ -16,7 +16,7 @@ use grovedb::{TransactionArg, TreeType}; impl Drive { /// Pushes an "insert empty tree where path key does not yet exist" operation to `drive_operations`. /// Will also check the current drive operations - pub(crate) fn batch_insert_empty_tree_if_not_exists_v0( + pub(super) fn batch_insert_empty_tree_if_not_exists_v0( &self, path_key_info: PathKeyInfo, tree_type: TreeType, diff --git a/packages/rs-drive/src/verify/tokens/mod.rs b/packages/rs-drive/src/verify/tokens/mod.rs index 22103115109..ce99086b616 100644 --- a/packages/rs-drive/src/verify/tokens/mod.rs +++ b/packages/rs-drive/src/verify/tokens/mod.rs @@ -4,6 +4,7 @@ mod verify_token_balances_for_identity_ids; mod verify_token_info_for_identity_id; mod verify_token_infos_for_identity_id; mod verify_token_infos_for_identity_ids; +mod verify_token_pre_programmed_distributions; mod verify_token_status; mod verify_token_statuses; mod verify_token_total_supply_and_aggregated_identity_balance; diff --git a/packages/rs-drive/src/verify/tokens/verify_token_pre_programmed_distributions/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_pre_programmed_distributions/mod.rs new file mode 100644 index 00000000000..14459c02970 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_pre_programmed_distributions/mod.rs @@ -0,0 +1,71 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use dpp::balances::credits::TokenAmount; +use dpp::identifier::Identifier; +use dpp::prelude::TimestampMillis; + +use crate::error::Error; + +use crate::verify::RootHash; + +use crate::drive::tokens::distribution::queries::QueryPreProgrammedDistributionStartAt; +use dpp::version::PlatformVersion; + +impl Drive { + /// Verifies the pre-programmed token distributions using a cryptographic proof. + /// + /// This function checks the proof and reconstructs the token’s pre-programmed distributions + /// for all timestamps and recipients. It uses generics to allow flexibility in return types. + /// + /// # Parameters + /// - `proof`: The cryptographic proof. + /// - `token_id`: The ID of the token (32-byte array). + /// - `verify_subset_of_proof`: Whether to verify only a subset of the proof. + /// - `platform_version`: The current platform version. + /// + /// # Returns + /// - `Ok((RootHash, T))`: + /// - `RootHash`: The verified root hash of the database. + /// - `T`: A collection implementing `FromIterator<(TimestampMillis, D)>` where `D` + /// implements `FromIterator<(Identifier, TokenAmount)>`. + /// + /// # Errors + /// - `Error::Drive(DriveError::UnknownVersionMismatch)` if the platform version is unsupported. + /// - `Error::Proof(ProofError::WrongElementCount)` if the number of elements in the proof is incorrect. + /// - `Error::Proof(ProofError::InvalidSumItemValue)` if the element does not represent a valid sum item. + pub fn verify_token_pre_programmed_distributions< + T: FromIterator<(TimestampMillis, D)>, + D: FromIterator<(Identifier, TokenAmount)>, + >( + proof: &[u8], + token_id: [u8; 32], + start_at: Option, + limit: Option, + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + match platform_version + .drive + .methods + .verify + .token + .verify_token_pre_programmed_distributions + { + 0 => Self::verify_token_pre_programmed_distributions_v0( + proof, + token_id, + start_at, + limit, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_token_pre_programmed_distributions".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_pre_programmed_distributions/v0/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_pre_programmed_distributions/v0/mod.rs new file mode 100644 index 00000000000..c6b9c69935b --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_pre_programmed_distributions/v0/mod.rs @@ -0,0 +1,115 @@ +use crate::drive::tokens::distribution::queries::{ + pre_programmed_distributions_query, QueryPreProgrammedDistributionStartAt, +}; +use crate::drive::Drive; +use crate::error::proof::ProofError; +use crate::error::Error; +use crate::verify::RootHash; +use dpp::balances::credits::TokenAmount; +use dpp::identifier::Identifier; +use dpp::identity::TimestampMillis; +use grovedb::Element::SumItem; +use grovedb::GroveDb; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +impl Drive { + /// Version 0: Verifies the pre-programmed token distributions using a cryptographic proof. + /// + /// This function checks the proof and reconstructs the token’s pre-programmed distributions + /// using generics to allow flexibility in return types. + /// + /// # Parameters + /// - `proof`: The cryptographic proof. + /// - `token_id`: The ID of the token (32-byte array). + /// - `verify_subset_of_proof`: Whether to verify only a subset of the proof. + /// - `platform_version`: The current platform version. + /// + /// # Returns + /// - `Ok((RootHash, T))`: + /// - `RootHash`: The verified root hash of the database. + /// - `T`: A collection implementing `FromIterator<(TimestampMillis, D)>` where `D` + /// implements `FromIterator<(Identifier, TokenAmount)>`. + pub(super) fn verify_token_pre_programmed_distributions_v0< + T: FromIterator<(TimestampMillis, D)>, + D: FromIterator<(Identifier, TokenAmount)>, + >( + proof: &[u8], + token_id: [u8; 32], + start_at: Option, + limit: Option, + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + let path_query = pre_programmed_distributions_query(token_id, start_at, limit); + + let (root_hash, proved_key_values) = if verify_subset_of_proof { + GroveDb::verify_subset_query(proof, &path_query, &platform_version.drive.grove_version)? + } else { + GroveDb::verify_query(proof, &path_query, &platform_version.drive.grove_version)? + }; + + // Group values by TimestampMillis first + let grouped_data = proved_key_values.into_iter().try_fold( + BTreeMap::>::new(), + |mut acc, (mut path, key, element)| { + let time_bytes = path.pop().ok_or_else(|| { + Error::Proof(ProofError::IncorrectElementPath { + expected: path_query.path.clone(), + actual: path.clone(), + }) + })?; + + if time_bytes.len() != 8 { + return Err(Error::Proof(ProofError::IncorrectValueSize( + "time key in pre-programmed distributions is not 8 bytes", + ))); + } + + let time = TimestampMillis::from_be_bytes(time_bytes.try_into().map_err(|_| { + Error::Proof(ProofError::IncorrectValueSize( + "failed to convert timestamp bytes", + )) + })?); + + let recipient = Identifier::from_bytes(&key).map_err(|_| { + Error::Proof(ProofError::IncorrectValueSize( + "failed to parse recipient identifier", + )) + })?; + + let sum_item = match element { + Some(SumItem(value, ..)) if value >= 0 => value as TokenAmount, + Some(SumItem(_, ..)) => { + return Err(Error::Proof(ProofError::CorruptedProof( + "negative token amount in pre-programmed distribution".to_string(), + ))); + } + _ => { + return Err(Error::Proof(ProofError::CorruptedProof( + "proof element was not a sum item".to_string(), + ))); + } + }; + + // Push to the vector for this timestamp + acc.entry(time) + .or_insert_with(Vec::new) + .push((recipient, sum_item)); + + Ok(acc) + }, + )?; + + // Convert grouped data into the final generic result structure `T` + let result = grouped_data + .into_iter() + .map(|(time, recipients)| { + let inner = recipients.into_iter().collect::(); + (time, inner) + }) + .collect::(); + + Ok((root_hash, result)) + } +} diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs index aea9f871338..7a5d65bd3ea 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs @@ -31,6 +31,7 @@ pub struct DriveAbciQueryTokenVersions { pub identity_token_infos: FeatureVersionBounds, pub token_statuses: FeatureVersionBounds, pub token_total_supply: FeatureVersionBounds, + pub token_pre_programmed_distributions: FeatureVersionBounds, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs index ff92cdfcc61..494dfa6f097 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs @@ -104,6 +104,11 @@ pub const DRIVE_ABCI_QUERY_VERSIONS_V1: DriveAbciQueryVersions = DriveAbciQueryV max_version: 0, default_current_version: 0, }, + token_pre_programmed_distributions: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, }, validator_queries: DriveAbciQueryValidatorVersions { proposed_block_counts_by_evonode_ids: FeatureVersionBounds { diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/mod.rs index 958724c7a8b..7528ec11a40 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/mod.rs @@ -70,6 +70,8 @@ pub struct DriveIdentityCostEstimationMethodVersions { pub for_root_key_reference_tree: FeatureVersion, pub for_update_revision: FeatureVersion, pub for_token_identity_infos: FeatureVersion, + pub for_token_pre_programmed_distribution: FeatureVersion, + pub for_root_token_ms_interval_distribution: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/v1.rs index 385078e380f..3db719ae7fa 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/v1.rs @@ -131,6 +131,8 @@ pub const DRIVE_IDENTITY_METHOD_VERSIONS_V1: DriveIdentityMethodVersions = for_root_key_reference_tree: 0, for_update_revision: 0, for_token_identity_infos: 0, + for_token_pre_programmed_distribution: 0, + for_root_token_ms_interval_distribution: 0, }, withdrawals: DriveIdentityWithdrawalMethodVersions { document: DriveIdentityWithdrawalDocumentMethodVersions { diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/mod.rs index e7341f1f6fd..79ae0f0348a 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/mod.rs @@ -8,6 +8,13 @@ pub struct DriveTokenMethodVersions { pub prove: DriveTokenProveMethodVersions, pub update: DriveTokenUpdateMethodVersions, pub calculate_total_tokens_balance: FeatureVersion, + pub distribution: DriveTokenDistributionMethodVersions, +} + +#[derive(Clone, Debug, Default)] +pub struct DriveTokenDistributionMethodVersions { + pub add_perpetual_distribution: FeatureVersion, + pub add_pre_programmed_distributions: FeatureVersion, } #[derive(Clone, Debug, Default)] @@ -22,6 +29,7 @@ pub struct DriveTokenFetchMethodVersions { pub token_status: FeatureVersion, pub token_total_supply: FeatureVersion, pub token_total_aggregated_identity_balances: FeatureVersion, + pub pre_programmed_distributions: FeatureVersion, } #[derive(Clone, Debug, Default)] @@ -34,6 +42,7 @@ pub struct DriveTokenProveMethodVersions { pub identities_token_infos: FeatureVersion, pub token_statuses: FeatureVersion, pub total_supply_and_aggregated_identity_balances: FeatureVersion, + pub pre_programmed_distributions: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/v1.rs index 0d552a43136..d9c6f85d2f3 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/v1.rs @@ -1,6 +1,6 @@ use crate::version::drive_versions::drive_token_method_versions::{ - DriveTokenFetchMethodVersions, DriveTokenMethodVersions, DriveTokenProveMethodVersions, - DriveTokenUpdateMethodVersions, + DriveTokenDistributionMethodVersions, DriveTokenFetchMethodVersions, DriveTokenMethodVersions, + DriveTokenProveMethodVersions, DriveTokenUpdateMethodVersions, }; pub const DRIVE_TOKEN_METHOD_VERSIONS_V1: DriveTokenMethodVersions = DriveTokenMethodVersions { @@ -15,6 +15,7 @@ pub const DRIVE_TOKEN_METHOD_VERSIONS_V1: DriveTokenMethodVersions = DriveTokenM token_status: 0, token_total_supply: 0, token_total_aggregated_identity_balances: 0, + pre_programmed_distributions: 0, }, prove: DriveTokenProveMethodVersions { identity_token_balance: 0, @@ -25,6 +26,7 @@ pub const DRIVE_TOKEN_METHOD_VERSIONS_V1: DriveTokenMethodVersions = DriveTokenM identities_token_infos: 0, token_statuses: 0, total_supply_and_aggregated_identity_balances: 0, + pre_programmed_distributions: 0, }, update: DriveTokenUpdateMethodVersions { create_token_trees: 0, @@ -41,4 +43,8 @@ pub const DRIVE_TOKEN_METHOD_VERSIONS_V1: DriveTokenMethodVersions = DriveTokenM apply_status: 0, }, calculate_total_tokens_balance: 0, + distribution: DriveTokenDistributionMethodVersions { + add_perpetual_distribution: 0, + add_pre_programmed_distributions: 0, + }, }; diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs index d371eabce62..f8082f48198 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs @@ -63,6 +63,7 @@ pub struct DriveVerifyTokenMethodVersions { pub verify_token_balance_for_identity_id: FeatureVersion, pub verify_token_info_for_identity_id: FeatureVersion, pub verify_token_status: FeatureVersion, + pub verify_token_pre_programmed_distributions: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs index 9df4fc8dfd6..666ab416ca7 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs @@ -45,6 +45,7 @@ pub const DRIVE_VERIFY_METHOD_VERSIONS_V1: DriveVerifyMethodVersions = DriveVeri verify_token_balance_for_identity_id: 0, verify_token_info_for_identity_id: 0, verify_token_status: 0, + verify_token_pre_programmed_distributions: 0, }, single_document: DriveVerifySingleDocumentMethodVersions { verify_proof: 0, diff --git a/packages/rs-platform-version/src/version/mocks/v2_test.rs b/packages/rs-platform-version/src/version/mocks/v2_test.rs index 81a8d0dbba1..9a11e69178a 100644 --- a/packages/rs-platform-version/src/version/mocks/v2_test.rs +++ b/packages/rs-platform-version/src/version/mocks/v2_test.rs @@ -242,6 +242,11 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { max_version: 0, default_current_version: 0, }, + token_pre_programmed_distributions: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, }, validator_queries: DriveAbciQueryValidatorVersions { proposed_block_counts_by_evonode_ids: FeatureVersionBounds { diff --git a/packages/wasm-dpp/src/data_contract/state_transition/data_contract_create_transition/mod.rs b/packages/wasm-dpp/src/data_contract/state_transition/data_contract_create_transition/mod.rs index 536995f2b1a..23a3b157fb0 100644 --- a/packages/wasm-dpp/src/data_contract/state_transition/data_contract_create_transition/mod.rs +++ b/packages/wasm-dpp/src/data_contract/state_transition/data_contract_create_transition/mod.rs @@ -81,6 +81,27 @@ impl DataContractCreateTransitionWasm { pub fn get_type(&self) -> u32 { self.0.state_transition_type() as u32 } + + #[wasm_bindgen(js_name=setUserFeeIncrease)] + pub fn set_user_fee_increase(&mut self, user_fee_increase: u16) { + self.0.set_user_fee_increase(user_fee_increase); + } + + #[wasm_bindgen(js_name=getUserFeeIncrease)] + pub fn get_user_fee_increase(&self) -> u16 { + self.0.user_fee_increase() as u16 + } + + #[wasm_bindgen(js_name=getSignature)] + pub fn get_signature(&self) -> Buffer { + Buffer::from_bytes(self.0.signature().as_slice()) + } + + #[wasm_bindgen(js_name=getSignaturePublicKeyId)] + pub fn get_signature_public_key_id(&self) -> u32 { + self.0.signature_public_key_id() + } + // // #[wasm_bindgen(js_name=toJSON)] // pub fn to_json(&self, skip_signature: Option) -> Result { diff --git a/packages/wasm-dpp/src/data_contract/state_transition/data_contract_update_transition/mod.rs b/packages/wasm-dpp/src/data_contract/state_transition/data_contract_update_transition/mod.rs index 02fa59c0b1c..994835a5b6d 100644 --- a/packages/wasm-dpp/src/data_contract/state_transition/data_contract_update_transition/mod.rs +++ b/packages/wasm-dpp/src/data_contract/state_transition/data_contract_update_transition/mod.rs @@ -73,11 +73,36 @@ impl DataContractUpdateTransitionWasm { self.0.owner_id().into() } + #[wasm_bindgen(js_name=getIdentityContractNonce)] + pub fn get_identity_contract_nonce(&self) -> u64 { + self.0.identity_contract_nonce() as u64 + } + #[wasm_bindgen(js_name=getType)] pub fn get_type(&self) -> u32 { self.0.state_transition_type() as u32 } + #[wasm_bindgen(js_name=getUserFeeIncrease)] + pub fn get_user_fee_increase(&self) -> u16 { + self.0.user_fee_increase() as u16 + } + + #[wasm_bindgen(js_name=setUserFeeIncrease)] + pub fn set_user_fee_increase(&mut self, user_fee_increase: u16) { + self.0.set_user_fee_increase(user_fee_increase); + } + + #[wasm_bindgen(js_name=getSignature)] + pub fn get_signature(&self) -> Buffer { + Buffer::from_bytes(self.0.signature().as_slice()) + } + + #[wasm_bindgen(js_name=getSignaturePublicKeyId)] + pub fn get_signature_public_key_id(&self) -> u32 { + self.0.signature_public_key_id() + } + // #[wasm_bindgen(js_name=toJSON)] // pub fn to_json(&self, skip_signature: Option) -> Result { // let serializer = serde_wasm_bindgen::Serializer::json_compatible(); diff --git a/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_create_transition.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_create_transition.rs index 4a5218e30ea..8071b7cd17a 100644 --- a/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_create_transition.rs +++ b/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_create_transition.rs @@ -4,7 +4,10 @@ use dpp::state_transition::batch_transition::document_create_transition::Documen use dpp::document::INITIAL_REVISION; +use dpp::state_transition::batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; use wasm_bindgen::prelude::*; +use dpp::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use dpp::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; #[wasm_bindgen(js_name=DocumentCreateTransition)] #[derive(Debug, Clone)] @@ -81,6 +84,45 @@ impl DocumentCreateTransitionWasm { INITIAL_REVISION as u32 } + #[wasm_bindgen(js_name = getEntropy)] + pub fn get_entropy(&self) -> Vec { + Vec::from(self.inner.entropy()) + } + + #[wasm_bindgen(js_name=getIdentityContractNonce)] + pub fn get_identity_contract_nonce(&self) -> u64 { + self.inner.base().identity_contract_nonce() + } + + #[wasm_bindgen(js_name=setIdentityContractNonce)] + pub fn set_identity_contract_nonce(&mut self, identity_contract_nonce: u64) { + let mut base = self.inner.base().clone(); + + base.set_identity_contract_nonce(identity_contract_nonce); + + self.inner.set_base(base) + } + + #[wasm_bindgen(js_name = getPrefundedVotingBalance)] + pub fn get_prefunded_voting_balance(&self) -> Result { + let prefunded_voting_balance = self.inner.prefunded_voting_balance().clone(); + + match prefunded_voting_balance { + None => Ok(JsValue::null()), + Some((index_name, credits)) => { + let js_object = js_sys::Object::new(); + + js_sys::Reflect::set( + &js_object, + &JsValue::from_str(&index_name), + &JsValue::from(credits), + )?; + + Ok(JsValue::from(js_object)) + } + } + } + // // AbstractDocumentTransitionMethods // #[wasm_bindgen(js_name=getId)] // pub fn id(&self) -> IdentifierWrapper { diff --git a/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_delete_transition.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_delete_transition.rs index df92c0605df..33db1e9491e 100644 --- a/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_delete_transition.rs +++ b/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_delete_transition.rs @@ -1,4 +1,4 @@ -use dpp::state_transition::documents_batch_transition::{ +use dpp::state_transition::batch_transition::{ document_delete_transition, DocumentDeleteTransition, }; @@ -10,9 +10,9 @@ use crate::{ document::document_batch_transition::document_transition::to_object, identifier::IdentifierWrapper, utils::WithJsError, }; -use dpp::state_transition::documents_batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_delete_transition::v0::v0_methods::DocumentDeleteTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_transition::action_type::DocumentTransitionActionType; +use dpp::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; +use dpp::state_transition::batch_transition::document_delete_transition::v0::v0_methods::DocumentDeleteTransitionV0Methods; +use dpp::state_transition::batch_transition::document_transition::action_type::DocumentTransitionActionType; #[wasm_bindgen(js_name=DocumentDeleteTransition)] #[derive(Debug, Clone)] @@ -68,11 +68,30 @@ impl DocumentDeleteTransitionWasm { self.inner.base().document_type_name().clone() } + #[wasm_bindgen(js_name = getEntropy)] + pub fn get_entropy(&self) -> Vec { + Vec::from(self.inner.entropy()) + } + #[wasm_bindgen(js_name=getDataContractId)] pub fn data_contract_id(&self) -> IdentifierWrapper { self.inner.base().data_contract_id().into() } + #[wasm_bindgen(js_name=getIdentityContractNonce)] + pub fn get_identity_contract_nonce(&self) -> u64 { + self.inner.base().identity_contract_nonce() as u64 + } + + #[wasm_bindgen(js_name=setIdentityContractNonce)] + pub fn set_identity_contract_nonce(&mut self, identity_contract_nonce: u64) -> () { + let mut base = self.inner.base().clone(); + + base.set_identity_contract_nonce(identity_contract_nonce); + + self.inner.set_base(base) + } + #[wasm_bindgen(js_name=get)] pub fn get(&self, path: String) -> Result { let _ = path; diff --git a/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_replace_transition.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_replace_transition.rs index e0fcdbaeb3f..8b354ffeb32 100644 --- a/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_replace_transition.rs +++ b/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_replace_transition.rs @@ -3,11 +3,15 @@ use std::convert::TryInto; use serde_json::Value as JsonValue; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; use dpp::platform_value::btreemap_extensions::{ BTreeValueMapHelper, BTreeValueMapPathHelper, BTreeValueMapReplacementPathHelper, }; use dpp::platform_value::ReplacementType; use dpp::prelude::Revision; +use dpp::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; +use dpp::state_transition::batch_transition::document_replace_transition::v0::v0_methods::DocumentReplaceTransitionV0Methods; use dpp::{ prelude::{DataContract, Identifier}, state_transition::documents_batch_transition::{ @@ -18,10 +22,6 @@ use dpp::{ }; use serde::Serialize; use wasm_bindgen::prelude::*; -use dpp::data_contract::accessors::v0::DataContractV0Getters; -use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; -use dpp::state_transition::documents_batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_replace_transition::v0::v0_methods::DocumentReplaceTransitionV0Methods; use crate::{ buffer::Buffer, @@ -31,7 +31,7 @@ use crate::{ utils::{ToSerdeJSONExt, WithJsError}, BinaryType, DataContractWasm, }; -use dpp::state_transition::documents_batch_transition::document_transition::action_type::DocumentTransitionActionType; +use dpp::state_transition::batch_transition::document_transition::action_type::DocumentTransitionActionType; #[wasm_bindgen(js_name=DocumentReplaceTransition)] #[derive(Debug, Clone)] @@ -96,6 +96,11 @@ impl DocumentReplaceTransitionWasm { self.inner.revision() } + #[wasm_bindgen(js_name = getEntropy)] + pub fn get_entropy(&self) -> Vec { + Vec::from(self.inner.entropy()) + } + #[wasm_bindgen(js_name=getUpdatedAt)] pub fn updated_at(&self) -> Option { self.inner @@ -189,6 +194,20 @@ impl DocumentReplaceTransitionWasm { self.inner.base().data_contract_id().into() } + #[wasm_bindgen(js_name=getIdentityContractNonce)] + pub fn get_identity_contract_nonce(&self) -> u64 { + self.inner.base().identity_contract_nonce() as u64 + } + + #[wasm_bindgen(js_name=setIdentityContractNonce)] + pub fn set_identity_contract_nonce(&mut self, identity_contract_nonce: u64) -> () { + let mut base = self.inner.base().clone(); + + base.set_identity_contract_nonce(identity_contract_nonce); + + self.inner.set_base(base) + } + #[wasm_bindgen(js_name=get)] pub fn get(&self, path: String) -> Result { let document_data = if let Some(ref data) = self.inner.data() { diff --git a/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/mod.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/mod.rs index d256c15c600..19c1ada3464 100644 --- a/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/mod.rs +++ b/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/mod.rs @@ -16,7 +16,13 @@ use dpp::{util::json_value::JsonValueExt, ProtocolError}; use serde::Serialize; use serde_json::Value as JsonValue; use wasm_bindgen::prelude::*; - +use dpp::fee::Credits; +use dpp::platform_value::converter::serde_json::BTreeValueJsonConverter; +use dpp::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use dpp::state_transition::batch_transition::document_replace_transition::v0::v0_methods::DocumentReplaceTransitionV0Methods; +use dpp::state_transition::batch_transition::batched_transition::document_purchase_transition::v0::v0_methods::DocumentPurchaseTransitionV0Methods; +use dpp::state_transition::batch_transition::batched_transition::document_transfer_transition::v0::v0_methods::DocumentTransferTransitionV0Methods; +use dpp::state_transition::batch_transition::batched_transition::document_update_price_transition::v0::v0_methods::DocumentUpdatePriceTransitionV0Methods; use crate::{ buffer::Buffer, identifier::{identifier_from_js_value, IdentifierWrapper}, @@ -41,6 +47,28 @@ impl DocumentTransitionWasm { self.0.document_type_name().to_owned() } + #[wasm_bindgen(js_name=getData)] + pub fn get_data(&self) -> JsValue { + match &self.0 { + DocumentTransition::Create(document_create_transition) => { + let json_value = document_create_transition.data().to_json_value().unwrap(); + json_value + .serialize(&serde_wasm_bindgen::Serializer::json_compatible()) + .unwrap() + } + DocumentTransition::Replace(document_replace_transition) => { + let json_value = document_replace_transition.data().to_json_value().unwrap(); + json_value + .serialize(&serde_wasm_bindgen::Serializer::json_compatible()) + .unwrap() + } + DocumentTransition::Delete(_) => JsValue::null(), + DocumentTransition::Transfer(_) => JsValue::null(), + DocumentTransition::UpdatePrice(_) => JsValue::null(), + DocumentTransition::Purchase(_) => JsValue::null(), + } + } + #[wasm_bindgen(js_name=getAction)] pub fn get_action(&self) -> u8 { self.0.action_type() as u8 @@ -58,6 +86,13 @@ impl DocumentTransitionWasm { Ok(()) } + #[wasm_bindgen(js_name=getIdentityContractNonce)] + pub fn get_identity_contract_nonce(&self) -> JsValue { + match self.0.base() { + DocumentBaseTransition::V0(v0) => JsValue::from(v0.identity_contract_nonce), + } + } + #[wasm_bindgen(js_name=getRevision)] pub fn get_revision(&self) -> JsValue { if let Some(revision) = self.0.revision() { @@ -66,6 +101,34 @@ impl DocumentTransitionWasm { JsValue::NULL } } + #[wasm_bindgen(js_name=getEntropy)] + pub fn get_entropy(&self) -> Option> { + self.0.entropy() + } + + #[wasm_bindgen(js_name=get_price)] + pub fn get_price(&self) -> Option { + match &self.0 { + DocumentTransition::Create(_) => None, + DocumentTransition::Replace(_) => None, + DocumentTransition::Delete(_) => None, + DocumentTransition::Transfer(_) => None, + DocumentTransition::UpdatePrice(update_price) => Some(update_price.price()), + DocumentTransition::Purchase(purchase) => Some(purchase.price()), + } + } + + #[wasm_bindgen(js_name=getReceiverId)] + pub fn get_receiver_id(&self) -> Option { + match &self.0 { + DocumentTransition::Create(_) => None, + DocumentTransition::Replace(_) => None, + DocumentTransition::Delete(_) => None, + DocumentTransition::Transfer(transfer) => Some(transfer.recipient_owner_id().into()), + DocumentTransition::UpdatePrice(_) => None, + DocumentTransition::Purchase(_) => None, + } + } #[wasm_bindgen(js_name=setRevision)] pub fn set_revision(&mut self, revision: u32) { @@ -81,6 +144,32 @@ impl DocumentTransitionWasm { _ => false, } } + + #[wasm_bindgen(js_name=getPrefundedVotingBalance)] + pub fn get_prefunded_voting_balance(&self) -> Result { + match &self.0 { + DocumentTransition::Create(create_transition) => { + let prefunded_voting_balance = create_transition.prefunded_voting_balance().clone(); + + if prefunded_voting_balance.is_none() { + return Ok(JsValue::null()); + } + + let (index_name, credits) = prefunded_voting_balance.unwrap(); + + let js_object = js_sys::Object::new(); + + js_sys::Reflect::set( + &js_object, + &JsValue::from_str(&index_name), + &JsValue::from(credits), + )?; + + Ok(JsValue::from(js_object)) + } + _ => Ok(JsValue::null()), + } + } } impl From for DocumentTransitionWasm { diff --git a/packages/wasm-dpp/src/document/state_transition/batch_transition/mod.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/mod.rs index 2b6ed2d5b0b..1e444f52d21 100644 --- a/packages/wasm-dpp/src/document/state_transition/batch_transition/mod.rs +++ b/packages/wasm-dpp/src/document/state_transition/batch_transition/mod.rs @@ -103,6 +103,16 @@ impl BatchTransitionWasm { self.0.owner_id().to_owned().into() } + #[wasm_bindgen(js_name=getUserFeeIncrease)] + pub fn get_user_fee_increase(&self) -> u16 { + self.0.user_fee_increase() as u16 + } + + #[wasm_bindgen(js_name=setUserFeeIncrease)] + pub fn set_user_fee_increase(&mut self, user_fee_increase: u16) { + self.0.set_user_fee_increase(user_fee_increase); + } + #[wasm_bindgen(js_name=getTransitions)] pub fn get_transitions(&self) -> js_sys::Array { let array = js_sys::Array::new(); diff --git a/packages/wasm-dpp/src/errors/consensus/consensus_error.rs b/packages/wasm-dpp/src/errors/consensus/consensus_error.rs index 67cc9a39f27..936eb1c4e73 100644 --- a/packages/wasm-dpp/src/errors/consensus/consensus_error.rs +++ b/packages/wasm-dpp/src/errors/consensus/consensus_error.rs @@ -84,7 +84,7 @@ use dpp::consensus::state::identity::no_transfer_key_for_core_withdrawal_availab use dpp::consensus::state::identity::RecipientIdentityDoesNotExistError; use dpp::consensus::state::prefunded_specialized_balances::prefunded_specialized_balance_insufficient_error::PrefundedSpecializedBalanceInsufficientError; use dpp::consensus::state::prefunded_specialized_balances::prefunded_specialized_balance_not_found_error::PrefundedSpecializedBalanceNotFoundError; -use dpp::consensus::state::token::{IdentityDoesNotHaveEnoughTokenBalanceError, IdentityTokenAccountNotFrozenError, IdentityTokenAccountFrozenError, UnauthorizedTokenActionError, TokenSettingMaxSupplyToLessThanCurrentSupplyError, TokenMintPastMaxSupplyError, NewTokensDestinationIdentityDoesNotExistError, NewAuthorizedActionTakerIdentityDoesNotExistError, NewAuthorizedActionTakerGroupDoesNotExistError, NewAuthorizedActionTakerMainGroupNotSetError, InvalidGroupPositionError}; +use dpp::consensus::state::token::{IdentityDoesNotHaveEnoughTokenBalanceError, IdentityTokenAccountNotFrozenError, IdentityTokenAccountFrozenError, TokenIsPausedError, UnauthorizedTokenActionError, TokenSettingMaxSupplyToLessThanCurrentSupplyError, TokenMintPastMaxSupplyError, NewTokensDestinationIdentityDoesNotExistError, NewAuthorizedActionTakerIdentityDoesNotExistError, NewAuthorizedActionTakerGroupDoesNotExistError, NewAuthorizedActionTakerMainGroupNotSetError, InvalidGroupPositionError}; use dpp::consensus::state::voting::masternode_incorrect_voter_identity_id_error::MasternodeIncorrectVoterIdentityIdError; use dpp::consensus::state::voting::masternode_incorrect_voting_address_error::MasternodeIncorrectVotingAddressError; use dpp::consensus::state::voting::masternode_not_found_error::MasternodeNotFoundError; @@ -326,6 +326,7 @@ pub fn from_state_error(state_error: &StateError) -> JsValue { StateError::IdentityTokenAccountFrozenError(e) => { generic_consensus_error!(IdentityTokenAccountFrozenError, e).into() } + StateError::TokenIsPausedError(e) => generic_consensus_error!(TokenIsPausedError, e).into(), StateError::IdentityNotMemberOfGroupError(e) => { generic_consensus_error!(IdentityNotMemberOfGroupError, e).into() } diff --git a/packages/wasm-dpp/src/identity/state_transition/identity_create_transition/identity_create_transition.rs b/packages/wasm-dpp/src/identity/state_transition/identity_create_transition/identity_create_transition.rs index 9b5a402ddd2..672b8541321 100644 --- a/packages/wasm-dpp/src/identity/state_transition/identity_create_transition/identity_create_transition.rs +++ b/packages/wasm-dpp/src/identity/state_transition/identity_create_transition/identity_create_transition.rs @@ -167,6 +167,16 @@ impl IdentityCreateTransitionWasm { (IdentityCreateTransitionAccessorsV0::owner_id(&self.0)).into() } + #[wasm_bindgen(js_name=getUserFeeIncrease)] + pub fn get_user_fee_increase(&self) -> u16 { + self.0.user_fee_increase() as u16 + } + + #[wasm_bindgen(js_name=setUserFeeIncrease)] + pub fn set_user_fee_increase(&mut self, user_fee_increase: u16) { + self.0.set_user_fee_increase(user_fee_increase); + } + #[wasm_bindgen(js_name=toObject)] pub fn to_object(&self, options: JsValue) -> Result { let opts: super::to_object::ToObjectOptions = if options.is_object() { diff --git a/packages/wasm-dpp/src/identity/state_transition/identity_credit_transfer_transition/transition.rs b/packages/wasm-dpp/src/identity/state_transition/identity_credit_transfer_transition/transition.rs index 40fcf84fb96..e20ec98b877 100644 --- a/packages/wasm-dpp/src/identity/state_transition/identity_credit_transfer_transition/transition.rs +++ b/packages/wasm-dpp/src/identity/state_transition/identity_credit_transfer_transition/transition.rs @@ -99,6 +99,26 @@ impl IdentityCreditTransferTransitionWasm { self.0.set_amount(amount as u64); } + #[wasm_bindgen(js_name=getUserFeeIncrease)] + pub fn get_user_fee_increase(&self) -> u16 { + self.0.user_fee_increase() as u16 + } + + #[wasm_bindgen(js_name=setUserFeeIncrease)] + pub fn set_user_fee_increase(&mut self, user_fee_increase: u16) { + self.0.set_user_fee_increase(user_fee_increase); + } + + #[wasm_bindgen(js_name=getNonce)] + pub fn get_nonce(&self) -> u64 { + self.0.nonce() + } + + #[wasm_bindgen(js_name=setNonce)] + pub fn set_nonce(&mut self, nonce: u64) -> () { + self.0.set_nonce(nonce) + } + #[wasm_bindgen(js_name=toObject)] pub fn to_object(&self, options: JsValue) -> Result { let opts: super::to_object::ToObjectOptions = if options.is_object() { @@ -318,6 +338,11 @@ impl IdentityCreditTransferTransitionWasm { .set_signature(BinaryData::new(signature.unwrap_or_default())) } + #[wasm_bindgen(js_name=getSignaturePublicKeyId)] + pub fn get_signature_public_key_id(&self) -> u32 { + self.0.signature_public_key_id() + } + #[wasm_bindgen] pub fn sign( &mut self, diff --git a/packages/wasm-dpp/src/identity/state_transition/identity_credit_withdrawal_transition/transition.rs b/packages/wasm-dpp/src/identity/state_transition/identity_credit_withdrawal_transition/transition.rs index 3de33cb834d..2b4462d1ad7 100644 --- a/packages/wasm-dpp/src/identity/state_transition/identity_credit_withdrawal_transition/transition.rs +++ b/packages/wasm-dpp/src/identity/state_transition/identity_credit_withdrawal_transition/transition.rs @@ -136,6 +136,16 @@ impl IdentityCreditWithdrawalTransitionWasm { self.0.set_nonce(revision); } + #[wasm_bindgen(js_name=getUserFeeIncrease)] + pub fn get_user_fee_increase(&self) -> u16 { + self.0.user_fee_increase() as u16 + } + + #[wasm_bindgen(js_name=setUserFeeIncrease)] + pub fn set_user_fee_increase(&mut self, user_fee_increase: u16) { + self.0.set_user_fee_increase(user_fee_increase); + } + #[wasm_bindgen(js_name=toObject)] pub fn to_object(&self, options: JsValue) -> Result { let opts: super::to_object::ToObjectOptions = if options.is_object() { @@ -400,6 +410,11 @@ impl IdentityCreditWithdrawalTransitionWasm { .set_signature(BinaryData::new(signature.unwrap_or_default())) } + #[wasm_bindgen(js_name=getSignaturePublicKeyId)] + pub fn get_signature_public_key_id(&self) -> u32 { + self.0.signature_public_key_id() + } + #[wasm_bindgen] pub fn sign( &mut self, diff --git a/packages/wasm-dpp/src/identity/state_transition/identity_topup_transition/identity_topup_transition.rs b/packages/wasm-dpp/src/identity/state_transition/identity_topup_transition/identity_topup_transition.rs index 5455e12edca..ff79eb2479c 100644 --- a/packages/wasm-dpp/src/identity/state_transition/identity_topup_transition/identity_topup_transition.rs +++ b/packages/wasm-dpp/src/identity/state_transition/identity_topup_transition/identity_topup_transition.rs @@ -115,6 +115,16 @@ impl IdentityTopUpTransitionWasm { self.0.owner_id().to_owned().into() } + #[wasm_bindgen(js_name=getUserFeeIncrease)] + pub fn get_user_fee_increase(&self) -> u16 { + self.0.user_fee_increase() as u16 + } + + #[wasm_bindgen(js_name=setUserFeeIncrease)] + pub fn set_user_fee_increase(&mut self, user_fee_increase: u16) { + self.0.set_user_fee_increase(user_fee_increase); + } + #[wasm_bindgen(js_name=toObject)] pub fn to_object(&self, options: JsValue) -> Result { let opts: super::to_object::ToObjectOptions = if options.is_object() { diff --git a/packages/wasm-dpp/src/identity/state_transition/identity_update_transition/identity_update_transition.rs b/packages/wasm-dpp/src/identity/state_transition/identity_update_transition/identity_update_transition.rs index 5692dd63d3f..9d82775e513 100644 --- a/packages/wasm-dpp/src/identity/state_transition/identity_update_transition/identity_update_transition.rs +++ b/packages/wasm-dpp/src/identity/state_transition/identity_update_transition/identity_update_transition.rs @@ -160,6 +160,26 @@ impl IdentityUpdateTransitionWasm { StateTransitionLike::owner_id(&self.0).to_owned().into() } + #[wasm_bindgen(js_name=getUserFeeIncrease)] + pub fn get_user_fee_increase(&self) -> u16 { + self.0.user_fee_increase() as u16 + } + + #[wasm_bindgen(js_name=setUserFeeIncrease)] + pub fn set_user_fee_increase(&mut self, user_fee_increase: u16) { + self.0.set_user_fee_increase(user_fee_increase); + } + + #[wasm_bindgen(js_name=getIdentityContractNonce)] + pub fn get_identity_nonce(&self) -> u64 { + self.0.nonce() + } + + #[wasm_bindgen(js_name=setIdentityContractNonce)] + pub fn set_identity_contract_nonce(&mut self, identity_nonce: u64) -> () { + self.0.set_nonce(identity_nonce) + } + #[wasm_bindgen(js_name=toObject)] pub fn to_object(&self, options: JsValue) -> Result { let opts: super::to_object::ToObjectOptions = if options.is_object() { @@ -403,6 +423,11 @@ impl IdentityUpdateTransitionWasm { Buffer::from_bytes_owned(self.0.signature().to_vec()) } + #[wasm_bindgen(js_name=getSignaturePublicKeyId)] + pub fn get_signature_public_key_id(&self) -> u32 { + self.0.signature_public_key_id() + } + #[wasm_bindgen(js_name=setSignature)] pub fn set_signature(&mut self, signature: Option>) { self.0 diff --git a/packages/wasm-dpp/src/voting/state_transition/masternode_vote_transition/mod.rs b/packages/wasm-dpp/src/voting/state_transition/masternode_vote_transition/mod.rs index 4ee92d0023d..ab6823f6a82 100644 --- a/packages/wasm-dpp/src/voting/state_transition/masternode_vote_transition/mod.rs +++ b/packages/wasm-dpp/src/voting/state_transition/masternode_vote_transition/mod.rs @@ -220,60 +220,85 @@ impl MasternodeVoteTransitionWasm { self.0.is_voting_state_transition() } + #[wasm_bindgen(js_name=getUserFeeIncrease)] + pub fn get_user_fee_increase(&self) -> u16 { + self.0.user_fee_increase() as u16 + } + + #[wasm_bindgen(js_name=setUserFeeIncrease)] + pub fn set_user_fee_increase(&mut self, user_fee_increase: u16) { + self.0.set_user_fee_increase(user_fee_increase); + } + + #[wasm_bindgen(js_name=getIdentityContractNonce)] + pub fn get_identity_nonce(&self) -> u64 { + self.0.nonce() + } + #[wasm_bindgen(js_name=getContestedDocumentResourceVotePoll)] pub fn contested_document_resource_vote_poll(&self) -> Option { match self.0.vote() { - Vote::ResourceVote(vote) => match vote.vote_poll() { - VotePoll::ContestedDocumentResourceVotePoll( - contested_document_resource_vote_poll, - ) => { - let js_object = Object::new(); - - let contract_id = IdentifierWrapper::from( - contested_document_resource_vote_poll.contract_id.clone(), - ); - - Reflect::set(&js_object, &"contractId".into(), &contract_id.into()).unwrap(); - Reflect::set( - &js_object, - &"documentTypeName".into(), - &contested_document_resource_vote_poll - .document_type_name - .clone() - .into(), - ) - .unwrap(); - Reflect::set( - &js_object, - &"indexName".into(), - &contested_document_resource_vote_poll - .index_name - .clone() - .into(), - ) - .unwrap(); - - let config = bincode::config::standard() - .with_big_endian() - .with_no_limit(); - - let serialized_index_values = contested_document_resource_vote_poll - .index_values - .iter() - .map(|value| { - JsValue::from(Buffer::from_bytes_owned( - bincode::encode_to_vec(value, config) - .expect("expected to encode value in path"), - )) - }); - - let js_array = Array::from_iter(serialized_index_values); - - Reflect::set(&js_object, &"indexValues".into(), &js_array.into()).unwrap(); - - Some(js_object) + Vote::ResourceVote(vote) => { + let js_object = Object::new(); + + Reflect::set( + &js_object, + &"choice".into(), + &vote.resource_vote_choice().clone().to_string().into(), + ) + .unwrap(); + + match vote.vote_poll() { + VotePoll::ContestedDocumentResourceVotePoll( + contested_document_resource_vote_poll, + ) => { + let contract_id = IdentifierWrapper::from( + contested_document_resource_vote_poll.contract_id.clone(), + ); + + Reflect::set(&js_object, &"contractId".into(), &contract_id.into()) + .unwrap(); + Reflect::set( + &js_object, + &"documentTypeName".into(), + &contested_document_resource_vote_poll + .document_type_name + .clone() + .into(), + ) + .unwrap(); + Reflect::set( + &js_object, + &"indexName".into(), + &contested_document_resource_vote_poll + .index_name + .clone() + .into(), + ) + .unwrap(); + + let config = bincode::config::standard() + .with_big_endian() + .with_no_limit(); + + let serialized_index_values = contested_document_resource_vote_poll + .index_values + .iter() + .map(|value| { + JsValue::from(Buffer::from_bytes_owned( + bincode::encode_to_vec(value, config) + .expect("expected to encode value in path"), + )) + }); + + let js_array = Array::from_iter(serialized_index_values); + + Reflect::set(&js_object, &"indexValues".into(), &js_array.into()).unwrap(); + + Some(js_object) + } } - }, + } } } diff --git a/packages/wasm-dpp/test/integration/document/DocumentFacade.spec.js b/packages/wasm-dpp/test/integration/document/DocumentFacade.spec.js index 66d5d957dc5..fe74b5da99c 100644 --- a/packages/wasm-dpp/test/integration/document/DocumentFacade.spec.js +++ b/packages/wasm-dpp/test/integration/document/DocumentFacade.spec.js @@ -95,7 +95,7 @@ describe('DocumentFacade', () => { }); describe('createStateTransition', () => { - it('should create DocumentsBatchTransition with passed documents - Rust', () => { + it('should create BatchTransition with passed documents - Rust', () => { const identityId = documents[0].getOwnerId(); const contractId = documents[0].getDataContractId();