@dashevo/dapi-grpc 2.0.0-rc.1 → 2.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.toml +1 -1
- package/build.rs +4 -2
- package/clients/drive/v0/nodejs/drive_pbjs.js +1536 -0
- package/clients/platform/v0/nodejs/platform_pbjs.js +1536 -0
- package/clients/platform/v0/nodejs/platform_protoc.js +1584 -0
- package/clients/platform/v0/web/platform_pb.d.ts +212 -0
- package/clients/platform/v0/web/platform_pb.js +1584 -0
- package/clients/platform/v0/web/platform_pb_service.d.ts +19 -0
- package/clients/platform/v0/web/platform_pb_service.js +40 -0
- package/package.json +2 -2
- package/protos/platform/v0/platform.proto +55 -1
|
@@ -355,6 +355,15 @@ type PlatformgetTokenPreProgrammedDistributions = {
|
|
|
355
355
|
readonly responseType: typeof platform_pb.GetTokenPreProgrammedDistributionsResponse;
|
|
356
356
|
};
|
|
357
357
|
|
|
358
|
+
type PlatformgetTokenPerpetualDistributionLastClaim = {
|
|
359
|
+
readonly methodName: string;
|
|
360
|
+
readonly service: typeof Platform;
|
|
361
|
+
readonly requestStream: false;
|
|
362
|
+
readonly responseStream: false;
|
|
363
|
+
readonly requestType: typeof platform_pb.GetTokenPerpetualDistributionLastClaimRequest;
|
|
364
|
+
readonly responseType: typeof platform_pb.GetTokenPerpetualDistributionLastClaimResponse;
|
|
365
|
+
};
|
|
366
|
+
|
|
358
367
|
type PlatformgetTokenTotalSupply = {
|
|
359
368
|
readonly methodName: string;
|
|
360
369
|
readonly service: typeof Platform;
|
|
@@ -441,6 +450,7 @@ export class Platform {
|
|
|
441
450
|
static readonly getTokenStatuses: PlatformgetTokenStatuses;
|
|
442
451
|
static readonly getTokenDirectPurchasePrices: PlatformgetTokenDirectPurchasePrices;
|
|
443
452
|
static readonly getTokenPreProgrammedDistributions: PlatformgetTokenPreProgrammedDistributions;
|
|
453
|
+
static readonly getTokenPerpetualDistributionLastClaim: PlatformgetTokenPerpetualDistributionLastClaim;
|
|
444
454
|
static readonly getTokenTotalSupply: PlatformgetTokenTotalSupply;
|
|
445
455
|
static readonly getGroupInfo: PlatformgetGroupInfo;
|
|
446
456
|
static readonly getGroupInfos: PlatformgetGroupInfos;
|
|
@@ -831,6 +841,15 @@ export class PlatformClient {
|
|
|
831
841
|
requestMessage: platform_pb.GetTokenPreProgrammedDistributionsRequest,
|
|
832
842
|
callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenPreProgrammedDistributionsResponse|null) => void
|
|
833
843
|
): UnaryResponse;
|
|
844
|
+
getTokenPerpetualDistributionLastClaim(
|
|
845
|
+
requestMessage: platform_pb.GetTokenPerpetualDistributionLastClaimRequest,
|
|
846
|
+
metadata: grpc.Metadata,
|
|
847
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenPerpetualDistributionLastClaimResponse|null) => void
|
|
848
|
+
): UnaryResponse;
|
|
849
|
+
getTokenPerpetualDistributionLastClaim(
|
|
850
|
+
requestMessage: platform_pb.GetTokenPerpetualDistributionLastClaimRequest,
|
|
851
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenPerpetualDistributionLastClaimResponse|null) => void
|
|
852
|
+
): UnaryResponse;
|
|
834
853
|
getTokenTotalSupply(
|
|
835
854
|
requestMessage: platform_pb.GetTokenTotalSupplyRequest,
|
|
836
855
|
metadata: grpc.Metadata,
|
|
@@ -361,6 +361,15 @@ Platform.getTokenPreProgrammedDistributions = {
|
|
|
361
361
|
responseType: platform_pb.GetTokenPreProgrammedDistributionsResponse
|
|
362
362
|
};
|
|
363
363
|
|
|
364
|
+
Platform.getTokenPerpetualDistributionLastClaim = {
|
|
365
|
+
methodName: "getTokenPerpetualDistributionLastClaim",
|
|
366
|
+
service: Platform,
|
|
367
|
+
requestStream: false,
|
|
368
|
+
responseStream: false,
|
|
369
|
+
requestType: platform_pb.GetTokenPerpetualDistributionLastClaimRequest,
|
|
370
|
+
responseType: platform_pb.GetTokenPerpetualDistributionLastClaimResponse
|
|
371
|
+
};
|
|
372
|
+
|
|
364
373
|
Platform.getTokenTotalSupply = {
|
|
365
374
|
methodName: "getTokenTotalSupply",
|
|
366
375
|
service: Platform,
|
|
@@ -1622,6 +1631,37 @@ PlatformClient.prototype.getTokenPreProgrammedDistributions = function getTokenP
|
|
|
1622
1631
|
};
|
|
1623
1632
|
};
|
|
1624
1633
|
|
|
1634
|
+
PlatformClient.prototype.getTokenPerpetualDistributionLastClaim = function getTokenPerpetualDistributionLastClaim(requestMessage, metadata, callback) {
|
|
1635
|
+
if (arguments.length === 2) {
|
|
1636
|
+
callback = arguments[1];
|
|
1637
|
+
}
|
|
1638
|
+
var client = grpc.unary(Platform.getTokenPerpetualDistributionLastClaim, {
|
|
1639
|
+
request: requestMessage,
|
|
1640
|
+
host: this.serviceHost,
|
|
1641
|
+
metadata: metadata,
|
|
1642
|
+
transport: this.options.transport,
|
|
1643
|
+
debug: this.options.debug,
|
|
1644
|
+
onEnd: function (response) {
|
|
1645
|
+
if (callback) {
|
|
1646
|
+
if (response.status !== grpc.Code.OK) {
|
|
1647
|
+
var err = new Error(response.statusMessage);
|
|
1648
|
+
err.code = response.status;
|
|
1649
|
+
err.metadata = response.trailers;
|
|
1650
|
+
callback(err, null);
|
|
1651
|
+
} else {
|
|
1652
|
+
callback(null, response.message);
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
});
|
|
1657
|
+
return {
|
|
1658
|
+
cancel: function () {
|
|
1659
|
+
callback = null;
|
|
1660
|
+
client.close();
|
|
1661
|
+
}
|
|
1662
|
+
};
|
|
1663
|
+
};
|
|
1664
|
+
|
|
1625
1665
|
PlatformClient.prototype.getTokenTotalSupply = function getTokenTotalSupply(requestMessage, metadata, callback) {
|
|
1626
1666
|
if (arguments.length === 2) {
|
|
1627
1667
|
callback = arguments[1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/dapi-grpc",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.2",
|
|
4
4
|
"description": "DAPI GRPC definition file and generated clients",
|
|
5
5
|
"browser": "browser.js",
|
|
6
6
|
"main": "node.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://github.com/dashevo/dapi-grpc#readme",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@dashevo/grpc-common": "2.0.0-rc.
|
|
48
|
+
"@dashevo/grpc-common": "2.0.0-rc.2",
|
|
49
49
|
"@dashevo/protobufjs": "6.10.5",
|
|
50
50
|
"@grpc/grpc-js": "1.4.4",
|
|
51
51
|
"@improbable-eng/grpc-web": "^0.15.0",
|
|
@@ -89,6 +89,9 @@ service Platform {
|
|
|
89
89
|
rpc getTokenPreProgrammedDistributions(
|
|
90
90
|
GetTokenPreProgrammedDistributionsRequest)
|
|
91
91
|
returns (GetTokenPreProgrammedDistributionsResponse);
|
|
92
|
+
rpc getTokenPerpetualDistributionLastClaim(
|
|
93
|
+
GetTokenPerpetualDistributionLastClaimRequest)
|
|
94
|
+
returns (GetTokenPerpetualDistributionLastClaimResponse);
|
|
92
95
|
rpc getTokenTotalSupply(GetTokenTotalSupplyRequest)
|
|
93
96
|
returns (GetTokenTotalSupplyResponse);
|
|
94
97
|
rpc getGroupInfo(GetGroupInfoRequest) returns (GetGroupInfoResponse);
|
|
@@ -1476,12 +1479,63 @@ message GetTokenPreProgrammedDistributionsResponse {
|
|
|
1476
1479
|
oneof version { GetTokenPreProgrammedDistributionsResponseV0 v0 = 1; }
|
|
1477
1480
|
}
|
|
1478
1481
|
|
|
1482
|
+
// ──────────────────────────────────────────────────────────────────────────────
|
|
1483
|
+
// Get the last‑claim information for a token’s perpetual distribution
|
|
1484
|
+
// ──────────────────────────────────────────────────────────────────────────────
|
|
1485
|
+
|
|
1486
|
+
message GetTokenPerpetualDistributionLastClaimRequest {
|
|
1487
|
+
|
|
1488
|
+
message ContractTokenInfo {
|
|
1489
|
+
bytes contract_id = 1;
|
|
1490
|
+
// the token contract position
|
|
1491
|
+
uint32 token_contract_position = 2;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
message GetTokenPerpetualDistributionLastClaimRequestV0 {
|
|
1495
|
+
// 32‑byte token identifier
|
|
1496
|
+
bytes token_id = 1;
|
|
1497
|
+
|
|
1498
|
+
// This should be set if you wish to get back the last claim info as a specific type
|
|
1499
|
+
optional ContractTokenInfo contract_info = 2;
|
|
1500
|
+
|
|
1501
|
+
// Identity whose last‑claim timestamp is requested
|
|
1502
|
+
bytes identity_id = 4;
|
|
1503
|
+
// Return GroveDB / signature proof instead of raw value
|
|
1504
|
+
bool prove = 5;
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
oneof version { GetTokenPerpetualDistributionLastClaimRequestV0 v0 = 1; }
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
message GetTokenPerpetualDistributionLastClaimResponse {
|
|
1511
|
+
message GetTokenPerpetualDistributionLastClaimResponseV0 {
|
|
1512
|
+
message LastClaimInfo {
|
|
1513
|
+
|
|
1514
|
+
oneof paid_at {
|
|
1515
|
+
uint64 timestamp_ms = 1 [ jstype = JS_STRING ]; // Unix epoch, ms
|
|
1516
|
+
uint64 block_height = 2 [ jstype = JS_STRING ]; // Core‑block height
|
|
1517
|
+
uint32 epoch = 3; // Epoch index
|
|
1518
|
+
bytes raw_bytes = 4; // Arbitrary encoding
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
oneof result {
|
|
1523
|
+
LastClaimInfo last_claim = 1; // Direct answer
|
|
1524
|
+
Proof proof = 2; // GroveDB / quorum proof
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
ResponseMetadata metadata = 3; // Chain context
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
oneof version { GetTokenPerpetualDistributionLastClaimResponseV0 v0 = 1; }
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1479
1533
|
message GetTokenTotalSupplyRequest {
|
|
1480
1534
|
message GetTokenTotalSupplyRequestV0 {
|
|
1481
1535
|
bytes token_id = 1;
|
|
1482
1536
|
bool prove = 2;
|
|
1483
1537
|
}
|
|
1484
|
-
oneof version {
|
|
1538
|
+
oneof version {GetTokenTotalSupplyRequestV0 v0 = 1;}
|
|
1485
1539
|
}
|
|
1486
1540
|
|
|
1487
1541
|
message GetTokenTotalSupplyResponse {
|