Skip to content

Commit 7d85d14

Browse files
authored
feat(sdk): fetch defined token direct purchase prices (#2544)
1 parent 94a9fd5 commit 7d85d14

File tree

49 files changed

+4659
-4617
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4659
-4617
lines changed

packages/dapi-grpc/build.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig {
7373
// Derive features for versioned messages
7474
//
7575
// "GetConsensusParamsRequest" is excluded as this message does not support proofs
76-
const VERSIONED_REQUESTS: [&str; 39] = [
76+
const VERSIONED_REQUESTS: [&str; 40] = [
7777
"GetDataContractHistoryRequest",
7878
"GetDataContractRequest",
7979
"GetDataContractsRequest",
@@ -107,6 +107,7 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig {
107107
"GetIdentitiesTokenBalancesRequest",
108108
"GetIdentityTokenInfosRequest",
109109
"GetIdentitiesTokenInfosRequest",
110+
"GetTokenDirectPurchasePricesRequest",
110111
"GetTokenStatusesRequest",
111112
"GetTokenTotalSupplyRequest",
112113
"GetGroupInfoRequest",
@@ -120,7 +121,7 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig {
120121
// - "GetStatusResponse"
121122
//
122123
// "GetEvonodesProposedEpochBlocksResponse" is used for 2 Requests
123-
const VERSIONED_RESPONSES: [&str; 38] = [
124+
const VERSIONED_RESPONSES: [&str; 39] = [
124125
"GetDataContractHistoryResponse",
125126
"GetDataContractResponse",
126127
"GetDataContractsResponse",
@@ -153,6 +154,7 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig {
153154
"GetIdentitiesTokenBalancesResponse",
154155
"GetIdentityTokenInfosResponse",
155156
"GetIdentitiesTokenInfosResponse",
157+
"GetTokenDirectPurchasePricesResponse",
156158
"GetTokenStatusesResponse",
157159
"GetTokenTotalSupplyResponse",
158160
"GetGroupInfoResponse",

packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js

Lines changed: 892 additions & 1084 deletions
Large diffs are not rendered by default.

packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js

Lines changed: 892 additions & 1084 deletions
Large diffs are not rendered by default.

packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js

Lines changed: 493 additions & 666 deletions
Large diffs are not rendered by default.

packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.h

Lines changed: 110 additions & 79 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.m

Lines changed: 116 additions & 163 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py

Lines changed: 251 additions & 300 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dapi-grpc/clients/platform/v0/web/platform_pb.d.ts

Lines changed: 71 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -6636,62 +6636,6 @@ export namespace GetTokenStatusesResponse {
66366636
}
66376637
}
66386638

6639-
export class GetTokenDirectPurchasePricesRequest extends jspb.Message {
6640-
hasV0(): boolean;
6641-
clearV0(): void;
6642-
getV0(): GetTokenDirectPurchasePricesRequest.GetTokenDirectPurchasePricesRequestV0 | undefined;
6643-
setV0(value?: GetTokenDirectPurchasePricesRequest.GetTokenDirectPurchasePricesRequestV0): void;
6644-
6645-
getVersionCase(): GetTokenDirectPurchasePricesRequest.VersionCase;
6646-
serializeBinary(): Uint8Array;
6647-
toObject(includeInstance?: boolean): GetTokenDirectPurchasePricesRequest.AsObject;
6648-
static toObject(includeInstance: boolean, msg: GetTokenDirectPurchasePricesRequest): GetTokenDirectPurchasePricesRequest.AsObject;
6649-
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
6650-
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
6651-
static serializeBinaryToWriter(message: GetTokenDirectPurchasePricesRequest, writer: jspb.BinaryWriter): void;
6652-
static deserializeBinary(bytes: Uint8Array): GetTokenDirectPurchasePricesRequest;
6653-
static deserializeBinaryFromReader(message: GetTokenDirectPurchasePricesRequest, reader: jspb.BinaryReader): GetTokenDirectPurchasePricesRequest;
6654-
}
6655-
6656-
export namespace GetTokenDirectPurchasePricesRequest {
6657-
export type AsObject = {
6658-
v0?: GetTokenDirectPurchasePricesRequest.GetTokenDirectPurchasePricesRequestV0.AsObject,
6659-
}
6660-
6661-
export class GetTokenDirectPurchasePricesRequestV0 extends jspb.Message {
6662-
clearTokenIdsList(): void;
6663-
getTokenIdsList(): Array<Uint8Array | string>;
6664-
getTokenIdsList_asU8(): Array<Uint8Array>;
6665-
getTokenIdsList_asB64(): Array<string>;
6666-
setTokenIdsList(value: Array<Uint8Array | string>): void;
6667-
addTokenIds(value: Uint8Array | string, index?: number): Uint8Array | string;
6668-
6669-
getProve(): boolean;
6670-
setProve(value: boolean): void;
6671-
6672-
serializeBinary(): Uint8Array;
6673-
toObject(includeInstance?: boolean): GetTokenDirectPurchasePricesRequestV0.AsObject;
6674-
static toObject(includeInstance: boolean, msg: GetTokenDirectPurchasePricesRequestV0): GetTokenDirectPurchasePricesRequestV0.AsObject;
6675-
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
6676-
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
6677-
static serializeBinaryToWriter(message: GetTokenDirectPurchasePricesRequestV0, writer: jspb.BinaryWriter): void;
6678-
static deserializeBinary(bytes: Uint8Array): GetTokenDirectPurchasePricesRequestV0;
6679-
static deserializeBinaryFromReader(message: GetTokenDirectPurchasePricesRequestV0, reader: jspb.BinaryReader): GetTokenDirectPurchasePricesRequestV0;
6680-
}
6681-
6682-
export namespace GetTokenDirectPurchasePricesRequestV0 {
6683-
export type AsObject = {
6684-
tokenIdsList: Array<Uint8Array | string>,
6685-
prove: boolean,
6686-
}
6687-
}
6688-
6689-
export enum VersionCase {
6690-
VERSION_NOT_SET = 0,
6691-
V0 = 1,
6692-
}
6693-
}
6694-
66956639
export class GetTokenDirectPurchasePricesResponse extends jspb.Message {
66966640
hasV0(): boolean;
66976641
clearV0(): void;
@@ -6794,7 +6738,12 @@ export namespace GetTokenDirectPurchasePricesResponse {
67946738
}
67956739
}
67966740

6797-
export class Price extends jspb.Message {
6741+
export class TokenDirectPurchasePriceEntry extends jspb.Message {
6742+
getTokenId(): Uint8Array | string;
6743+
getTokenId_asU8(): Uint8Array;
6744+
getTokenId_asB64(): string;
6745+
setTokenId(value: Uint8Array | string): void;
6746+
67986747
hasFixedPrice(): boolean;
67996748
clearFixedPrice(): void;
68006749
getFixedPrice(): number;
@@ -6805,41 +6754,7 @@ export namespace GetTokenDirectPurchasePricesResponse {
68056754
getVariablePrice(): GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PricingSchedule | undefined;
68066755
setVariablePrice(value?: GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PricingSchedule): void;
68076756

6808-
getPriceCase(): Price.PriceCase;
6809-
serializeBinary(): Uint8Array;
6810-
toObject(includeInstance?: boolean): Price.AsObject;
6811-
static toObject(includeInstance: boolean, msg: Price): Price.AsObject;
6812-
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
6813-
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
6814-
static serializeBinaryToWriter(message: Price, writer: jspb.BinaryWriter): void;
6815-
static deserializeBinary(bytes: Uint8Array): Price;
6816-
static deserializeBinaryFromReader(message: Price, reader: jspb.BinaryReader): Price;
6817-
}
6818-
6819-
export namespace Price {
6820-
export type AsObject = {
6821-
fixedPrice: number,
6822-
variablePrice?: GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PricingSchedule.AsObject,
6823-
}
6824-
6825-
export enum PriceCase {
6826-
PRICE_NOT_SET = 0,
6827-
FIXED_PRICE = 1,
6828-
VARIABLE_PRICE = 2,
6829-
}
6830-
}
6831-
6832-
export class TokenDirectPurchasePriceEntry extends jspb.Message {
6833-
getTokenId(): Uint8Array | string;
6834-
getTokenId_asU8(): Uint8Array;
6835-
getTokenId_asB64(): string;
6836-
setTokenId(value: Uint8Array | string): void;
6837-
6838-
hasPrice(): boolean;
6839-
clearPrice(): void;
6840-
getPrice(): GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.Price | undefined;
6841-
setPrice(value?: GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.Price): void;
6842-
6757+
getPriceCase(): TokenDirectPurchasePriceEntry.PriceCase;
68436758
serializeBinary(): Uint8Array;
68446759
toObject(includeInstance?: boolean): TokenDirectPurchasePriceEntry.AsObject;
68456760
static toObject(includeInstance: boolean, msg: TokenDirectPurchasePriceEntry): TokenDirectPurchasePriceEntry.AsObject;
@@ -6853,7 +6768,14 @@ export namespace GetTokenDirectPurchasePricesResponse {
68536768
export namespace TokenDirectPurchasePriceEntry {
68546769
export type AsObject = {
68556770
tokenId: Uint8Array | string,
6856-
price?: GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.Price.AsObject,
6771+
fixedPrice: number,
6772+
variablePrice?: GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PricingSchedule.AsObject,
6773+
}
6774+
6775+
export enum PriceCase {
6776+
PRICE_NOT_SET = 0,
6777+
FIXED_PRICE = 2,
6778+
VARIABLE_PRICE = 3,
68576779
}
68586780
}
68596781

@@ -6892,6 +6814,62 @@ export namespace GetTokenDirectPurchasePricesResponse {
68926814
}
68936815
}
68946816

6817+
export class GetTokenDirectPurchasePricesRequest extends jspb.Message {
6818+
hasV0(): boolean;
6819+
clearV0(): void;
6820+
getV0(): GetTokenDirectPurchasePricesRequest.GetTokenDirectPurchasePricesRequestV0 | undefined;
6821+
setV0(value?: GetTokenDirectPurchasePricesRequest.GetTokenDirectPurchasePricesRequestV0): void;
6822+
6823+
getVersionCase(): GetTokenDirectPurchasePricesRequest.VersionCase;
6824+
serializeBinary(): Uint8Array;
6825+
toObject(includeInstance?: boolean): GetTokenDirectPurchasePricesRequest.AsObject;
6826+
static toObject(includeInstance: boolean, msg: GetTokenDirectPurchasePricesRequest): GetTokenDirectPurchasePricesRequest.AsObject;
6827+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
6828+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
6829+
static serializeBinaryToWriter(message: GetTokenDirectPurchasePricesRequest, writer: jspb.BinaryWriter): void;
6830+
static deserializeBinary(bytes: Uint8Array): GetTokenDirectPurchasePricesRequest;
6831+
static deserializeBinaryFromReader(message: GetTokenDirectPurchasePricesRequest, reader: jspb.BinaryReader): GetTokenDirectPurchasePricesRequest;
6832+
}
6833+
6834+
export namespace GetTokenDirectPurchasePricesRequest {
6835+
export type AsObject = {
6836+
v0?: GetTokenDirectPurchasePricesRequest.GetTokenDirectPurchasePricesRequestV0.AsObject,
6837+
}
6838+
6839+
export class GetTokenDirectPurchasePricesRequestV0 extends jspb.Message {
6840+
clearTokenIdsList(): void;
6841+
getTokenIdsList(): Array<Uint8Array | string>;
6842+
getTokenIdsList_asU8(): Array<Uint8Array>;
6843+
getTokenIdsList_asB64(): Array<string>;
6844+
setTokenIdsList(value: Array<Uint8Array | string>): void;
6845+
addTokenIds(value: Uint8Array | string, index?: number): Uint8Array | string;
6846+
6847+
getProve(): boolean;
6848+
setProve(value: boolean): void;
6849+
6850+
serializeBinary(): Uint8Array;
6851+
toObject(includeInstance?: boolean): GetTokenDirectPurchasePricesRequestV0.AsObject;
6852+
static toObject(includeInstance: boolean, msg: GetTokenDirectPurchasePricesRequestV0): GetTokenDirectPurchasePricesRequestV0.AsObject;
6853+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
6854+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
6855+
static serializeBinaryToWriter(message: GetTokenDirectPurchasePricesRequestV0, writer: jspb.BinaryWriter): void;
6856+
static deserializeBinary(bytes: Uint8Array): GetTokenDirectPurchasePricesRequestV0;
6857+
static deserializeBinaryFromReader(message: GetTokenDirectPurchasePricesRequestV0, reader: jspb.BinaryReader): GetTokenDirectPurchasePricesRequestV0;
6858+
}
6859+
6860+
export namespace GetTokenDirectPurchasePricesRequestV0 {
6861+
export type AsObject = {
6862+
tokenIdsList: Array<Uint8Array | string>,
6863+
prove: boolean,
6864+
}
6865+
}
6866+
6867+
export enum VersionCase {
6868+
VERSION_NOT_SET = 0,
6869+
V0 = 1,
6870+
}
6871+
}
6872+
68956873
export class GetTokenPreProgrammedDistributionsRequest extends jspb.Message {
68966874
hasV0(): boolean;
68976875
clearV0(): void;

0 commit comments

Comments
 (0)