diff --git a/.gitignore b/.gitignore index c6bba59..7d70d6c 100644 --- a/.gitignore +++ b/.gitignore @@ -128,3 +128,7 @@ dist .yarn/build-state.yml .yarn/install-state.gz .pnp.* + +.DS_Store +tools/bincode_generator/target +rust_print_encoded/target \ No newline at end of file diff --git a/1-create-identity.ts b/1-create-identity.ts new file mode 100644 index 0000000..75c75d1 --- /dev/null +++ b/1-create-identity.ts @@ -0,0 +1,208 @@ + +import * as Bincode from "./src/bincode.ts"; +import * as DashBincode from "./2.0.0/generated_bincode.js" +import DashKeys from "dashkeys"; + +import * as KeyUtils from "./src/key-utils.js"; +import { loadWallet } from "./src/cli.ts"; +import { deriveAllCreateIdentityKeys } from "./src/asset_lock.ts"; +import { createPlatformAssetLock } from "./src/asset_lock.ts"; +import { connectToNode, TRPC } from "./src/rpc.ts" +import { NODE_ADDRESS, RPC_AUTH_URL } from "./src/constants.ts" +import { toHex } from "./src/hex.js" +import { base58 } from "./src/util/base58.ts" +import { findExistingIdentity } from "./src/identity.ts" + + +export async function step1CreateIdentity(walletPhrase: string, walletSalt: string, identityIndex: number) { +const rpc = new TRPC(RPC_AUTH_URL); +const nodeRpc = connectToNode(NODE_ADDRESS) + +const walletKey = await loadWallet(walletPhrase, walletSalt); + +const hdOpts = { version: "testnet" as const }; // TODO + +const { + regFundKey, + changeKey, + assetKey, + masterKey, + otherKey, +} = await deriveAllCreateIdentityKeys( + hdOpts, + walletKey, + identityIndex, +); + +// console.log("Asset WIF", assetWif, "(would be ephemeral, non-hd)"); + +// console.log( +// "regFundKey", +// await DashHd.toAddr(regFundKey.publicKey, { version: "testnet" }), +// ); +// console.log( +// "changeKey", +// await DashHd.toAddr(changeKey.publicKey, { version: "testnet" }), +// ); +// console.log( +// "assetKey", +// await DashHd.toAddr(assetKey.publicKey, { version: "testnet" }), +// ); +// console.log( +// "masterKey", +// await DashHd.toAddr(masterKey.publicKey, { version: "testnet" }), +// ); +// console.log( +// "masterKey priv wif", +// await DashHd.toWif(masterKey.privateKey!, { version: "testnet" }), +// ); +// console.log( +// "otherKey", +// await DashHd.toAddr(otherKey.publicKey, { version: "testnet" }), +// ); +// console.log(); + +const pkh = await DashKeys.pubkeyToPkh(masterKey.publicKey) +console.log('masterKey pkh', toHex(pkh)) +const existingIdentity = await findExistingIdentity(nodeRpc, pkh) +if (existingIdentity) { + const existingIdentityV0: DashBincode.IdentityV0 = Bincode.match(existingIdentity, { + V0: i => i[0] + }); + const existingIdentityId = existingIdentityV0.id[0][0]; + console.log('Identity Already Created!', base58.encode(existingIdentityId)) + process.exit(1); +} + +const { + identityId, + txidHex, + assetLockProof, +} = await createPlatformAssetLock(hdOpts, regFundKey, changeKey, assetKey, rpc); + +console.log(); +console.log(`identityId:`, base58.encode(identityId)); + + +const identityKeys = [masterKey, otherKey]; +const identityPublicKeys: DashBincode.IdentityPublicKeyInCreation[] = [ + DashBincode.IdentityPublicKeyInCreation.V0( + DashBincode.IdentityPublicKeyInCreationV0({ + id: 0, + key_type: DashBincode.KeyType.ECDSA_SECP256K1(), + purpose: DashBincode.Purpose.AUTHENTICATION(), + security_level: DashBincode.SecurityLevel.MASTER(), + contract_bounds: undefined, + read_only: false, + data: DashBincode.BinaryData(masterKey.publicKey), + signature: DashBincode.BinaryData(new Uint8Array()), + }), + ), + DashBincode.IdentityPublicKeyInCreation.V0( + DashBincode.IdentityPublicKeyInCreationV0({ + id: 1, + key_type: DashBincode.KeyType.ECDSA_SECP256K1(), + purpose: DashBincode.Purpose.AUTHENTICATION(), + security_level: DashBincode.SecurityLevel.CRITICAL(), + contract_bounds: undefined, + read_only: false, + data: DashBincode.BinaryData(otherKey.publicKey), + signature: DashBincode.BinaryData(new Uint8Array()), + }), + ), +]; + +const identityCreate = DashBincode.IdentityCreateTransitionV0({ + asset_lock_proof: assetLockProof, + public_keys: identityPublicKeys, + identity_id: DashBincode.Identifier( + DashBincode.IdentifierBytes32(identityId), + ), + user_fee_increase: 0, + signature: DashBincode.BinaryData(new Uint8Array()), +}); + +const stateTransition: DashBincode.StateTransition = + DashBincode.StateTransition.IdentityCreate( + DashBincode.IdentityCreateTransition.V0(identityCreate), + ); +// console.log(`identityPublicKeys:`, identityPublicKeys); + +const signableTransition = new Uint8Array( + Bincode.encode(DashBincode.StateTransition, stateTransition, { + signable: true, + }), +); + +const signableTransitionHash = await KeyUtils.doubleSha256(signableTransition); + +{ + const magicSigBytes = await KeyUtils.magicSign({ + privKeyBytes: assetKey.privateKey!, + doubleSha256Bytes: signableTransitionHash, + }); + + identityCreate.signature[0] = magicSigBytes; +} + +for (let i = 0; i < identityKeys.length; i += 1) { + const key = identityKeys[i]; + const stPub = identityCreate.public_keys[i]; + const magicSigBytes = await KeyUtils.magicSign({ + privKeyBytes: key.privateKey!, + doubleSha256Bytes: signableTransitionHash, + }); + + Bincode.match(stPub, { + V0: ({ 0: stPub0 }: { 0: any }) => { + stPub0.signature[0] = magicSigBytes; + }, + }); +} + +const fullSigTransition = new Uint8Array( + Bincode.encode(DashBincode.StateTransition, stateTransition, { + signable: false, + }), +); +const transitionHash = await KeyUtils.sha256(fullSigTransition); + +console.log("Broadcasting Identity Create Transition...") +try { + const response = await nodeRpc.platform.broadcastStateTransition({ + stateTransition: fullSigTransition, + }) + console.log('response', response.status, response.response); +} catch (e) { + console.error("Error: ", decodeURIComponent((e as any).message)) +} + +const identity = base58.encode(identityId); +console.log(); +console.log(`https://testnet.platform-explorer.com/identity/${identity}`); +console.log(`https://testnet.platform-explorer.com/transaction/${toHex(transitionHash)}`); +} + +if (typeof process === 'object' && process.argv[1] === import.meta.filename) { + + import("dotenv").then(dotenv => { + dotenv.default.config({ path: ".env" }); + + let walletPhrase = process.env.DASH_WALLET_PHRASE!; + let walletSalt = process.env.DASH_WALLET_SALT ?? ""; + + const identityIndex = parseInt(process.argv[2], 10); + if (isNaN(identityIndex)) { + console.error(""); + console.error("USAGE"); + console.error(` ${process.argv[0]} ${process.argv[1]} `); + console.error(""); + console.error("EXAMPLE"); + console.error(` ${process.argv[0]} ${process.argv[1]} 0`); + console.error(""); + process.exit(1); + } + + step1CreateIdentity(walletPhrase, walletSalt, identityIndex); + }) +} diff --git a/1.8.1/generated_bincode.d.ts b/1.8.1/generated_bincode.d.ts new file mode 100644 index 0000000..647951f --- /dev/null +++ b/1.8.1/generated_bincode.d.ts @@ -0,0 +1,2761 @@ +import { BinCode, BinCodeable, VARIANTS } from "../src/bincode.ts"; +import { Option, FixedBytes, Hash, SocketAddr, Transaction } from "../src/bincode_types.ts"; +declare module "./generated_bincode.js" { + +/** + * An Asset Lock payload. This is contained as the payload of an asset lock special transaction. + * The Asset Lock Special transaction and this payload is described in the Asset Lock DIP2X + * (todo:update this). + * An Asset Lock can fund multiple Identity registrations or top ups. + * The Asset Lock payload credit outputs field contains a vector of TxOuts. + * Each TxOut refers to a funding of an Identity. + */ +interface AssetLockPayload { + version: number; + credit_outputs: TxOut[]; +} +/** @ignore */ +const AssetLockPayload : BinCodeable & ((data: { + version: number, + credit_outputs: TxOut[], +}) => AssetLockPayload); + +/** @ignore */ +export abstract class AssetLockProof { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: AssetLockProof): void; + /** @ignore */ + static decode(bc: BinCode): AssetLockProof; + /** @ignore @internal */ + [VARIANTS]: typeof AssetLockProof.variants; + /** @ignore */ + static variants: { + Instant: typeof AssetLockProof.Instant, + Chain: typeof AssetLockProof.Chain, + }; +} +namespace AssetLockProof { + /** @function */ + interface Instant extends AssetLockProof { + [0]: InstantAssetLockProof; + } + /** @ignore */ + const Instant: (f0: InstantAssetLockProof) => AssetLockProof.Instant; + /** @function */ + interface Chain extends AssetLockProof { + [0]: ChainAssetLockProof; + } + /** @ignore */ + const Chain: (f0: ChainAssetLockProof) => AssetLockProof.Chain; +} + +/** + * An Asset Unlock Base payload. This is the base payload of the Asset Unlock. In order to make + * it a full payload the request info should be added. + */ +interface AssetUnlockBasePayload { + /** The payload protocol version, is currently expected to be 0. */ + version: number; + /** The index of the unlock transaction. It gets bumped on each transaction */ + index: bigint; + /** The fee used in Duffs (Satoshis) */ + fee: number; +} +/** @ignore */ +const AssetUnlockBasePayload : BinCodeable & ((data: { + /** The payload protocol version, is currently expected to be 0. */ + version: number, + /** The index of the unlock transaction. It gets bumped on each transaction */ + index: bigint, + /** The fee used in Duffs (Satoshis) */ + fee: number, +}) => AssetUnlockBasePayload); + +/** + * A Credit Withdrawal payload. This is contained as the payload of a credit withdrawal special + * transaction. + * The Credit Withdrawal Special transaction and this payload is described in the Asset Lock DIP2X + * (todo:update this). + * The Credit Withdrawal Payload is signed by a quorum. + * + * Transaction using it have no inputs. Hence the proof of validity lies solely on the BLS signature. + */ +interface AssetUnlockPayload { + /** + * The base information about the asset unlock. This base information is the information that + * should be put into a queue. + */ + base: AssetUnlockBasePayload; + /** + * The request information. This should be added to the unlock transaction as it is being sent + * to be signed. + */ + request_info: AssetUnlockRequestInfo; + /** The threshold signature. This should be returned by the consensus engine. */ + quorum_sig: BLSSignature; +} +/** @ignore */ +const AssetUnlockPayload : BinCodeable & ((data: { + /** + * The base information about the asset unlock. This base information is the information that + * should be put into a queue. + */ + base: AssetUnlockBasePayload, + /** + * The request information. This should be added to the unlock transaction as it is being sent + * to be signed. + */ + request_info: AssetUnlockRequestInfo, + /** The threshold signature. This should be returned by the consensus engine. */ + quorum_sig: BLSSignature, +}) => AssetUnlockPayload); + +/** + * An asset unlock request info + * This is the information about the signing quorum + * The request height should be the height at which the specified quorum is active on core. + */ +interface AssetUnlockRequestInfo { + /** + * The core request height of the transaction. This should match a period where the quorum_hash + * is still active + */ + request_height: number; + /** The quorum hash. This is the block hash when the quorum was created. */ + quorum_hash: QuorumHash; +} +/** @ignore */ +const AssetUnlockRequestInfo : BinCodeable & ((data: { + /** + * The core request height of the transaction. This should match a period where the quorum_hash + * is still active + */ + request_height: number, + /** The quorum hash. This is the block hash when the quorum was created. */ + quorum_hash: QuorumHash, +}) => AssetUnlockRequestInfo); + +/** + * A BLS Public key is 48 bytes in the scheme used for Dash Core + * attr since (1.48) , derive (PartialEq , Eq , Ord , PartialOrd , Hash) + */ +interface BLSPublicKey { + [0]: FixedBytes<48>; +} +/** @ignore */ +const BLSPublicKey : BinCodeable & (( + f0: FixedBytes<48>, +) => BLSPublicKey); + +/** + * A BLS Signature is 96 bytes in the scheme used for Dash Core + * attr since (1.48) , derive (PartialEq , Eq , Ord , PartialOrd , Hash) + */ +interface BLSSignature { + [0]: FixedBytes<96>; +} +/** @ignore */ +const BLSSignature : BinCodeable & (( + f0: FixedBytes<96>, +) => BLSSignature); + +interface BinaryData { + [0]: Uint8Array; +} +/** @ignore */ +const BinaryData : BinCodeable & (( + f0: Uint8Array, +) => BinaryData); + +/** A dash block hash. */ +interface BlockHash { + [0]: Hash; +} +/** @ignore */ +const BlockHash : BinCodeable & (( + f0: Hash, +) => BlockHash); + +/** + * Instant Asset Lock Proof is a part of Identity Create and Identity Topup + * transitions. It is a proof that specific output of dash is locked in credits + * pull and the transitions can mint credits and populate identity's balance. + * To prove that the output is locked, a height where transaction was chain locked is provided. + */ +interface ChainAssetLockProof { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: number; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: OutPoint; +} +/** @ignore */ +const ChainAssetLockProof : BinCodeable & ((data: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: number, + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: OutPoint, +}) => ChainAssetLockProof); + +/** + * A Coinbase payload. This is contained as the payload of a coinbase special transaction. + * The Coinbase payload is described in DIP4. + */ +interface CoinbasePayload { + version: number; + height: number; + merkle_root_masternode_list: MerkleRootMasternodeList; + merkle_root_quorums: MerkleRootQuorums; + best_cl_height?: number; + best_cl_signature?: BLSSignature; + asset_locked_amount?: bigint; +} +/** @ignore */ +const CoinbasePayload : BinCodeable & ((data: { + version: number, + height: number, + merkle_root_masternode_list: MerkleRootMasternodeList, + merkle_root_quorums: MerkleRootQuorums, + best_cl_height?: number, + best_cl_signature?: BLSSignature, + asset_locked_amount?: bigint, +}) => CoinbasePayload); + +interface ContestedDocumentResourceVotePoll { + contract_id: Identifier; + document_type_name: string; + index_name: string; + index_values: Value[]; +} +/** @ignore */ +const ContestedDocumentResourceVotePoll : BinCodeable & ((data: { + contract_id: Identifier, + document_type_name: string, + index_name: string, + index_values: Value[], +}) => ContestedDocumentResourceVotePoll); + +/** + * A contract bounds is the bounds that the key has influence on. + * For authentication keys the bounds mean that the keys can only be used to sign + * within the specified contract. + * For encryption decryption this tells clients to only use these keys for specific + * contracts. + * + * repr u8 + */ +/** @ignore */ +export abstract class ContractBounds { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: ContractBounds): void; + /** @ignore */ + static decode(bc: BinCode): ContractBounds; + /** @ignore @internal */ + [VARIANTS]: typeof ContractBounds.variants; + /** @ignore */ + static variants: { + SingleContract: typeof ContractBounds.SingleContract, + SingleContractDocumentType: typeof ContractBounds.SingleContractDocumentType, + }; +} +namespace ContractBounds { + /** + * this key can only be used within a specific contract + * + * @function + */ + interface SingleContract extends ContractBounds { + id: Identifier; + } + const SingleContract: (data: { + id: Identifier, + }) => ContractBounds.SingleContract; + /** + * this key can only be used within a specific contract and for a specific document type + * + * @function + */ + interface SingleContractDocumentType extends ContractBounds { + id: Identifier; + document_type_name: string; + } + const SingleContractDocumentType: (data: { + id: Identifier, + document_type_name: string, + }) => ContractBounds.SingleContractDocumentType; +} + +interface CoreScript { + [0]: DashcoreScript; +} +/** @ignore */ +const CoreScript : BinCodeable & (( + f0: DashcoreScript, +) => CoreScript); + +export type Credits = bigint; + +export type DashcoreScript = ScriptBuf; + +/** @ignore */ +export abstract class DataContractConfig { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DataContractConfig): void; + /** @ignore */ + static decode(bc: BinCode): DataContractConfig; + /** @ignore @internal */ + [VARIANTS]: typeof DataContractConfig.variants; + /** @ignore */ + static variants: { + V0: typeof DataContractConfig.V0, + }; +} +namespace DataContractConfig { + /** @function */ + interface V0 extends DataContractConfig { + [0]: DataContractConfigV0; + } + /** @ignore */ + const V0: (f0: DataContractConfigV0) => DataContractConfig.V0; +} + +interface DataContractConfigV0 { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: boolean; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: boolean; + /** Does the contract keep history when the contract itself changes */ + keeps_history: boolean; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: boolean; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: boolean; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: boolean; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key?: StorageKeyRequirements; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key?: StorageKeyRequirements; +} +/** @ignore */ +const DataContractConfigV0 : BinCodeable & ((data: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: boolean, + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: boolean, + /** Does the contract keep history when the contract itself changes */ + keeps_history: boolean, + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: boolean, + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: boolean, + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: boolean, + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key?: StorageKeyRequirements, + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key?: StorageKeyRequirements, +}) => DataContractConfigV0); + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_create_state_transition" */ +/** @ignore */ +export abstract class DataContractCreateTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DataContractCreateTransition): void; + /** @ignore */ + static decode(bc: BinCode): DataContractCreateTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DataContractCreateTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DataContractCreateTransition.V0, + }; +} +namespace DataContractCreateTransition { + /** @function */ + interface V0 extends DataContractCreateTransition { + [0]: DataContractCreateTransitionV0; + } + /** @ignore */ + const V0: (f0: DataContractCreateTransitionV0) => DataContractCreateTransition.V0; +} + +/** DataContractCreateTransitionV0 has the same encoding structure */ +interface DataContractCreateTransitionV0 { + data_contract: DataContractInSerializationFormat; + identity_nonce: IdentityNonce; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const DataContractCreateTransitionV0 : BinCodeable & ((data: { + data_contract: DataContractInSerializationFormat, + identity_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => DataContractCreateTransitionV0); + +/** @ignore */ +export abstract class DataContractInSerializationFormat { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DataContractInSerializationFormat): void; + /** @ignore */ + static decode(bc: BinCode): DataContractInSerializationFormat; + /** @ignore @internal */ + [VARIANTS]: typeof DataContractInSerializationFormat.variants; + /** @ignore */ + static variants: { + V0: typeof DataContractInSerializationFormat.V0, + }; +} +namespace DataContractInSerializationFormat { + /** @function */ + interface V0 extends DataContractInSerializationFormat { + [0]: DataContractInSerializationFormatV0; + } + /** @ignore */ + const V0: (f0: DataContractInSerializationFormatV0) => DataContractInSerializationFormat.V0; +} + +interface DataContractInSerializationFormatV0 { + /** A unique identifier for the data contract. */ + id: Identifier; + /** Internal configuration for the contract. */ + config: DataContractConfig; + /** The version of this data contract. */ + version: number; + /** The identifier of the contract owner. */ + owner_id: Identifier; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs?: Map; + /** Document JSON Schemas per type */ + document_schemas: Map; +} +/** @ignore */ +const DataContractInSerializationFormatV0 : BinCodeable & ((data: { + /** A unique identifier for the data contract. */ + id: Identifier, + /** Internal configuration for the contract. */ + config: DataContractConfig, + /** The version of this data contract. */ + version: number, + /** The identifier of the contract owner. */ + owner_id: Identifier, + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs?: Map, + /** Document JSON Schemas per type */ + document_schemas: Map, +}) => DataContractInSerializationFormatV0); + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_update_state_transition" */ +/** @ignore */ +export abstract class DataContractUpdateTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DataContractUpdateTransition): void; + /** @ignore */ + static decode(bc: BinCode): DataContractUpdateTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DataContractUpdateTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DataContractUpdateTransition.V0, + }; +} +namespace DataContractUpdateTransition { + /** @function */ + interface V0 extends DataContractUpdateTransition { + [0]: DataContractUpdateTransitionV0; + } + /** @ignore */ + const V0: (f0: DataContractUpdateTransitionV0) => DataContractUpdateTransition.V0; +} + +interface DataContractUpdateTransitionV0 { + identity_contract_nonce: IdentityNonce; + data_contract: DataContractInSerializationFormat; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const DataContractUpdateTransitionV0 : BinCodeable & ((data: { + identity_contract_nonce: IdentityNonce, + data_contract: DataContractInSerializationFormat, + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => DataContractUpdateTransitionV0); + +export type DefinitionName = string; + +/** @ignore */ +export abstract class DocumentBaseTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentBaseTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentBaseTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentBaseTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentBaseTransition.V0, + }; +} +namespace DocumentBaseTransition { + /** @function */ + interface V0 extends DocumentBaseTransition { + [0]: DocumentBaseTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentBaseTransitionV0) => DocumentBaseTransition.V0; +} + +interface DocumentBaseTransitionV0 { + /** The document ID */ + id: Identifier; + identity_contract_nonce: IdentityNonce; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: string; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier; +} +/** @ignore */ +const DocumentBaseTransitionV0 : BinCodeable & ((data: { + /** The document ID */ + id: Identifier, + identity_contract_nonce: IdentityNonce, + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: string, + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier, +}) => DocumentBaseTransitionV0); + +/** @ignore */ +export abstract class DocumentCreateTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentCreateTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentCreateTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentCreateTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentCreateTransition.V0, + }; +} +namespace DocumentCreateTransition { + /** @function */ + interface V0 extends DocumentCreateTransition { + [0]: DocumentCreateTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentCreateTransitionV0) => DocumentCreateTransition.V0; +} + +interface DocumentCreateTransitionV0 { + /** Document Base Transition */ + base: DocumentBaseTransition; + /** Entropy used to create a Document ID. */ + entropy: FixedBytes<32>; + data: Map; + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance?: [string, Credits]; +} +/** @ignore */ +const DocumentCreateTransitionV0 : BinCodeable & ((data: { + /** Document Base Transition */ + base: DocumentBaseTransition, + /** Entropy used to create a Document ID. */ + entropy: FixedBytes<32>, + data: Map, + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance?: [string, Credits], +}) => DocumentCreateTransitionV0); + +/** @ignore */ +export abstract class DocumentDeleteTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentDeleteTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentDeleteTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentDeleteTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentDeleteTransition.V0, + }; +} +namespace DocumentDeleteTransition { + /** @function */ + interface V0 extends DocumentDeleteTransition { + [0]: DocumentDeleteTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentDeleteTransitionV0) => DocumentDeleteTransition.V0; +} + +interface DocumentDeleteTransitionV0 { + base: DocumentBaseTransition; +} +/** @ignore */ +const DocumentDeleteTransitionV0 : BinCodeable & ((data: { + base: DocumentBaseTransition, +}) => DocumentDeleteTransitionV0); + +export type DocumentName = string; + +/** @ignore */ +export abstract class DocumentPurchaseTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentPurchaseTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentPurchaseTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentPurchaseTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentPurchaseTransition.V0, + }; +} +namespace DocumentPurchaseTransition { + /** @function */ + interface V0 extends DocumentPurchaseTransition { + [0]: DocumentPurchaseTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentPurchaseTransitionV0) => DocumentPurchaseTransition.V0; +} + +interface DocumentPurchaseTransitionV0 { + base: DocumentBaseTransition; + revision: Revision; + price: Credits; +} +/** @ignore */ +const DocumentPurchaseTransitionV0 : BinCodeable & ((data: { + base: DocumentBaseTransition, + revision: Revision, + price: Credits, +}) => DocumentPurchaseTransitionV0); + +/** @ignore */ +export abstract class DocumentReplaceTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentReplaceTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentReplaceTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentReplaceTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentReplaceTransition.V0, + }; +} +namespace DocumentReplaceTransition { + /** @function */ + interface V0 extends DocumentReplaceTransition { + [0]: DocumentReplaceTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentReplaceTransitionV0) => DocumentReplaceTransition.V0; +} + +interface DocumentReplaceTransitionV0 { + base: DocumentBaseTransition; + revision: Revision; + data: Map; +} +/** @ignore */ +const DocumentReplaceTransitionV0 : BinCodeable & ((data: { + base: DocumentBaseTransition, + revision: Revision, + data: Map, +}) => DocumentReplaceTransitionV0); + +/** @ignore */ +export abstract class DocumentTransferTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentTransferTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentTransferTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentTransferTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentTransferTransition.V0, + }; +} +namespace DocumentTransferTransition { + /** @function */ + interface V0 extends DocumentTransferTransition { + [0]: DocumentTransferTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentTransferTransitionV0) => DocumentTransferTransition.V0; +} + +interface DocumentTransferTransitionV0 { + base: DocumentBaseTransition; + revision: Revision; + recipient_owner_id: Identifier; +} +/** @ignore */ +const DocumentTransferTransitionV0 : BinCodeable & ((data: { + base: DocumentBaseTransition, + revision: Revision, + recipient_owner_id: Identifier, +}) => DocumentTransferTransitionV0); + +/** @ignore */ +export abstract class DocumentTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentTransition.variants; + /** @ignore */ + static variants: { + Create: typeof DocumentTransition.Create, + Replace: typeof DocumentTransition.Replace, + Delete: typeof DocumentTransition.Delete, + Transfer: typeof DocumentTransition.Transfer, + UpdatePrice: typeof DocumentTransition.UpdatePrice, + Purchase: typeof DocumentTransition.Purchase, + }; +} +namespace DocumentTransition { + /** @function */ + interface Create extends DocumentTransition { + [0]: DocumentCreateTransition; + } + /** @ignore */ + const Create: (f0: DocumentCreateTransition) => DocumentTransition.Create; + /** @function */ + interface Replace extends DocumentTransition { + [0]: DocumentReplaceTransition; + } + /** @ignore */ + const Replace: (f0: DocumentReplaceTransition) => DocumentTransition.Replace; + /** @function */ + interface Delete extends DocumentTransition { + [0]: DocumentDeleteTransition; + } + /** @ignore */ + const Delete: (f0: DocumentDeleteTransition) => DocumentTransition.Delete; + /** @function */ + interface Transfer extends DocumentTransition { + [0]: DocumentTransferTransition; + } + /** @ignore */ + const Transfer: (f0: DocumentTransferTransition) => DocumentTransition.Transfer; + /** @function */ + interface UpdatePrice extends DocumentTransition { + [0]: DocumentUpdatePriceTransition; + } + /** @ignore */ + const UpdatePrice: (f0: DocumentUpdatePriceTransition) => DocumentTransition.UpdatePrice; + /** @function */ + interface Purchase extends DocumentTransition { + [0]: DocumentPurchaseTransition; + } + /** @ignore */ + const Purchase: (f0: DocumentPurchaseTransition) => DocumentTransition.Purchase; +} + +/** @ignore */ +export abstract class DocumentUpdatePriceTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentUpdatePriceTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentUpdatePriceTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentUpdatePriceTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentUpdatePriceTransition.V0, + }; +} +namespace DocumentUpdatePriceTransition { + /** @function */ + interface V0 extends DocumentUpdatePriceTransition { + [0]: DocumentUpdatePriceTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentUpdatePriceTransitionV0) => DocumentUpdatePriceTransition.V0; +} + +interface DocumentUpdatePriceTransitionV0 { + base: DocumentBaseTransition; + revision: Revision; + price: Credits; +} +/** @ignore */ +const DocumentUpdatePriceTransitionV0 : BinCodeable & ((data: { + base: DocumentBaseTransition, + revision: Revision, + price: Credits, +}) => DocumentUpdatePriceTransitionV0); + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.documents_batch_state_transition" */ +/** @ignore */ +export abstract class DocumentsBatchTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentsBatchTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentsBatchTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentsBatchTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentsBatchTransition.V0, + }; +} +namespace DocumentsBatchTransition { + /** @function */ + interface V0 extends DocumentsBatchTransition { + [0]: DocumentsBatchTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentsBatchTransitionV0) => DocumentsBatchTransition.V0; +} + +interface DocumentsBatchTransitionV0 { + owner_id: Identifier; + transitions: DocumentTransition[]; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const DocumentsBatchTransitionV0 : BinCodeable & ((data: { + owner_id: Identifier, + transitions: DocumentTransition[], + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => DocumentsBatchTransitionV0); + +export type Hash256 = FixedBytes<32>; + +interface Identifier { + [0]: IdentifierBytes32; +} +/** @ignore */ +const Identifier : BinCodeable & (( + f0: IdentifierBytes32, +) => Identifier); + +interface IdentifierBytes32 { + [0]: FixedBytes<32>; +} +/** @ignore */ +const IdentifierBytes32 : BinCodeable & (( + f0: FixedBytes<32>, +) => IdentifierBytes32); + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_create_state_transition" */ +/** @ignore */ +export abstract class IdentityCreateTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: IdentityCreateTransition): void; + /** @ignore */ + static decode(bc: BinCode): IdentityCreateTransition; + /** @ignore @internal */ + [VARIANTS]: typeof IdentityCreateTransition.variants; + /** @ignore */ + static variants: { + V0: typeof IdentityCreateTransition.V0, + }; +} +namespace IdentityCreateTransition { + /** @function */ + interface V0 extends IdentityCreateTransition { + [0]: IdentityCreateTransitionV0; + } + /** @ignore */ + const V0: (f0: IdentityCreateTransitionV0) => IdentityCreateTransition.V0; +} + +/** platform_signable derive_bincode_with_borrowed_vec */ +interface IdentityCreateTransitionV0 { + /** platform_signable into = "Vec" */ + public_keys: IdentityPublicKeyInCreation[]; + asset_lock_proof: AssetLockProof; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; + /** platform_signable exclude_from_sig_hash */ + identity_id: Identifier; +} +/** @ignore */ +const IdentityCreateTransitionV0 : BinCodeable & ((data: { + /** platform_signable into = "Vec" */ + public_keys: IdentityPublicKeyInCreation[], + asset_lock_proof: AssetLockProof, + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, + /** platform_signable exclude_from_sig_hash */ + identity_id: Identifier, +}) => IdentityCreateTransitionV0); + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_credit_transfer_state_transition" */ +/** @ignore */ +export abstract class IdentityCreditTransferTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: IdentityCreditTransferTransition): void; + /** @ignore */ + static decode(bc: BinCode): IdentityCreditTransferTransition; + /** @ignore @internal */ + [VARIANTS]: typeof IdentityCreditTransferTransition.variants; + /** @ignore */ + static variants: { + V0: typeof IdentityCreditTransferTransition.V0, + }; +} +namespace IdentityCreditTransferTransition { + /** @function */ + interface V0 extends IdentityCreditTransferTransition { + [0]: IdentityCreditTransferTransitionV0; + } + /** @ignore */ + const V0: (f0: IdentityCreditTransferTransitionV0) => IdentityCreditTransferTransition.V0; +} + +interface IdentityCreditTransferTransitionV0 { + identity_id: Identifier; + recipient_id: Identifier; + amount: bigint; + nonce: IdentityNonce; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const IdentityCreditTransferTransitionV0 : BinCodeable & ((data: { + identity_id: Identifier, + recipient_id: Identifier, + amount: bigint, + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => IdentityCreditTransferTransitionV0); + +/** platform_version_path "dpp.state_transition_serialization_versions.identity_credit_withdrawal_state_transition" */ +/** @ignore */ +export abstract class IdentityCreditWithdrawalTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: IdentityCreditWithdrawalTransition): void; + /** @ignore */ + static decode(bc: BinCode): IdentityCreditWithdrawalTransition; + /** @ignore @internal */ + [VARIANTS]: typeof IdentityCreditWithdrawalTransition.variants; + /** @ignore */ + static variants: { + V0: typeof IdentityCreditWithdrawalTransition.V0, + V1: typeof IdentityCreditWithdrawalTransition.V1, + }; +} +namespace IdentityCreditWithdrawalTransition { + /** @function */ + interface V0 extends IdentityCreditWithdrawalTransition { + [0]: IdentityCreditWithdrawalTransitionV0; + } + /** @ignore */ + const V0: (f0: IdentityCreditWithdrawalTransitionV0) => IdentityCreditWithdrawalTransition.V0; + /** @function */ + interface V1 extends IdentityCreditWithdrawalTransition { + [0]: IdentityCreditWithdrawalTransitionV1; + } + /** @ignore */ + const V1: (f0: IdentityCreditWithdrawalTransitionV1) => IdentityCreditWithdrawalTransition.V1; +} + +interface IdentityCreditWithdrawalTransitionV0 { + identity_id: Identifier; + amount: bigint; + core_fee_per_byte: number; + pooling: Pooling; + output_script: CoreScript; + nonce: IdentityNonce; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const IdentityCreditWithdrawalTransitionV0 : BinCodeable & ((data: { + identity_id: Identifier, + amount: bigint, + core_fee_per_byte: number, + pooling: Pooling, + output_script: CoreScript, + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => IdentityCreditWithdrawalTransitionV0); + +interface IdentityCreditWithdrawalTransitionV1 { + identity_id: Identifier; + amount: bigint; + core_fee_per_byte: number; + pooling: Pooling; + /** If the send to output script is None, then we send the withdrawal to the address set by core */ + output_script?: CoreScript; + nonce: IdentityNonce; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const IdentityCreditWithdrawalTransitionV1 : BinCodeable & ((data: { + identity_id: Identifier, + amount: bigint, + core_fee_per_byte: number, + pooling: Pooling, + /** If the send to output script is None, then we send the withdrawal to the address set by core */ + output_script?: CoreScript, + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => IdentityCreditWithdrawalTransitionV1); + +export type IdentityNonce = bigint; + +/** @ignore */ +export abstract class IdentityPublicKey { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: IdentityPublicKey): void; + /** @ignore */ + static decode(bc: BinCode): IdentityPublicKey; + /** @ignore @internal */ + [VARIANTS]: typeof IdentityPublicKey.variants; + /** @ignore */ + static variants: { + V0: typeof IdentityPublicKey.V0, + }; +} +namespace IdentityPublicKey { + /** @function */ + interface V0 extends IdentityPublicKey { + [0]: IdentityPublicKeyV0; + } + /** @ignore */ + const V0: (f0: IdentityPublicKeyV0) => IdentityPublicKey.V0; +} + +/** platform_signable derive_into */ +/** @ignore */ +export abstract class IdentityPublicKeyInCreation { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: IdentityPublicKeyInCreation): void; + /** @ignore */ + static decode(bc: BinCode): IdentityPublicKeyInCreation; + /** @ignore @internal */ + [VARIANTS]: typeof IdentityPublicKeyInCreation.variants; + /** @ignore */ + static variants: { + V0: typeof IdentityPublicKeyInCreation.V0, + }; +} +namespace IdentityPublicKeyInCreation { + /** @function */ + interface V0 extends IdentityPublicKeyInCreation { + [0]: IdentityPublicKeyInCreationV0; + } + /** @ignore */ + const V0: (f0: IdentityPublicKeyInCreationV0) => IdentityPublicKeyInCreation.V0; +} + +interface IdentityPublicKeyInCreationV0 { + id: KeyID; + key_type: KeyType; + purpose: Purpose; + security_level: SecurityLevel; + contract_bounds?: ContractBounds; + read_only: boolean; + data: BinaryData; + /** + * The signature is needed for ECDSA_SECP256K1 Key type and BLS12_381 Key type + * platform_signable exclude_from_sig_hash + */ + signature: BinaryData; +} +/** @ignore */ +const IdentityPublicKeyInCreationV0 : BinCodeable & ((data: { + id: KeyID, + key_type: KeyType, + purpose: Purpose, + security_level: SecurityLevel, + contract_bounds?: ContractBounds, + read_only: boolean, + data: BinaryData, + /** + * The signature is needed for ECDSA_SECP256K1 Key type and BLS12_381 Key type + * platform_signable exclude_from_sig_hash + */ + signature: BinaryData, +}) => IdentityPublicKeyInCreationV0); + +interface IdentityPublicKeyV0 { + id: KeyID; + purpose: Purpose; + security_level: SecurityLevel; + contract_bounds?: ContractBounds; + key_type: KeyType; + read_only: boolean; + data: BinaryData; + disabled_at?: TimestampMillis; +} +/** @ignore */ +const IdentityPublicKeyV0 : BinCodeable & ((data: { + id: KeyID, + purpose: Purpose, + security_level: SecurityLevel, + contract_bounds?: ContractBounds, + key_type: KeyType, + read_only: boolean, + data: BinaryData, + disabled_at?: TimestampMillis, +}) => IdentityPublicKeyV0); + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_top_up_state_transition" */ +/** @ignore */ +export abstract class IdentityTopUpTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: IdentityTopUpTransition): void; + /** @ignore */ + static decode(bc: BinCode): IdentityTopUpTransition; + /** @ignore @internal */ + [VARIANTS]: typeof IdentityTopUpTransition.variants; + /** @ignore */ + static variants: { + V0: typeof IdentityTopUpTransition.V0, + }; +} +namespace IdentityTopUpTransition { + /** @function */ + interface V0 extends IdentityTopUpTransition { + [0]: IdentityTopUpTransitionV0; + } + /** @ignore */ + const V0: (f0: IdentityTopUpTransitionV0) => IdentityTopUpTransition.V0; +} + +interface IdentityTopUpTransitionV0 { + asset_lock_proof: AssetLockProof; + identity_id: Identifier; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const IdentityTopUpTransitionV0 : BinCodeable & ((data: { + asset_lock_proof: AssetLockProof, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => IdentityTopUpTransitionV0); + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_update_state_transition" */ +/** @ignore */ +export abstract class IdentityUpdateTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: IdentityUpdateTransition): void; + /** @ignore */ + static decode(bc: BinCode): IdentityUpdateTransition; + /** @ignore @internal */ + [VARIANTS]: typeof IdentityUpdateTransition.variants; + /** @ignore */ + static variants: { + V0: typeof IdentityUpdateTransition.V0, + }; +} +namespace IdentityUpdateTransition { + /** @function */ + interface V0 extends IdentityUpdateTransition { + [0]: IdentityUpdateTransitionV0; + } + /** @ignore */ + const V0: (f0: IdentityUpdateTransitionV0) => IdentityUpdateTransition.V0; +} + +/** platform_signable derive_bincode_with_borrowed_vec */ +interface IdentityUpdateTransitionV0 { + /** Unique identifier of the identity to be updated */ + identity_id: Identifier; + /** The revision of the identity after update */ + revision: Revision; + /** Identity nonce for this transition to prevent replay attacks */ + nonce: IdentityNonce; + /** + * Public Keys to add to the Identity + * we want to skip serialization of transitions, as we does it manually in `to_object()` and `to_json()` + * platform_signable into = "Vec" + */ + add_public_keys: IdentityPublicKeyInCreation[]; + /** Identity Public Keys ID's to disable for the Identity */ + disable_public_keys: KeyID[]; + /** The fee multiplier */ + user_fee_increase: UserFeeIncrease; + /** + * The ID of the public key used to sing the State Transition + * platform_signable exclude_from_sig_hash + */ + signature_public_key_id: KeyID; + /** + * Cryptographic signature of the State Transition + * platform_signable exclude_from_sig_hash + */ + signature: BinaryData; +} +/** @ignore */ +const IdentityUpdateTransitionV0 : BinCodeable & ((data: { + /** Unique identifier of the identity to be updated */ + identity_id: Identifier, + /** The revision of the identity after update */ + revision: Revision, + /** Identity nonce for this transition to prevent replay attacks */ + nonce: IdentityNonce, + /** + * Public Keys to add to the Identity + * we want to skip serialization of transitions, as we does it manually in `to_object()` and `to_json()` + * platform_signable into = "Vec" + */ + add_public_keys: IdentityPublicKeyInCreation[], + /** Identity Public Keys ID's to disable for the Identity */ + disable_public_keys: KeyID[], + /** The fee multiplier */ + user_fee_increase: UserFeeIncrease, + /** + * The ID of the public key used to sing the State Transition + * platform_signable exclude_from_sig_hash + */ + signature_public_key_id: KeyID, + /** + * Cryptographic signature of the State Transition + * platform_signable exclude_from_sig_hash + */ + signature: BinaryData, +}) => IdentityUpdateTransitionV0); + +/** A hash of all transaction inputs */ +interface InputsHash { + [0]: Hash; +} +/** @ignore */ +const InputsHash : BinCodeable & (( + f0: Hash, +) => InputsHash); + +export type InstantAssetLockProof = RawInstantLockProof; + +export type KeyID = number; + +/** + * allow non_camel_case_types + * repr u8 + */ +/** @ignore */ +export abstract class KeyType { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: KeyType): void; + /** @ignore */ + static decode(bc: BinCode): KeyType; + /** @ignore @internal */ + [VARIANTS]: typeof KeyType.variants; + /** @ignore */ + static variants: { + ECDSA_SECP256K1: typeof KeyType.ECDSA_SECP256K1, + BLS12_381: typeof KeyType.BLS12_381, + ECDSA_HASH160: typeof KeyType.ECDSA_HASH160, + BIP13_SCRIPT_HASH: typeof KeyType.BIP13_SCRIPT_HASH, + EDDSA_25519_HASH160: typeof KeyType.EDDSA_25519_HASH160, + }; +} +namespace KeyType { + /** default */ + const ECDSA_SECP256K1: () => KeyType; + const BLS12_381: () => KeyType; + const ECDSA_HASH160: () => KeyType; + const BIP13_SCRIPT_HASH: () => KeyType; + const EDDSA_25519_HASH160: () => KeyType; +} + +/** @ignore */ +export abstract class LLMQType { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: LLMQType): void; + /** @ignore */ + static decode(bc: BinCode): LLMQType; + /** @ignore @internal */ + [VARIANTS]: typeof LLMQType.variants; + /** @ignore */ + static variants: { + LlmqtypeUnknown: typeof LLMQType.LlmqtypeUnknown, + Llmqtype50_60: typeof LLMQType.Llmqtype50_60, + Llmqtype400_60: typeof LLMQType.Llmqtype400_60, + Llmqtype400_85: typeof LLMQType.Llmqtype400_85, + Llmqtype100_67: typeof LLMQType.Llmqtype100_67, + Llmqtype60_75: typeof LLMQType.Llmqtype60_75, + Llmqtype25_67: typeof LLMQType.Llmqtype25_67, + LlmqtypeTest: typeof LLMQType.LlmqtypeTest, + LlmqtypeDevnet: typeof LLMQType.LlmqtypeDevnet, + LlmqtypeTestV17: typeof LLMQType.LlmqtypeTestV17, + LlmqtypeTestDIP0024: typeof LLMQType.LlmqtypeTestDIP0024, + LlmqtypeTestInstantSend: typeof LLMQType.LlmqtypeTestInstantSend, + LlmqtypeDevnetDIP0024: typeof LLMQType.LlmqtypeDevnetDIP0024, + LlmqtypeTestnetPlatform: typeof LLMQType.LlmqtypeTestnetPlatform, + LlmqtypeDevnetPlatform: typeof LLMQType.LlmqtypeDevnetPlatform, + }; +} +namespace LLMQType { + const LlmqtypeUnknown: () => LLMQType; + const Llmqtype50_60: () => LLMQType; + const Llmqtype400_60: () => LLMQType; + const Llmqtype400_85: () => LLMQType; + const Llmqtype100_67: () => LLMQType; + const Llmqtype60_75: () => LLMQType; + const Llmqtype25_67: () => LLMQType; + const LlmqtypeTest: () => LLMQType; + const LlmqtypeDevnet: () => LLMQType; + const LlmqtypeTestV17: () => LLMQType; + const LlmqtypeTestDIP0024: () => LLMQType; + const LlmqtypeTestInstantSend: () => LLMQType; + const LlmqtypeDevnetDIP0024: () => LLMQType; + const LlmqtypeTestnetPlatform: () => LLMQType; + const LlmqtypeDevnetPlatform: () => LLMQType; +} + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.masternode_vote_state_transition" */ +/** @ignore */ +export abstract class MasternodeVoteTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: MasternodeVoteTransition): void; + /** @ignore */ + static decode(bc: BinCode): MasternodeVoteTransition; + /** @ignore @internal */ + [VARIANTS]: typeof MasternodeVoteTransition.variants; + /** @ignore */ + static variants: { + V0: typeof MasternodeVoteTransition.V0, + }; +} +namespace MasternodeVoteTransition { + /** @function */ + interface V0 extends MasternodeVoteTransition { + [0]: MasternodeVoteTransitionV0; + } + /** @ignore */ + const V0: (f0: MasternodeVoteTransitionV0) => MasternodeVoteTransition.V0; +} + +interface MasternodeVoteTransitionV0 { + pro_tx_hash: Identifier; + voter_identity_id: Identifier; + vote: Vote; + nonce: IdentityNonce; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const MasternodeVoteTransitionV0 : BinCodeable & ((data: { + pro_tx_hash: Identifier, + voter_identity_id: Identifier, + vote: Vote, + nonce: IdentityNonce, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => MasternodeVoteTransitionV0); + +/** + * Dash Additions + * + * The merkle root of the masternode list + * hash_newtype forward + */ +interface MerkleRootMasternodeList { + [0]: Hash; +} +/** @ignore */ +const MerkleRootMasternodeList : BinCodeable & (( + f0: Hash, +) => MerkleRootMasternodeList); + +/** + * The merkle root of the quorums + * hash_newtype forward + */ +interface MerkleRootQuorums { + [0]: Hash; +} +/** @ignore */ +const MerkleRootQuorums : BinCodeable & (( + f0: Hash, +) => MerkleRootQuorums); + +/** A reference to a transaction output. */ +interface OutPoint { + /** The referenced transaction's txid. */ + txid: Txid; + /** The index of the referenced output in its transaction's vout. */ + vout: number; +} +/** @ignore */ +const OutPoint : BinCodeable & ((data: { + /** The referenced transaction's txid. */ + txid: Txid, + /** The index of the referenced output in its transaction's vout. */ + vout: number, +}) => OutPoint); + +/** repr u8 */ +/** @ignore */ +export abstract class Pooling { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: Pooling): void; + /** @ignore */ + static decode(bc: BinCode): Pooling; + /** @ignore @internal */ + [VARIANTS]: typeof Pooling.variants; + /** @ignore */ + static variants: { + Never: typeof Pooling.Never, + IfAvailable: typeof Pooling.IfAvailable, + Standard: typeof Pooling.Standard, + }; +} +namespace Pooling { + /** default */ + const Never: () => Pooling; + const IfAvailable: () => Pooling; + const Standard: () => Pooling; +} + +/** @ignore */ +export abstract class ProviderMasternodeType { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: ProviderMasternodeType): void; + /** @ignore */ + static decode(bc: BinCode): ProviderMasternodeType; + /** @ignore @internal */ + [VARIANTS]: typeof ProviderMasternodeType.variants; + /** @ignore */ + static variants: { + Regular: typeof ProviderMasternodeType.Regular, + HighPerformance: typeof ProviderMasternodeType.HighPerformance, + }; +} +namespace ProviderMasternodeType { + const Regular: () => ProviderMasternodeType; + const HighPerformance: () => ProviderMasternodeType; +} + +/** + * A Provider Registration Payload used in a Provider Registration Special Transaction. + * This is used to register a Masternode on the network. + * The current version is 0. + * Interesting Fields: + * *Provider type refers to the type of Masternode. Currently only valid value is 0. + * *Provider mode refers to the mode of the Masternode. Currently only valid value is 0. + * *The collateral outpoint links to a transaction with a 1000 Dash unspent (at registration) + * outpoint. + * *The operator reward defines the ratio when divided by 10000 of the amount going to the operator. + * The max value for the operator reward is 10000. + * *The script payout is the script to which one wants to have the masternode pay out. + * *The inputs hash is used to guarantee the uniqueness of the payload sig. + */ +interface ProviderRegistrationPayload { + version: number; + masternode_type: ProviderMasternodeType; + masternode_mode: number; + collateral_outpoint: OutPoint; + service_address: SocketAddr; + owner_key_hash: PubkeyHash; + operator_public_key: BLSPublicKey; + voting_key_hash: PubkeyHash; + operator_reward: number; + script_payout: ScriptBuf; + inputs_hash: InputsHash; + signature: Uint8Array; + platform_node_id?: PubkeyHash; + platform_p2p_port?: number; + platform_http_port?: number; +} +/** @ignore */ +const ProviderRegistrationPayload : BinCodeable & ((data: { + version: number, + masternode_type: ProviderMasternodeType, + masternode_mode: number, + collateral_outpoint: OutPoint, + service_address: SocketAddr, + owner_key_hash: PubkeyHash, + operator_public_key: BLSPublicKey, + voting_key_hash: PubkeyHash, + operator_reward: number, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + signature: Uint8Array, + platform_node_id?: PubkeyHash, + platform_p2p_port?: number, + platform_http_port?: number, +}) => ProviderRegistrationPayload); + +/** + * A Provider Update Registrar Payload used in a Provider Update Registrar Special Transaction. + * This is used to update the base aspects a Masternode on the network. + * It must be signed by the owner's key that was set at registration. + */ +interface ProviderUpdateRegistrarPayload { + version: number; + pro_tx_hash: Txid; + provider_mode: number; + operator_public_key: BLSPublicKey; + voting_key_hash: PubkeyHash; + script_payout: ScriptBuf; + inputs_hash: InputsHash; + payload_sig: Uint8Array; +} +/** @ignore */ +const ProviderUpdateRegistrarPayload : BinCodeable & ((data: { + version: number, + pro_tx_hash: Txid, + provider_mode: number, + operator_public_key: BLSPublicKey, + voting_key_hash: PubkeyHash, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + payload_sig: Uint8Array, +}) => ProviderUpdateRegistrarPayload); + +/** + * A Provider Update Revocation Payload used in a Provider Update Revocation Special Transaction. + * This is used to signal and stop a Masternode from the operator. + * It must be signed by the operator's key that was set at registration or registrar update. + */ +interface ProviderUpdateRevocationPayload { + version: number; + pro_tx_hash: Txid; + reason: number; + inputs_hash: InputsHash; + payload_sig: BLSSignature; +} +/** @ignore */ +const ProviderUpdateRevocationPayload : BinCodeable & ((data: { + version: number, + pro_tx_hash: Txid, + reason: number, + inputs_hash: InputsHash, + payload_sig: BLSSignature, +}) => ProviderUpdateRevocationPayload); + +/** + * A Provider Update Service Payload used in a Provider Update Service Special Transaction. + * This is used to update the operational aspects a Masternode on the network. + * It must be signed by the operator's key that was set either at registration or by the last + * registrar update of the masternode. + */ +interface ProviderUpdateServicePayload { + version: number; + pro_tx_hash: Txid; + ip_address: bigint; + port: number; + script_payout: ScriptBuf; + inputs_hash: InputsHash; + payload_sig: BLSSignature; +} +/** @ignore */ +const ProviderUpdateServicePayload : BinCodeable & ((data: { + version: number, + pro_tx_hash: Txid, + ip_address: bigint, + port: number, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + payload_sig: BLSSignature, +}) => ProviderUpdateServicePayload); + +/** A hash of a public key. */ +interface PubkeyHash { + [0]: Hash; +} +/** @ignore */ +const PubkeyHash : BinCodeable & (( + f0: Hash, +) => PubkeyHash); + +/** repr u8 */ +/** @ignore */ +export abstract class Purpose { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: Purpose): void; + /** @ignore */ + static decode(bc: BinCode): Purpose; + /** @ignore @internal */ + [VARIANTS]: typeof Purpose.variants; + /** @ignore */ + static variants: { + AUTHENTICATION: typeof Purpose.AUTHENTICATION, + ENCRYPTION: typeof Purpose.ENCRYPTION, + DECRYPTION: typeof Purpose.DECRYPTION, + TRANSFER: typeof Purpose.TRANSFER, + SYSTEM: typeof Purpose.SYSTEM, + VOTING: typeof Purpose.VOTING, + OWNER: typeof Purpose.OWNER, + }; +} +namespace Purpose { + /** + * at least one authentication key must be registered for all security levels + * default + */ + const AUTHENTICATION: () => Purpose; + /** this key cannot be used for signing documents */ + const ENCRYPTION: () => Purpose; + /** this key cannot be used for signing documents */ + const DECRYPTION: () => Purpose; + /** this key is used to sign credit transfer and withdrawal state transitions */ + const TRANSFER: () => Purpose; + /** this key cannot be used for signing documents */ + const SYSTEM: () => Purpose; + /** this key cannot be used for signing documents */ + const VOTING: () => Purpose; + /** this key is used to prove ownership of a masternode or evonode */ + const OWNER: () => Purpose; +} + +/** + * A Quorum Commitment Payload used in a Quorum Commitment Special Transaction. + * This is used in the mining phase as described in DIP 6: + * [dip-0006.md#7-mining-phase](https://github.com/dashpay/dips/blob/master/dip-0006.md#7-mining-phase). + * + * Miners take the best final commitment for a DKG session and mine it into a block. + */ +interface QuorumCommitmentPayload { + version: number; + height: number; + finalization_commitment: QuorumEntry; +} +/** @ignore */ +const QuorumCommitmentPayload : BinCodeable & ((data: { + version: number, + height: number, + finalization_commitment: QuorumEntry, +}) => QuorumCommitmentPayload); + +/** + * A Quorum Finalization Commitment. It is described in the finalization section of DIP6: + * [dip-0006.md#6-finalization-phase](https://github.com/dashpay/dips/blob/master/dip-0006.md#6-finalization-phase) + */ +interface QuorumEntry { + version: number; + llmq_type: LLMQType; + quorum_hash: QuorumHash; + quorum_index?: number; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: BLSPublicKey; + quorum_vvec_hash: QuorumVVecHash; + threshold_sig: BLSSignature; + all_commitment_aggregated_signature: BLSSignature; +} +/** @ignore */ +const QuorumEntry : BinCodeable & ((data: { + version: number, + llmq_type: LLMQType, + quorum_hash: QuorumHash, + quorum_index?: number, + signers: boolean[], + valid_members: boolean[], + quorum_public_key: BLSPublicKey, + quorum_vvec_hash: QuorumVVecHash, + threshold_sig: BLSSignature, + all_commitment_aggregated_signature: BLSSignature, +}) => QuorumEntry); + +export type QuorumHash = BlockHash; + +/** A hash of a quorum verification vector */ +interface QuorumVVecHash { + [0]: Hash; +} +/** @ignore */ +const QuorumVVecHash : BinCodeable & (( + f0: Hash, +) => QuorumVVecHash); + +/** + * A representation of a dynamic value that can handled dynamically + * non_exhaustive + */ +/** @ignore */ +export abstract class Value { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: Value): void; + /** @ignore */ + static decode(bc: BinCode): Value; + /** @ignore @internal */ + [VARIANTS]: typeof Value.variants; + /** @ignore */ + static variants: { + U128: typeof Value.U128, + I128: typeof Value.I128, + U64: typeof Value.U64, + I64: typeof Value.I64, + U32: typeof Value.U32, + I32: typeof Value.I32, + U16: typeof Value.U16, + I16: typeof Value.I16, + U8: typeof Value.U8, + I8: typeof Value.I8, + Bytes: typeof Value.Bytes, + Bytes20: typeof Value.Bytes20, + Bytes32: typeof Value.Bytes32, + Bytes36: typeof Value.Bytes36, + EnumU8: typeof Value.EnumU8, + EnumString: typeof Value.EnumString, + Identifier: typeof Value.Identifier, + Float: typeof Value.Float, + Text: typeof Value.Text, + Bool: typeof Value.Bool, + Null: typeof Value.Null, + Array: typeof Value.Array, + Map: typeof Value.Map, + }; +} +namespace Value { + /** + * A u128 integer + * + * @function + */ + interface U128 extends Value { + [0]: bigint; + } + /** @ignore */ + const U128: (f0: bigint) => Value.U128; + /** + * A i128 integer + * + * @function + */ + interface I128 extends Value { + [0]: bigint; + } + /** @ignore */ + const I128: (f0: bigint) => Value.I128; + /** + * A u64 integer + * + * @function + */ + interface U64 extends Value { + [0]: bigint; + } + /** @ignore */ + const U64: (f0: bigint) => Value.U64; + /** + * A i64 integer + * + * @function + */ + interface I64 extends Value { + [0]: bigint; + } + /** @ignore */ + const I64: (f0: bigint) => Value.I64; + /** + * A u32 integer + * + * @function + */ + interface U32 extends Value { + [0]: number; + } + /** @ignore */ + const U32: (f0: number) => Value.U32; + /** + * A i32 integer + * + * @function + */ + interface I32 extends Value { + [0]: number; + } + /** @ignore */ + const I32: (f0: number) => Value.I32; + /** + * A u16 integer + * + * @function + */ + interface U16 extends Value { + [0]: number; + } + /** @ignore */ + const U16: (f0: number) => Value.U16; + /** + * A i16 integer + * + * @function + */ + interface I16 extends Value { + [0]: number; + } + /** @ignore */ + const I16: (f0: number) => Value.I16; + /** + * A u8 integer + * + * @function + */ + interface U8 extends Value { + [0]: number; + } + /** @ignore */ + const U8: (f0: number) => Value.U8; + /** + * A i8 integer + * + * @function + */ + interface I8 extends Value { + [0]: number; + } + /** @ignore */ + const I8: (f0: number) => Value.I8; + /** + * Bytes + * + * @function + */ + interface Bytes extends Value { + [0]: Uint8Array; + } + /** @ignore */ + const Bytes: (f0: Uint8Array) => Value.Bytes; + /** + * Bytes 20 + * + * @function + */ + interface Bytes20 extends Value { + [0]: FixedBytes<20>; + } + /** @ignore */ + const Bytes20: (f0: FixedBytes<20>) => Value.Bytes20; + /** + * Bytes 32 + * + * @function + */ + interface Bytes32 extends Value { + [0]: FixedBytes<32>; + } + /** @ignore */ + const Bytes32: (f0: FixedBytes<32>) => Value.Bytes32; + /** + * Bytes 36 : Useful for outpoints + * + * @function + */ + interface Bytes36 extends Value { + [0]: FixedBytes<36>; + } + /** @ignore */ + const Bytes36: (f0: FixedBytes<36>) => Value.Bytes36; + /** + * An enumeration of u8 + * + * @function + */ + interface EnumU8 extends Value { + [0]: Uint8Array; + } + /** @ignore */ + const EnumU8: (f0: Uint8Array) => Value.EnumU8; + /** + * An enumeration of strings + * + * @function + */ + interface EnumString extends Value { + [0]: string[]; + } + /** @ignore */ + const EnumString: (f0: string[]) => Value.EnumString; + /** + * Identifier + * The identifier is very similar to bytes, however it is serialized to Base58 when converted + * to a JSON Value + * + * @function + */ + interface Identifier extends Value { + [0]: Hash256; + } + /** @ignore */ + const Identifier: (f0: Hash256) => Value.Identifier; + /** + * A float + * + * @function + */ + interface Float extends Value { + [0]: number; + } + /** @ignore */ + const Float: (f0: number) => Value.Float; + /** + * A string + * + * @function + */ + interface Text extends Value { + [0]: string; + } + /** @ignore */ + const Text: (f0: string) => Value.Text; + /** + * A boolean + * + * @function + */ + interface Bool extends Value { + [0]: boolean; + } + /** @ignore */ + const Bool: (f0: boolean) => Value.Bool; + /** Null */ + const Null: () => Value; + /** + * An array + * + * @function + */ + interface Array extends Value { + [0]: Value[]; + } + /** @ignore */ + const Array: (f0: Value[]) => Value.Array; + /** + * A map + * + * @function + */ + interface Map extends Value { + [0]: ValueMap; + } + /** @ignore */ + const Map: (f0: ValueMap) => Value.Map; +} + +/** "Raw" instant lock for serialization */ +interface RawInstantLockProof { + instant_lock: BinaryData; + transaction: BinaryData; + output_index: number; +} +/** @ignore */ +const RawInstantLockProof : BinCodeable & ((data: { + instant_lock: BinaryData, + transaction: BinaryData, + output_index: number, +}) => RawInstantLockProof); + +/** @ignore */ +export abstract class ResourceVote { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: ResourceVote): void; + /** @ignore */ + static decode(bc: BinCode): ResourceVote; + /** @ignore @internal */ + [VARIANTS]: typeof ResourceVote.variants; + /** @ignore */ + static variants: { + V0: typeof ResourceVote.V0, + }; +} +namespace ResourceVote { + /** @function */ + interface V0 extends ResourceVote { + [0]: ResourceVoteV0; + } + /** @ignore */ + const V0: (f0: ResourceVoteV0) => ResourceVote.V0; +} + +/** + * A resource votes is a votes determining what we should do with a contested resource. + * For example Alice and Bob both want the username "Malaka" + * Some would vote for Alice to get it by putting in her Identifier. + * Some would vote for Bob to get it by putting in Bob's Identifier. + * Let's say someone voted, but is now not quite sure of their votes, they can abstain. + * Lock is there to signal that the shared resource should be given to no one. + * In this case Malaka might have a bad connotation in Greek, hence some might votes to Lock + * the name. + */ +/** @ignore */ +export abstract class ResourceVoteChoice { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: ResourceVoteChoice): void; + /** @ignore */ + static decode(bc: BinCode): ResourceVoteChoice; + /** @ignore @internal */ + [VARIANTS]: typeof ResourceVoteChoice.variants; + /** @ignore */ + static variants: { + TowardsIdentity: typeof ResourceVoteChoice.TowardsIdentity, + Abstain: typeof ResourceVoteChoice.Abstain, + Lock: typeof ResourceVoteChoice.Lock, + }; +} +namespace ResourceVoteChoice { + /** @function */ + interface TowardsIdentity extends ResourceVoteChoice { + [0]: Identifier; + } + /** @ignore */ + const TowardsIdentity: (f0: Identifier) => ResourceVoteChoice.TowardsIdentity; + /** default */ + const Abstain: () => ResourceVoteChoice; + const Lock: () => ResourceVoteChoice; +} + +interface ResourceVoteV0 { + vote_poll: VotePoll; + resource_vote_choice: ResourceVoteChoice; +} +/** @ignore */ +const ResourceVoteV0 : BinCodeable & ((data: { + vote_poll: VotePoll, + resource_vote_choice: ResourceVoteChoice, +}) => ResourceVoteV0); + +export type Revision = bigint; + +/** + * An owned, growable script. + * + * `ScriptBuf` is the most common script type that has the ownership over the contents of the + * script. It has a close relationship with its borrowed counterpart, [`Script`]. + * + * Just as other similar types, this implements [`Deref`], so [deref coercions] apply. Also note + * that all the safety/validity restrictions that apply to [`Script`] apply to `ScriptBuf` as well. + * + * [deref coercions]: https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion + */ +interface ScriptBuf { + [0]: Uint8Array; +} +/** @ignore */ +const ScriptBuf : BinCodeable & (( + f0: Uint8Array, +) => ScriptBuf); + +/** repr u8 */ +/** @ignore */ +export abstract class SecurityLevel { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: SecurityLevel): void; + /** @ignore */ + static decode(bc: BinCode): SecurityLevel; + /** @ignore @internal */ + [VARIANTS]: typeof SecurityLevel.variants; + /** @ignore */ + static variants: { + MASTER: typeof SecurityLevel.MASTER, + CRITICAL: typeof SecurityLevel.CRITICAL, + HIGH: typeof SecurityLevel.HIGH, + MEDIUM: typeof SecurityLevel.MEDIUM, + }; +} +namespace SecurityLevel { + const MASTER: () => SecurityLevel; + const CRITICAL: () => SecurityLevel; + /** default */ + const HIGH: () => SecurityLevel; + const MEDIUM: () => SecurityLevel; +} + +/** @ignore */ +export abstract class StateTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: StateTransition): void; + /** @ignore */ + static decode(bc: BinCode): StateTransition; + /** @ignore @internal */ + [VARIANTS]: typeof StateTransition.variants; + /** @ignore */ + static variants: { + DataContractCreate: typeof StateTransition.DataContractCreate, + DataContractUpdate: typeof StateTransition.DataContractUpdate, + DocumentsBatch: typeof StateTransition.DocumentsBatch, + IdentityCreate: typeof StateTransition.IdentityCreate, + IdentityTopUp: typeof StateTransition.IdentityTopUp, + IdentityCreditWithdrawal: typeof StateTransition.IdentityCreditWithdrawal, + IdentityUpdate: typeof StateTransition.IdentityUpdate, + IdentityCreditTransfer: typeof StateTransition.IdentityCreditTransfer, + MasternodeVote: typeof StateTransition.MasternodeVote, + }; +} +namespace StateTransition { + /** @function */ + interface DataContractCreate extends StateTransition { + [0]: DataContractCreateTransition; + } + /** @ignore */ + const DataContractCreate: (f0: DataContractCreateTransition) => StateTransition.DataContractCreate; + /** @function */ + interface DataContractUpdate extends StateTransition { + [0]: DataContractUpdateTransition; + } + /** @ignore */ + const DataContractUpdate: (f0: DataContractUpdateTransition) => StateTransition.DataContractUpdate; + /** @function */ + interface DocumentsBatch extends StateTransition { + [0]: DocumentsBatchTransition; + } + /** @ignore */ + const DocumentsBatch: (f0: DocumentsBatchTransition) => StateTransition.DocumentsBatch; + /** @function */ + interface IdentityCreate extends StateTransition { + [0]: IdentityCreateTransition; + } + /** @ignore */ + const IdentityCreate: (f0: IdentityCreateTransition) => StateTransition.IdentityCreate; + /** @function */ + interface IdentityTopUp extends StateTransition { + [0]: IdentityTopUpTransition; + } + /** @ignore */ + const IdentityTopUp: (f0: IdentityTopUpTransition) => StateTransition.IdentityTopUp; + /** @function */ + interface IdentityCreditWithdrawal extends StateTransition { + [0]: IdentityCreditWithdrawalTransition; + } + /** @ignore */ + const IdentityCreditWithdrawal: (f0: IdentityCreditWithdrawalTransition) => StateTransition.IdentityCreditWithdrawal; + /** @function */ + interface IdentityUpdate extends StateTransition { + [0]: IdentityUpdateTransition; + } + /** @ignore */ + const IdentityUpdate: (f0: IdentityUpdateTransition) => StateTransition.IdentityUpdate; + /** @function */ + interface IdentityCreditTransfer extends StateTransition { + [0]: IdentityCreditTransferTransition; + } + /** @ignore */ + const IdentityCreditTransfer: (f0: IdentityCreditTransferTransition) => StateTransition.IdentityCreditTransfer; + /** @function */ + interface MasternodeVote extends StateTransition { + [0]: MasternodeVoteTransition; + } + /** @ignore */ + const MasternodeVote: (f0: MasternodeVoteTransition) => StateTransition.MasternodeVote; +} + +/** + * The Storage Key requirements + * repr u8 + */ +/** @ignore */ +export abstract class StorageKeyRequirements { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: StorageKeyRequirements): void; + /** @ignore */ + static decode(bc: BinCode): StorageKeyRequirements; + /** @ignore @internal */ + [VARIANTS]: typeof StorageKeyRequirements.variants; + /** @ignore */ + static variants: { + Unique: typeof StorageKeyRequirements.Unique, + Multiple: typeof StorageKeyRequirements.Multiple, + MultipleReferenceToLatest: typeof StorageKeyRequirements.MultipleReferenceToLatest, + }; +} +namespace StorageKeyRequirements { + const Unique: () => StorageKeyRequirements; + const Multiple: () => StorageKeyRequirements; + const MultipleReferenceToLatest: () => StorageKeyRequirements; +} + +export type TimestampMillis = bigint; + +/** + * An enum wrapper around various special transaction payloads. + * Special transactions are defined in DIP 2. + */ +/** @ignore */ +export abstract class TransactionPayload { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TransactionPayload): void; + /** @ignore */ + static decode(bc: BinCode): TransactionPayload; + /** @ignore @internal */ + [VARIANTS]: typeof TransactionPayload.variants; + /** @ignore */ + static variants: { + ProviderRegistrationPayloadType: typeof TransactionPayload.ProviderRegistrationPayloadType, + ProviderUpdateServicePayloadType: typeof TransactionPayload.ProviderUpdateServicePayloadType, + ProviderUpdateRegistrarPayloadType: typeof TransactionPayload.ProviderUpdateRegistrarPayloadType, + ProviderUpdateRevocationPayloadType: typeof TransactionPayload.ProviderUpdateRevocationPayloadType, + CoinbasePayloadType: typeof TransactionPayload.CoinbasePayloadType, + QuorumCommitmentPayloadType: typeof TransactionPayload.QuorumCommitmentPayloadType, + AssetLockPayloadType: typeof TransactionPayload.AssetLockPayloadType, + AssetUnlockPayloadType: typeof TransactionPayload.AssetUnlockPayloadType, + }; +} +namespace TransactionPayload { + /** + * A wrapper for a Masternode Registration payload + * + * @function + */ + interface ProviderRegistrationPayloadType extends TransactionPayload { + [0]: ProviderRegistrationPayload; + } + /** @ignore */ + const ProviderRegistrationPayloadType: (f0: ProviderRegistrationPayload) => TransactionPayload.ProviderRegistrationPayloadType; + /** + * A wrapper for a Masternode Update Service payload + * + * @function + */ + interface ProviderUpdateServicePayloadType extends TransactionPayload { + [0]: ProviderUpdateServicePayload; + } + /** @ignore */ + const ProviderUpdateServicePayloadType: (f0: ProviderUpdateServicePayload) => TransactionPayload.ProviderUpdateServicePayloadType; + /** + * A wrapper for a Masternode Update Registrar payload + * + * @function + */ + interface ProviderUpdateRegistrarPayloadType extends TransactionPayload { + [0]: ProviderUpdateRegistrarPayload; + } + /** @ignore */ + const ProviderUpdateRegistrarPayloadType: (f0: ProviderUpdateRegistrarPayload) => TransactionPayload.ProviderUpdateRegistrarPayloadType; + /** + * A wrapper for a Masternode Update Revocation payload + * + * @function + */ + interface ProviderUpdateRevocationPayloadType extends TransactionPayload { + [0]: ProviderUpdateRevocationPayload; + } + /** @ignore */ + const ProviderUpdateRevocationPayloadType: (f0: ProviderUpdateRevocationPayload) => TransactionPayload.ProviderUpdateRevocationPayloadType; + /** + * A wrapper for a Coinbase payload + * + * @function + */ + interface CoinbasePayloadType extends TransactionPayload { + [0]: CoinbasePayload; + } + /** @ignore */ + const CoinbasePayloadType: (f0: CoinbasePayload) => TransactionPayload.CoinbasePayloadType; + /** + * A wrapper for a Quorum Commitment payload + * + * @function + */ + interface QuorumCommitmentPayloadType extends TransactionPayload { + [0]: QuorumCommitmentPayload; + } + /** @ignore */ + const QuorumCommitmentPayloadType: (f0: QuorumCommitmentPayload) => TransactionPayload.QuorumCommitmentPayloadType; + /** + * A wrapper for an Asset Lock payload + * + * @function + */ + interface AssetLockPayloadType extends TransactionPayload { + [0]: AssetLockPayload; + } + /** @ignore */ + const AssetLockPayloadType: (f0: AssetLockPayload) => TransactionPayload.AssetLockPayloadType; + /** + * A wrapper for an Asset Unlock payload + * + * @function + */ + interface AssetUnlockPayloadType extends TransactionPayload { + [0]: AssetUnlockPayload; + } + /** @ignore */ + const AssetUnlockPayloadType: (f0: AssetUnlockPayload) => TransactionPayload.AssetUnlockPayloadType; +} + +/** + * The transaction type. Special transactions were introduced in DIP2. + * Compared to Bitcoin the version field is split into two 16 bit integers. + * The first part for the version and the second part for the transaction + * type. + * + * repr u16 + */ +/** @ignore */ +export abstract class TransactionType { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TransactionType): void; + /** @ignore */ + static decode(bc: BinCode): TransactionType; + /** @ignore @internal */ + [VARIANTS]: typeof TransactionType.variants; + /** @ignore */ + static variants: { + Classic: typeof TransactionType.Classic, + ProviderRegistration: typeof TransactionType.ProviderRegistration, + ProviderUpdateService: typeof TransactionType.ProviderUpdateService, + ProviderUpdateRegistrar: typeof TransactionType.ProviderUpdateRegistrar, + ProviderUpdateRevocation: typeof TransactionType.ProviderUpdateRevocation, + Coinbase: typeof TransactionType.Coinbase, + QuorumCommitment: typeof TransactionType.QuorumCommitment, + AssetLock: typeof TransactionType.AssetLock, + AssetUnlock: typeof TransactionType.AssetUnlock, + }; +} +namespace TransactionType { + /** A Classic transaction */ + const Classic: () => TransactionType; + /** A Masternode Registration Transaction */ + const ProviderRegistration: () => TransactionType; + /** A Masternode Update Service Transaction, used by the operator to signal changes to service */ + const ProviderUpdateService: () => TransactionType; + /** A Masternode Update Registrar Transaction, used by the owner to signal base changes */ + const ProviderUpdateRegistrar: () => TransactionType; + /** A Masternode Update Revocation Transaction, used by the operator to signal termination of service */ + const ProviderUpdateRevocation: () => TransactionType; + /** A Coinbase Transaction, contained as the first transaction in each block */ + const Coinbase: () => TransactionType; + /** A Quorum Commitment Transaction, used to save quorum information to the state */ + const QuorumCommitment: () => TransactionType; + /** An Asset Lock Transaction, used to transfer credits to Dash Platform, by locking them until withdrawals occur */ + const AssetLock: () => TransactionType; + /** An Asset Unlock Transaction, used to withdraw credits from Dash Platform, by unlocking them */ + const AssetUnlock: () => TransactionType; +} + +/** A transaction output, which defines new coins to be created from old ones. */ +interface TxOut { + /** The value of the output, in satoshis. */ + value: bigint; + /** The script which must be satisfied for the output to be spent. */ + script_pubkey: ScriptBuf; +} +/** @ignore */ +const TxOut : BinCodeable & ((data: { + /** The value of the output, in satoshis. */ + value: bigint, + /** The script which must be satisfied for the output to be spent. */ + script_pubkey: ScriptBuf, +}) => TxOut); + +/** A dash transaction hash/transaction ID. */ +interface Txid { + [0]: Hash; +} +/** @ignore */ +const Txid : BinCodeable & (( + f0: Hash, +) => Txid); + +export type UserFeeIncrease = number; + +export type ValueMap = [Value, Value][]; + +/** @ignore */ +export abstract class Vote { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: Vote): void; + /** @ignore */ + static decode(bc: BinCode): Vote; + /** @ignore @internal */ + [VARIANTS]: typeof Vote.variants; + /** @ignore */ + static variants: { + ResourceVote: typeof Vote.ResourceVote, + }; +} +namespace Vote { + /** @function */ + interface ResourceVote extends Vote { + [0]: ResourceVote; + } + /** @ignore */ + const ResourceVote: (f0: ResourceVote) => Vote.ResourceVote; +} + +/** @ignore */ +export abstract class VotePoll { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: VotePoll): void; + /** @ignore */ + static decode(bc: BinCode): VotePoll; + /** @ignore @internal */ + [VARIANTS]: typeof VotePoll.variants; + /** @ignore */ + static variants: { + ContestedDocumentResourceVotePoll: typeof VotePoll.ContestedDocumentResourceVotePoll, + }; +} +namespace VotePoll { + /** @function */ + interface ContestedDocumentResourceVotePoll extends VotePoll { + [0]: ContestedDocumentResourceVotePoll; + } + /** @ignore */ + const ContestedDocumentResourceVotePoll: (f0: ContestedDocumentResourceVotePoll) => VotePoll.ContestedDocumentResourceVotePoll; +} + + +} diff --git a/1.8.1/generated_bincode.js b/1.8.1/generated_bincode.js new file mode 100644 index 0000000..83e41b1 --- /dev/null +++ b/1.8.1/generated_bincode.js @@ -0,0 +1,1681 @@ +import { + Bool, Bytes, Enum, VariantDiscriminant, FixedBytes, Lazy, Struct, StructTuple, + Int128, Int16, Int32, Int64, Int8, Uint128, Uint16, Uint32, Uint64, Uint8, Float64, + VarInt, VarUint, Vec, Tuple, Map, Option, String, Nothing, Range, NotSignable, + SocketAddr, DISCRIMINANT, VARIANT, ENUM, +} from "../src/bincode.ts" +import { Transaction } from "../src/bincode_types.ts"; +export const Hash = Bytes; //FixedBytes(32) + +/** @type {*} */ +export const Value = Lazy("Value", () => REAL_Value); + +// !ENCODE +/** + * An Asset Unlock Base payload. This is the base payload of the Asset Unlock. In order to make + * it a full payload the request info should be added. + */ +export const AssetUnlockBasePayload = Struct("AssetUnlockBasePayload", { + /** The payload protocol version, is currently expected to be 0. */ + version: Uint8, + /** The index of the unlock transaction. It gets bumped on each transaction */ + index: VarUint, + /** The fee used in Duffs (Satoshis) */ + fee: VarUint, +}); + +// !ENCODE +/** + * A BLS Public key is 48 bytes in the scheme used for Dash Core + * attr since (1.48) , derive (PartialEq , Eq , Ord , PartialOrd , Hash) + */ +export const BLSPublicKey = StructTuple("BLSPublicKey", + FixedBytes(48), +); + +// !ENCODE +/** + * A BLS Signature is 96 bytes in the scheme used for Dash Core + * attr since (1.48) , derive (PartialEq , Eq , Ord , PartialOrd , Hash) + */ +export const BLSSignature = StructTuple("BLSSignature", + FixedBytes(96), +); + +export const BinaryData = StructTuple("BinaryData", + Bytes, +); + +// !ENCODE +/** A dash block hash. */ +export const BlockHash = StructTuple("BlockHash", + Hash, +); + +export const Credits = VarUint + +export const DefinitionName = String + +export const DocumentName = String + +export const Hash256 = FixedBytes(32) + +export const IdentifierBytes32 = StructTuple("IdentifierBytes32", + FixedBytes(32), +); + +export const IdentityNonce = VarUint + +// !ENCODE +/** A hash of all transaction inputs */ +export const InputsHash = StructTuple("InputsHash", + Hash, +); + +export const KeyID = VarUint + +/** + * allow non_camel_case_types + * repr u8 + */ +export const KeyType = Enum("KeyType", /** @type {const} */ ({ + /** default */ + ECDSA_SECP256K1: [], + BLS12_381: [], + ECDSA_HASH160: [], + BIP13_SCRIPT_HASH: [], + EDDSA_25519_HASH160: [], +})) + +// !ENCODE +export const LLMQType = Enum("LLMQType", /** @type {const} */ ({ + LlmqtypeUnknown: [], + Llmqtype50_60: [], + Llmqtype400_60: [], + Llmqtype400_85: [], + Llmqtype100_67: [], + Llmqtype60_75: [], + Llmqtype25_67: [], + LlmqtypeTest: VariantDiscriminant([], 100), + LlmqtypeDevnet: VariantDiscriminant([], 101), + LlmqtypeTestV17: VariantDiscriminant([], 102), + LlmqtypeTestDIP0024: VariantDiscriminant([], 103), + LlmqtypeTestInstantSend: VariantDiscriminant([], 104), + LlmqtypeDevnetDIP0024: VariantDiscriminant([], 105), + LlmqtypeTestnetPlatform: VariantDiscriminant([], 106), + LlmqtypeDevnetPlatform: VariantDiscriminant([], 107), +})) + +// !ENCODE +/** + * Dash Additions + * + * The merkle root of the masternode list + * hash_newtype forward + */ +export const MerkleRootMasternodeList = StructTuple("MerkleRootMasternodeList", + Hash, +); + +// !ENCODE +/** + * The merkle root of the quorums + * hash_newtype forward + */ +export const MerkleRootQuorums = StructTuple("MerkleRootQuorums", + Hash, +); + +/** repr u8 */ +export const Pooling = Enum("Pooling", /** @type {const} */ ({ + /** default */ + Never: [], + IfAvailable: [], + Standard: [], +})) + +// !ENCODE +export const ProviderMasternodeType = Enum("ProviderMasternodeType", /** @type {const} */ ({ + Regular: [], + HighPerformance: [], +})) + +// !ENCODE +/** A hash of a public key. */ +export const PubkeyHash = StructTuple("PubkeyHash", + Hash, +); + +/** repr u8 */ +export const Purpose = Enum("Purpose", /** @type {const} */ ({ + /** + * at least one authentication key must be registered for all security levels + * default + */ + AUTHENTICATION: [], + /** this key cannot be used for signing documents */ + ENCRYPTION: [], + /** this key cannot be used for signing documents */ + DECRYPTION: [], + /** this key is used to sign credit transfer and withdrawal state transitions */ + TRANSFER: [], + /** this key cannot be used for signing documents */ + SYSTEM: [], + /** this key cannot be used for signing documents */ + VOTING: [], + /** this key is used to prove ownership of a masternode or evonode */ + OWNER: [], +})) + +export const QuorumHash = BlockHash + +// !ENCODE +/** A hash of a quorum verification vector */ +export const QuorumVVecHash = StructTuple("QuorumVVecHash", + Hash, +); + +// !ENCODE +/** "Raw" instant lock for serialization */ +export const RawInstantLockProof = Struct("RawInstantLockProof", { + instant_lock: BinaryData, + transaction: BinaryData, + output_index: VarUint, +}); + +export const Revision = VarUint + +// !ENCODE +/** + * An owned, growable script. + * + * `ScriptBuf` is the most common script type that has the ownership over the contents of the + * script. It has a close relationship with its borrowed counterpart, [`Script`]. + * + * Just as other similar types, this implements [`Deref`], so [deref coercions] apply. Also note + * that all the safety/validity restrictions that apply to [`Script`] apply to `ScriptBuf` as well. + * + * [deref coercions]: https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion + */ +export const ScriptBuf = StructTuple("ScriptBuf", + Bytes, +); + +/** repr u8 */ +export const SecurityLevel = Enum("SecurityLevel", /** @type {const} */ ({ + MASTER: [], + CRITICAL: [], + /** default */ + HIGH: [], + MEDIUM: [], +})) + +/** + * The Storage Key requirements + * repr u8 + */ +export const StorageKeyRequirements = Enum("StorageKeyRequirements", /** @type {const} */ ({ + Unique: [], + Multiple: [], + MultipleReferenceToLatest: [], +})) + +export const TimestampMillis = VarUint + +// !ENCODE +/** + * The transaction type. Special transactions were introduced in DIP2. + * Compared to Bitcoin the version field is split into two 16 bit integers. + * The first part for the version and the second part for the transaction + * type. + * + * repr u16 + */ +export const TransactionType = Enum("TransactionType", /** @type {const} */ ({ + /** A Classic transaction */ + Classic: [], + /** A Masternode Registration Transaction */ + ProviderRegistration: [], + /** A Masternode Update Service Transaction, used by the operator to signal changes to service */ + ProviderUpdateService: [], + /** A Masternode Update Registrar Transaction, used by the owner to signal base changes */ + ProviderUpdateRegistrar: [], + /** A Masternode Update Revocation Transaction, used by the operator to signal termination of service */ + ProviderUpdateRevocation: [], + /** A Coinbase Transaction, contained as the first transaction in each block */ + Coinbase: [], + /** A Quorum Commitment Transaction, used to save quorum information to the state */ + QuorumCommitment: [], + /** An Asset Lock Transaction, used to transfer credits to Dash Platform, by locking them until withdrawals occur */ + AssetLock: VariantDiscriminant([], 8), + /** An Asset Unlock Transaction, used to withdraw credits from Dash Platform, by unlocking them */ + AssetUnlock: VariantDiscriminant([], 9), +})) + +// !ENCODE +/** A transaction output, which defines new coins to be created from old ones. */ +export const TxOut = Struct("TxOut", { + /** The value of the output, in satoshis. */ + value: VarUint, + /** The script which must be satisfied for the output to be spent. */ + script_pubkey: ScriptBuf, +}); + +// !ENCODE +/** A dash transaction hash/transaction ID. */ +export const Txid = StructTuple("Txid", + Hash, +); + +export const UserFeeIncrease = VarUint + +export const ValueMap = Vec(Tuple(Value, Value)) + +// !ENCODE +/** + * An Asset Lock payload. This is contained as the payload of an asset lock special transaction. + * The Asset Lock Special transaction and this payload is described in the Asset Lock DIP2X + * (todo:update this). + * An Asset Lock can fund multiple Identity registrations or top ups. + * The Asset Lock payload credit outputs field contains a vector of TxOuts. + * Each TxOut refers to a funding of an Identity. + */ +export const AssetLockPayload = Struct("AssetLockPayload", { + version: Uint8, + credit_outputs: Vec(TxOut), +}); + +// !ENCODE +/** + * An asset unlock request info + * This is the information about the signing quorum + * The request height should be the height at which the specified quorum is active on core. + */ +export const AssetUnlockRequestInfo = Struct("AssetUnlockRequestInfo", { + /** + * The core request height of the transaction. This should match a period where the quorum_hash + * is still active + */ + request_height: VarUint, + /** The quorum hash. This is the block hash when the quorum was created. */ + quorum_hash: QuorumHash, +}); + +// !ENCODE +/** + * A Coinbase payload. This is contained as the payload of a coinbase special transaction. + * The Coinbase payload is described in DIP4. + */ +export const CoinbasePayload = Struct("CoinbasePayload", { + version: VarUint, + height: VarUint, + merkle_root_masternode_list: MerkleRootMasternodeList, + merkle_root_quorums: MerkleRootQuorums, + best_cl_height: Option(VarUint), + best_cl_signature: Option(BLSSignature), + asset_locked_amount: Option(VarUint), +}); + +export const DashcoreScript = ScriptBuf + +export const DataContractConfigV0 = Struct("DataContractConfigV0", { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: Bool, + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: Bool, + /** Does the contract keep history when the contract itself changes */ + keeps_history: Bool, + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: Bool, + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: Bool, + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: Bool, + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: Option(StorageKeyRequirements), + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: Option(StorageKeyRequirements), +}); + +export const Identifier = StructTuple("Identifier", + IdentifierBytes32, +); + +/** platform_serialize unversioned */ +export const IdentityCreditTransferTransitionV0 = Struct("IdentityCreditTransferTransitionV0", { + identity_id: Identifier, + recipient_id: Identifier, + amount: VarUint, + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +export const InstantAssetLockProof = RawInstantLockProof + +// !ENCODE +/** A reference to a transaction output. */ +export const OutPoint = Struct("OutPoint", { + /** The referenced transaction's txid. */ + txid: Txid, + /** The index of the referenced output in its transaction's vout. */ + vout: VarUint, +}); + +// !ENCODE +/** + * A Provider Registration Payload used in a Provider Registration Special Transaction. + * This is used to register a Masternode on the network. + * The current version is 0. + * Interesting Fields: + * *Provider type refers to the type of Masternode. Currently only valid value is 0. + * *Provider mode refers to the mode of the Masternode. Currently only valid value is 0. + * *The collateral outpoint links to a transaction with a 1000 Dash unspent (at registration) + * outpoint. + * *The operator reward defines the ratio when divided by 10000 of the amount going to the operator. + * The max value for the operator reward is 10000. + * *The script payout is the script to which one wants to have the masternode pay out. + * *The inputs hash is used to guarantee the uniqueness of the payload sig. + */ +export const ProviderRegistrationPayload = Struct("ProviderRegistrationPayload", { + version: VarUint, + masternode_type: ProviderMasternodeType, + masternode_mode: VarUint, + collateral_outpoint: OutPoint, + service_address: SocketAddr, + owner_key_hash: PubkeyHash, + operator_public_key: BLSPublicKey, + voting_key_hash: PubkeyHash, + operator_reward: VarUint, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + signature: Bytes, + platform_node_id: Option(PubkeyHash), + platform_p2p_port: Option(VarUint), + platform_http_port: Option(VarUint), +}); + +// !ENCODE +/** + * A Provider Update Registrar Payload used in a Provider Update Registrar Special Transaction. + * This is used to update the base aspects a Masternode on the network. + * It must be signed by the owner's key that was set at registration. + */ +export const ProviderUpdateRegistrarPayload = Struct("ProviderUpdateRegistrarPayload", { + version: VarUint, + pro_tx_hash: Txid, + provider_mode: VarUint, + operator_public_key: BLSPublicKey, + voting_key_hash: PubkeyHash, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + payload_sig: Bytes, +}); + +// !ENCODE +/** + * A Provider Update Revocation Payload used in a Provider Update Revocation Special Transaction. + * This is used to signal and stop a Masternode from the operator. + * It must be signed by the operator's key that was set at registration or registrar update. + */ +export const ProviderUpdateRevocationPayload = Struct("ProviderUpdateRevocationPayload", { + version: VarUint, + pro_tx_hash: Txid, + reason: VarUint, + inputs_hash: InputsHash, + payload_sig: BLSSignature, +}); + +// !ENCODE +/** + * A Provider Update Service Payload used in a Provider Update Service Special Transaction. + * This is used to update the operational aspects a Masternode on the network. + * It must be signed by the operator's key that was set either at registration or by the last + * registrar update of the masternode. + */ +export const ProviderUpdateServicePayload = Struct("ProviderUpdateServicePayload", { + version: VarUint, + pro_tx_hash: Txid, + ip_address: VarUint, + port: VarUint, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + payload_sig: BLSSignature, +}); + +// !ENCODE +/** + * A Quorum Finalization Commitment. It is described in the finalization section of DIP6: + * [dip-0006.md#6-finalization-phase](https://github.com/dashpay/dips/blob/master/dip-0006.md#6-finalization-phase) + */ +export const QuorumEntry = Struct("QuorumEntry", { + version: VarUint, + llmq_type: LLMQType, + quorum_hash: QuorumHash, + quorum_index: Option(VarInt), + signers: Vec(Bool), + valid_members: Vec(Bool), + quorum_public_key: BLSPublicKey, + quorum_vvec_hash: QuorumVVecHash, + threshold_sig: BLSSignature, + all_commitment_aggregated_signature: BLSSignature, +}); + +/** + * A representation of a dynamic value that can handled dynamically + * non_exhaustive + */ +export const REAL_Value = Enum("Value", /** @type {const} */ ({ + /** A u128 integer */ + U128: [VarUint], + /** A i128 integer */ + I128: [VarInt], + /** A u64 integer */ + U64: [VarUint], + /** A i64 integer */ + I64: [VarInt], + /** A u32 integer */ + U32: [VarUint], + /** A i32 integer */ + I32: [VarInt], + /** A u16 integer */ + U16: [VarUint], + /** A i16 integer */ + I16: [VarInt], + /** A u8 integer */ + U8: [Uint8], + /** A i8 integer */ + I8: [Int8], + /** Bytes */ + Bytes: [Bytes], + /** Bytes 20 */ + Bytes20: [FixedBytes(20)], + /** Bytes 32 */ + Bytes32: [FixedBytes(32)], + /** Bytes 36 : Useful for outpoints */ + Bytes36: [FixedBytes(36)], + /** An enumeration of u8 */ + EnumU8: [Bytes], + /** An enumeration of strings */ + EnumString: [Vec(String)], + /** + * Identifier + * The identifier is very similar to bytes, however it is serialized to Base58 when converted + * to a JSON Value + */ + Identifier: [Hash256], + /** A float */ + Float: [Float64], + /** A string */ + Text: [String], + /** A boolean */ + Bool: [Bool], + /** Null */ + Null: [], + /** An array */ + Array: [Vec(Value)], + /** A map */ + Map: [ValueMap], +})) + +/** + * A resource votes is a votes determining what we should do with a contested resource. + * For example Alice and Bob both want the username "Malaka" + * Some would vote for Alice to get it by putting in her Identifier. + * Some would vote for Bob to get it by putting in Bob's Identifier. + * Let's say someone voted, but is now not quite sure of their votes, they can abstain. + * Lock is there to signal that the shared resource should be given to no one. + * In this case Malaka might have a bad connotation in Greek, hence some might votes to Lock + * the name. + */ +export const ResourceVoteChoice = Enum("ResourceVoteChoice", /** @type {const} */ ({ + TowardsIdentity: [Identifier], + /** default */ + Abstain: [], + Lock: [], +})) + +// !ENCODE +/** + * A Credit Withdrawal payload. This is contained as the payload of a credit withdrawal special + * transaction. + * The Credit Withdrawal Special transaction and this payload is described in the Asset Lock DIP2X + * (todo:update this). + * The Credit Withdrawal Payload is signed by a quorum. + * + * Transaction using it have no inputs. Hence the proof of validity lies solely on the BLS signature. + */ +export const AssetUnlockPayload = Struct("AssetUnlockPayload", { + /** + * The base information about the asset unlock. This base information is the information that + * should be put into a queue. + */ + base: AssetUnlockBasePayload, + /** + * The request information. This should be added to the unlock transaction as it is being sent + * to be signed. + */ + request_info: AssetUnlockRequestInfo, + /** The threshold signature. This should be returned by the consensus engine. */ + quorum_sig: BLSSignature, +}); + +// !ENCODE +/** + * Instant Asset Lock Proof is a part of Identity Create and Identity Topup + * transitions. It is a proof that specific output of dash is locked in credits + * pull and the transitions can mint credits and populate identity's balance. + * To prove that the output is locked, a height where transaction was chain locked is provided. + */ +export const ChainAssetLockProof = Struct("ChainAssetLockProof", { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: VarUint, + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: OutPoint, +}); + +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const ContestedDocumentResourceVotePoll = Struct("ContestedDocumentResourceVotePoll", { + contract_id: Identifier, + document_type_name: String, + index_name: String, + index_values: Vec(Value), +}); + +/** + * A contract bounds is the bounds that the key has influence on. + * For authentication keys the bounds mean that the keys can only be used to sign + * within the specified contract. + * For encryption decryption this tells clients to only use these keys for specific + * contracts. + * + * repr u8 + */ +export const ContractBounds = Enum("ContractBounds", /** @type {const} */ ({ + /** this key can only be used within a specific contract */ + SingleContract: { + id: Identifier, + }, + /** this key can only be used within a specific contract and for a specific document type */ + SingleContractDocumentType: { + id: Identifier, + document_type_name: String, + }, +})) + +// !ENCODE +export const CoreScript = StructTuple("CoreScript", + DashcoreScript, +); + +export const DataContractConfig = Enum("DataContractConfig", /** @type {const} */ ({ + V0: [DataContractConfigV0], +})) + +export const DataContractInSerializationFormatV0 = Struct("DataContractInSerializationFormatV0", { + /** A unique identifier for the data contract. */ + id: Identifier, + /** Internal configuration for the contract. */ + config: DataContractConfig, + /** The version of this data contract. */ + version: VarUint, + /** The identifier of the contract owner. */ + owner_id: Identifier, + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: Option(Map(DefinitionName, Value)), + /** Document JSON Schemas per type */ + document_schemas: Map(DocumentName, Value), +}); + +export const DocumentBaseTransitionV0 = Struct("DocumentBaseTransitionV0", { + /** The document ID */ + id: Identifier, + identity_contract_nonce: IdentityNonce, + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: String, + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier, +}); + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_credit_transfer_state_transition" + */ +export const IdentityCreditTransferTransition = Enum("IdentityCreditTransferTransition", /** @type {const} */ ({ + V0: [IdentityCreditTransferTransitionV0], +})) + +export const IdentityCreditWithdrawalTransitionV0 = Struct("IdentityCreditWithdrawalTransitionV0", { + identity_id: Identifier, + amount: VarUint, + core_fee_per_byte: VarUint, + pooling: Pooling, + output_script: CoreScript, + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +export const IdentityCreditWithdrawalTransitionV1 = Struct("IdentityCreditWithdrawalTransitionV1", { + identity_id: Identifier, + amount: VarUint, + core_fee_per_byte: VarUint, + pooling: Pooling, + /** If the send to output script is None, then we send the withdrawal to the address set by core */ + output_script: Option(CoreScript), + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +export const IdentityPublicKeyInCreationV0 = Struct("IdentityPublicKeyInCreationV0", { + id: KeyID, + key_type: KeyType, + purpose: Purpose, + security_level: SecurityLevel, + contract_bounds: Option(ContractBounds), + read_only: Bool, + data: BinaryData, + /** The signature is needed for ECDSA_SECP256K1 Key type and BLS12_381 Key type */ + signature: NotSignable(BinaryData), +}); + +export const IdentityPublicKeyV0 = Struct("IdentityPublicKeyV0", { + id: KeyID, + purpose: Purpose, + security_level: SecurityLevel, + contract_bounds: Option(ContractBounds), + key_type: KeyType, + read_only: Bool, + data: BinaryData, + disabled_at: Option(TimestampMillis), +}); + +// !ENCODE +/** + * A Quorum Commitment Payload used in a Quorum Commitment Special Transaction. + * This is used in the mining phase as described in DIP 6: + * [dip-0006.md#7-mining-phase](https://github.com/dashpay/dips/blob/master/dip-0006.md#7-mining-phase). + * + * Miners take the best final commitment for a DKG session and mine it into a block. + */ +export const QuorumCommitmentPayload = Struct("QuorumCommitmentPayload", { + version: VarUint, + height: VarUint, + finalization_commitment: QuorumEntry, +}); + +// !ENCODE +/** + * An enum wrapper around various special transaction payloads. + * Special transactions are defined in DIP 2. + */ +export const TransactionPayload = Enum("TransactionPayload", /** @type {const} */ ({ + /** A wrapper for a Masternode Registration payload */ + ProviderRegistrationPayloadType: [ProviderRegistrationPayload], + /** A wrapper for a Masternode Update Service payload */ + ProviderUpdateServicePayloadType: [ProviderUpdateServicePayload], + /** A wrapper for a Masternode Update Registrar payload */ + ProviderUpdateRegistrarPayloadType: [ProviderUpdateRegistrarPayload], + /** A wrapper for a Masternode Update Revocation payload */ + ProviderUpdateRevocationPayloadType: [ProviderUpdateRevocationPayload], + /** A wrapper for a Coinbase payload */ + CoinbasePayloadType: [CoinbasePayload], + /** A wrapper for a Quorum Commitment payload */ + QuorumCommitmentPayloadType: [QuorumCommitmentPayload], + /** A wrapper for an Asset Lock payload */ + AssetLockPayloadType: [AssetLockPayload], + /** A wrapper for an Asset Unlock payload */ + AssetUnlockPayloadType: [AssetUnlockPayload], +})) + +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const VotePoll = Enum("VotePoll", /** @type {const} */ ({ + ContestedDocumentResourceVotePoll: [ContestedDocumentResourceVotePoll], +})) + +export const AssetLockProof = Enum("AssetLockProof", /** @type {const} */ ({ + Instant: [InstantAssetLockProof], + Chain: [ChainAssetLockProof], +})) + +export const DataContractInSerializationFormat = Enum("DataContractInSerializationFormat", /** @type {const} */ ({ + V0: [DataContractInSerializationFormatV0], +})) + +export const DataContractUpdateTransitionV0 = Struct("DataContractUpdateTransitionV0", { + identity_contract_nonce: IdentityNonce, + data_contract: DataContractInSerializationFormat, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +export const DocumentBaseTransition = Enum("DocumentBaseTransition", /** @type {const} */ ({ + V0: [DocumentBaseTransitionV0], +})) + +export const DocumentCreateTransitionV0 = Struct("DocumentCreateTransitionV0", { + /** Document Base Transition */ + base: DocumentBaseTransition, + /** Entropy used to create a Document ID. */ + entropy: FixedBytes(32), + data: Map(String, Value), + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance: Option(Tuple(String, Credits)), +}); + +export const DocumentDeleteTransitionV0 = Struct("DocumentDeleteTransitionV0", { + base: DocumentBaseTransition, +}); + +export const DocumentPurchaseTransitionV0 = Struct("DocumentPurchaseTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + price: Credits, +}); + +export const DocumentReplaceTransitionV0 = Struct("DocumentReplaceTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + data: Map(String, Value), +}); + +export const DocumentTransferTransitionV0 = Struct("DocumentTransferTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + recipient_owner_id: Identifier, +}); + +export const DocumentUpdatePriceTransitionV0 = Struct("DocumentUpdatePriceTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + price: Credits, +}); + +/** + * platform_serialize unversioned + * platform_version_path "dpp.state_transition_serialization_versions.identity_credit_withdrawal_state_transition" + */ +export const IdentityCreditWithdrawalTransition = Enum("IdentityCreditWithdrawalTransition", /** @type {const} */ ({ + V0: [IdentityCreditWithdrawalTransitionV0], + V1: [IdentityCreditWithdrawalTransitionV1], +})) + +/** platform_serialize limit = 2000 , unversioned */ +export const IdentityPublicKey = Enum("IdentityPublicKey", /** @type {const} */ ({ + V0: [IdentityPublicKeyV0], +})) + +export const IdentityPublicKeyInCreation = Enum("IdentityPublicKeyInCreation", /** @type {const} */ ({ + V0: [IdentityPublicKeyInCreationV0], +})) + +export const IdentityTopUpTransitionV0 = Struct("IdentityTopUpTransitionV0", { + asset_lock_proof: AssetLockProof, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + signature: NotSignable(BinaryData), +}); + +export const IdentityUpdateTransitionV0 = Struct("IdentityUpdateTransitionV0", { + /** Unique identifier of the identity to be updated */ + identity_id: Identifier, + /** The revision of the identity after update */ + revision: Revision, + /** Identity nonce for this transition to prevent replay attacks */ + nonce: IdentityNonce, + /** + * Public Keys to add to the Identity + * we want to skip serialization of transitions, as we does it manually in `to_object()` and `to_json()` + */ + add_public_keys: Vec(IdentityPublicKeyInCreation), + /** Identity Public Keys ID's to disable for the Identity */ + disable_public_keys: Vec(KeyID), + /** The fee multiplier */ + user_fee_increase: UserFeeIncrease, + /** The ID of the public key used to sing the State Transition */ + signature_public_key_id: NotSignable(KeyID), + /** Cryptographic signature of the State Transition */ + signature: NotSignable(BinaryData), +}); + +/** platform_serialize unversioned */ +export const ResourceVoteV0 = Struct("ResourceVoteV0", { + vote_poll: VotePoll, + resource_vote_choice: ResourceVoteChoice, +}); + +/** DataContractCreateTransitionV0 has the same encoding structure */ +export const DataContractCreateTransitionV0 = Struct("DataContractCreateTransitionV0", { + data_contract: DataContractInSerializationFormat, + identity_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_update_state_transition" + */ +export const DataContractUpdateTransition = Enum("DataContractUpdateTransition", /** @type {const} */ ({ + V0: [DataContractUpdateTransitionV0], +})) + +export const DocumentCreateTransition = Enum("DocumentCreateTransition", /** @type {const} */ ({ + V0: [DocumentCreateTransitionV0], +})) + +export const DocumentDeleteTransition = Enum("DocumentDeleteTransition", /** @type {const} */ ({ + V0: [DocumentDeleteTransitionV0], +})) + +export const DocumentPurchaseTransition = Enum("DocumentPurchaseTransition", /** @type {const} */ ({ + V0: [DocumentPurchaseTransitionV0], +})) + +export const DocumentReplaceTransition = Enum("DocumentReplaceTransition", /** @type {const} */ ({ + V0: [DocumentReplaceTransitionV0], +})) + +export const DocumentTransferTransition = Enum("DocumentTransferTransition", /** @type {const} */ ({ + V0: [DocumentTransferTransitionV0], +})) + +export const DocumentUpdatePriceTransition = Enum("DocumentUpdatePriceTransition", /** @type {const} */ ({ + V0: [DocumentUpdatePriceTransitionV0], +})) + +export const IdentityCreateTransitionV0 = Struct("IdentityCreateTransitionV0", { + public_keys: Vec(IdentityPublicKeyInCreation), + asset_lock_proof: AssetLockProof, + user_fee_increase: UserFeeIncrease, + signature: NotSignable(BinaryData), + identity_id: NotSignable(Identifier), +}); + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_top_up_state_transition" + */ +export const IdentityTopUpTransition = Enum("IdentityTopUpTransition", /** @type {const} */ ({ + V0: [IdentityTopUpTransitionV0], +})) + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_update_state_transition" + */ +export const IdentityUpdateTransition = Enum("IdentityUpdateTransition", /** @type {const} */ ({ + V0: [IdentityUpdateTransitionV0], +})) + +/** platform_serialize limit = 15000 , unversioned */ +export const ResourceVote = Enum("ResourceVote", /** @type {const} */ ({ + V0: [ResourceVoteV0], +})) + +/** platform_serialize limit = 15000 , unversioned */ +export const Vote = Enum("Vote", /** @type {const} */ ({ + ResourceVote: [ResourceVote], +})) + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_create_state_transition" + */ +export const DataContractCreateTransition = Enum("DataContractCreateTransition", /** @type {const} */ ({ + V0: [DataContractCreateTransitionV0], +})) + +export const DocumentTransition = Enum("DocumentTransition", /** @type {const} */ ({ + Create: [DocumentCreateTransition], + Replace: [DocumentReplaceTransition], + Delete: [DocumentDeleteTransition], + Transfer: [DocumentTransferTransition], + UpdatePrice: [DocumentUpdatePriceTransition], + Purchase: [DocumentPurchaseTransition], +})) + +export const DocumentsBatchTransitionV0 = Struct("DocumentsBatchTransitionV0", { + owner_id: Identifier, + transitions: Vec(DocumentTransition), + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_create_state_transition" + */ +export const IdentityCreateTransition = Enum("IdentityCreateTransition", /** @type {const} */ ({ + V0: [IdentityCreateTransitionV0], +})) + +/** platform_serialize unversioned */ +export const MasternodeVoteTransitionV0 = Struct("MasternodeVoteTransitionV0", { + pro_tx_hash: Identifier, + voter_identity_id: Identifier, + vote: Vote, + nonce: IdentityNonce, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.documents_batch_state_transition" + */ +export const DocumentsBatchTransition = Enum("DocumentsBatchTransition", /** @type {const} */ ({ + V0: [DocumentsBatchTransitionV0], +})) + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.masternode_vote_state_transition" + */ +export const MasternodeVoteTransition = Enum("MasternodeVoteTransition", /** @type {const} */ ({ + V0: [MasternodeVoteTransitionV0], +})) + +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const StateTransition = Enum("StateTransition", /** @type {const} */ ({ + DataContractCreate: [DataContractCreateTransition], + DataContractUpdate: [DataContractUpdateTransition], + DocumentsBatch: [DocumentsBatchTransition], + IdentityCreate: [IdentityCreateTransition], + IdentityTopUp: [IdentityTopUpTransition], + IdentityCreditWithdrawal: [IdentityCreditWithdrawalTransition], + IdentityUpdate: [IdentityUpdateTransition], + IdentityCreditTransfer: [IdentityCreditTransferTransition], + MasternodeVote: [MasternodeVoteTransition], +})) + +// NOT NEEDED: AddOperation +// NOT NEEDED: AddrV2 +// NOT NEEDED: AddrV2Message +// NOT NEEDED: DUPLICATE_Address +// NOT NEEDED: AddressEncoding +// NOT NEEDED: AddressInner +// NOT NEEDED: AddressType +// NOT NEEDED: All +// NOT NEEDED: Amount +// NOT NEEDED: Annex +// NOT NEEDED: ArrayDeserializer +// NOT NEEDED: ArrayItemType +// NOT NEEDED: AssetLockOutputNotFoundError +// NOT NEEDED: AssetLockProofType +// NOT NEEDED: AssetLockTransactionIsNotFoundError +// NOT NEEDED: AssetLockValue +// NOT NEEDED: AssetLockValueV0 +// NOT NEEDED: AssetUnlockBaseTransactionInfo +// NOT NEEDED: BalanceChange +// NOT NEEDED: BalanceChangeForIdentity +// NOT NEEDED: BalanceIsNotEnoughError +// NOT NEEDED: BasicBLSError +// NOT NEEDED: BasicECDSAError +// NOT NEEDED: BasicError +// NOT NEEDED: BinVisitor +// NOT NEEDED: BinWriter +// NOT NEEDED: Bip34Error +// NOT NEEDED: BitStreamReader +// NOT NEEDED: BitStreamWriter +// NOT NEEDED: Block +// NOT NEEDED: BlockFilter +// NOT NEEDED: BlockFilterReader +// NOT NEEDED: BlockFilterWriter +// NOT NEEDED: BlockHeight +// NOT NEEDED: BlockInfo +// NOT NEEDED: BlockTransactions +// NOT NEEDED: BlockTransactionsRequest +// NOT NEEDED: BlockTxn +// NOT NEEDED: BloomFlags +// NOT NEEDED: BorrowedPair +// NOT NEEDED: Builder +// NOT NEEDED: ByteArrayKeyword +// NOT NEEDED: ByteArrayPropertySizes +// NOT NEEDED: Bytes +// NOT NEEDED: Bytes20 +// NOT NEEDED: Bytes32 +// NOT NEEDED: Bytes36 +// NOT NEEDED: BytesPerEpoch +// NOT NEEDED: BytesPerEpochByIdentifier +// NOT NEEDED: CFCheckpt +// NOT NEEDED: CFHeaders +// NOT NEEDED: CFilter +// NOT NEEDED: CachedEpochIndexFeeVersions +// NOT NEEDED: CachedEpochIndexFeeVersionsFieldsBeforeVersion4 +// NOT NEEDED: CborCanonicalMap +// NOT NEEDED: ChainCode +// NOT NEEDED: ChainHash +// NOT NEEDED: ChainLock +// NOT NEEDED: CheckedData +// NOT NEEDED: ChildNumber +// NOT NEEDED: Class +// NOT NEEDED: ClassifyContext +// NOT NEEDED: ClientDataRetrievalError +// NOT NEEDED: CmpctBlock +// NOT NEEDED: CommandString +// NOT NEEDED: CommandStringError +// NOT NEEDED: CommonCache +// NOT NEEDED: CompactTarget +// NOT NEEDED: CompatibleProtocolVersionIsNotDefinedError +// NOT NEEDED: ConfirmedHash +// NOT NEEDED: ConfirmedHashHashedWithProRegTx +// NOT NEEDED: ConsensusError +// NOT NEEDED: ConsensusValidationResult +// NOT NEEDED: Contender +// NOT NEEDED: ContenderV0 +// NOT NEEDED: ContenderWithSerializedDocument +// NOT NEEDED: ContenderWithSerializedDocumentV0 +// NOT NEEDED: ContestedDocumentVotePollStatus +// NOT NEEDED: ContestedDocumentVotePollStoredInfo +// NOT NEEDED: ContestedDocumentVotePollStoredInfoV0 +// NOT NEEDED: ContestedDocumentVotePollStoredInfoVoteEventV0 +// NOT NEEDED: ContestedDocumentVotePollWinnerInfo +// NOT NEEDED: ContestedDocumentsTemporarilyNotAllowedError +// NOT NEEDED: ContestedIndexFieldMatch +// NOT NEEDED: ContestedIndexInformation +// NOT NEEDED: ContestedIndexResolution +// NOT NEEDED: ContestedUniqueIndexOnMutableDocumentTypeError +// NOT NEEDED: ContestedUniqueIndexWithUniqueIndexError +// NOT NEEDED: ContractBoundsType +// NOT NEEDED: ControlBlock +// NOT NEEDED: ConversionError +// NOT NEEDED: CopyOperation +// NOT NEEDED: DUPLICATE_CoreBlockHeight +// NOT NEEDED: CreatedDataContract +// NOT NEEDED: CreatedDataContractInSerializationFormat +// NOT NEEDED: CreatedDataContractInSerializationFormatV0 +// NOT NEEDED: CreatedDataContractV0 +// NOT NEEDED: CreationRestrictionMode +// NOT NEEDED: CreditsPerEpoch +// NOT NEEDED: CreditsPerEpochByIdentifier +// NOT NEEDED: CycleHash +// NOT NEEDED: DKGParams +// NOT NEEDED: DPPError +// NOT NEEDED: DUPLICATE_DashPlatformProtocol +// NOT NEEDED: DashPlatformProtocolInitError +// NOT NEEDED: DataBuilder +// NOT NEEDED: DataContract +// NOT NEEDED: DataContractAlreadyPresentError +// NOT NEEDED: DataContractBoundsNotPresentError +// NOT NEEDED: DataContractConfigUpdateError +// NOT NEEDED: DataContractCreateTransitionLatest +// NOT NEEDED: DataContractError +// NOT NEEDED: DataContractFacade +// NOT NEEDED: DataContractFactory +// NOT NEEDED: DataContractFactoryV0 +// NOT NEEDED: DataContractHaveNewUniqueIndexError +// NOT NEEDED: DataContractImmutablePropertiesUpdateError +// NOT NEEDED: DataContractInvalidIndexDefinitionUpdateError +// NOT NEEDED: DataContractIsReadonlyError +// NOT NEEDED: DataContractMaxDepthExceedError +// NOT NEEDED: DUPLICATE_DataContractNotPresentError +// NOT NEEDED: DataContractUniqueIndicesChangedError +// NOT NEEDED: DataContractUpdatePermissionError +// NOT NEEDED: DataContractUpdateTransitionLatest +// NOT NEEDED: DataContractV0 +// NOT NEEDED: DataTriggerConditionError +// NOT NEEDED: DataTriggerError +// NOT NEEDED: DataTriggerExecutionError +// NOT NEEDED: DataTriggerInvalidResultError +// NOT NEEDED: DUPLICATE_DecodeError +// NOT NEEDED: DecodeInitError +// NOT NEEDED: DecodeProtocolIdentity +// NOT NEEDED: Decoder +// NOT NEEDED: DecodingError +// NOT NEEDED: DefaultEntropyGenerator +// NOT NEEDED: DeletedQuorum +// NOT NEEDED: Denomination +// NOT NEEDED: DerivationPath +// NOT NEEDED: DerivationPathIterator +// NOT NEEDED: DerivationPathReference +// NOT NEEDED: Deserializer +// NOT NEEDED: DisablingKeyIdAlsoBeingAddedInSameTransitionError +// NOT NEEDED: Display +// NOT NEEDED: DisplayExpected +// NOT NEEDED: DisplayStyle +// NOT NEEDED: DisplayUnchecked +// NOT NEEDED: DisplayWrapper +// NOT NEEDED: DistributionAmount +// NOT NEEDED: DistributionLeftovers +// NOT NEEDED: Document +// NOT NEEDED: DocumentAlreadyPresentError +// NOT NEEDED: DocumentContestCurrentlyLockedError +// NOT NEEDED: DocumentContestDocumentWithSameIdAlreadyPresentError +// NOT NEEDED: DocumentContestIdentityAlreadyContestantError +// NOT NEEDED: DocumentContestNotJoinableError +// NOT NEEDED: DocumentContestNotPaidForError +// NOT NEEDED: DocumentCreationNotAllowedError +// NOT NEEDED: DocumentError +// NOT NEEDED: DocumentFacade +// NOT NEEDED: DocumentFactory +// NOT NEEDED: DocumentFactoryV0 +// NOT NEEDED: DocumentFieldFillSize +// NOT NEEDED: DocumentFieldFillType +// NOT NEEDED: DocumentFieldMaxSizeExceededError +// NOT NEEDED: DocumentForCbor +// NOT NEEDED: DocumentIncorrectPurchasePriceError +// NOT NEEDED: DocumentNotForSaleError +// NOT NEEDED: DocumentNotFoundError +// NOT NEEDED: DocumentOwnerIdMismatchError +// NOT NEEDED: DocumentPatch +// NOT NEEDED: DocumentProperty +// NOT NEEDED: DocumentPropertyType +// NOT NEEDED: DocumentTimestampWindowViolationError +// NOT NEEDED: DocumentTimestampsAreEqualError +// NOT NEEDED: DocumentTimestampsMismatchError +// NOT NEEDED: DocumentTransitionActionType +// NOT NEEDED: DocumentTransitionsAreAbsentError +// NOT NEEDED: DocumentType +// NOT NEEDED: DocumentTypeMutRef +// NOT NEEDED: DocumentTypeRef +// NOT NEEDED: DocumentTypeUpdateError +// NOT NEEDED: DocumentTypeV0 +// NOT NEEDED: DocumentTypesAreMissingError +// NOT NEEDED: DocumentV0 +// NOT NEEDED: Duffs +// NOT NEEDED: DuplicateDocumentTransitionsWithIdsError +// NOT NEEDED: DuplicateDocumentTransitionsWithIndicesError +// NOT NEEDED: DuplicateIndexError +// NOT NEEDED: DuplicateIndexNameError +// NOT NEEDED: DuplicateUniqueIndexError +// NOT NEEDED: DuplicatedIdentityPublicKeyBasicError +// NOT NEEDED: DuplicatedIdentityPublicKeyIdBasicError +// NOT NEEDED: DuplicatedIdentityPublicKeyIdStateError +// NOT NEEDED: DuplicatedIdentityPublicKeyStateError +// NOT NEEDED: DUPLICATE_EcdsaSighashType +// NOT NEEDED: EmptyWrite +// NOT NEEDED: EncodeSigningDataResult +// NOT NEEDED: Encoder +// NOT NEEDED: Encoding +// NOT NEEDED: EntryMasternodeType +// NOT NEEDED: Epoch +// NOT NEEDED: EpochIndex +// NOT NEEDED: EpochIndexFeeVersionsForStorage +// NOT NEEDED: DUPLICATE_Error +// NOT NEEDED: ErrorTrackingWriter +// NOT NEEDED: ExpectedDocumentsData +// NOT NEEDED: ExtendedBlockInfo +// NOT NEEDED: ExtendedBlockInfoV0 +// NOT NEEDED: ExtendedDocument +// NOT NEEDED: ExtendedDocumentV0 +// NOT NEEDED: ExtendedDocumentVisitor +// NOT NEEDED: ExtendedEpochInfo +// NOT NEEDED: ExtendedEpochInfoV0 +// NOT NEEDED: ExtendedPrivKey +// NOT NEEDED: ExtendedPubKey +// NOT NEEDED: FeeError +// NOT NEEDED: FeeRate +// NOT NEEDED: FeeRefunds +// NOT NEEDED: FeeResult +// NOT NEEDED: FetchAndValidateDataContract +// NOT NEEDED: FieldMinMaxBounds +// NOT NEEDED: FieldType +// NOT NEEDED: FieldTypeWeights +// NOT NEEDED: FilterAdd +// NOT NEEDED: FilterHash +// NOT NEEDED: FilterHeader +// NOT NEEDED: FilterLoad +// NOT NEEDED: FinalizedContender +// NOT NEEDED: FinalizedContenderWithSerializedDocument +// NOT NEEDED: FinalizedResourceVoteChoicesWithVoterInfo +// NOT NEEDED: Fingerprint +// NOT NEEDED: FormatOptions +// NOT NEEDED: FromHexError +// NOT NEEDED: FutureLeafVersion +// NOT NEEDED: GcsFilter +// NOT NEEDED: GcsFilterReader +// NOT NEEDED: GcsFilterWriter +// NOT NEEDED: GetBlockTxn +// NOT NEEDED: GetBlocksMessage +// NOT NEEDED: GetCFCheckpt +// NOT NEEDED: GetCFHeaders +// NOT NEEDED: GetCFilters +// NOT NEEDED: GetDataContractSecurityLevelRequirementFn +// NOT NEEDED: GetHeadersMessage +// NOT NEEDED: GetKeyError +// NOT NEEDED: GetMnListDiff +// NOT NEEDED: GetQRInfo +// NOT NEEDED: HRVisitor +// NOT NEEDED: Header +// NOT NEEDED: HeaderAndShortIds +// NOT NEEDED: HeaderDeserializationWrapper +// NOT NEEDED: HeaderSerializationWrapper +// NOT NEEDED: DUPLICATE_Height +// NOT NEEDED: Hex +// NOT NEEDED: HiddenNodes +// NOT NEEDED: IHeader +// NOT NEEDED: IdentitiesContractKeys +// NOT NEEDED: Identity +// NOT NEEDED: IdentityAlreadyExistsError +// NOT NEEDED: IdentityAssetLockProofLockedTransactionMismatchError +// NOT NEEDED: IdentityAssetLockStateTransitionReplayError +// NOT NEEDED: IdentityAssetLockTransactionIsNotFoundError +// NOT NEEDED: IdentityAssetLockTransactionOutPointAlreadyConsumedError +// NOT NEEDED: IdentityAssetLockTransactionOutPointNotEnoughBalanceError +// NOT NEEDED: IdentityAssetLockTransactionOutputNotFoundError +// NOT NEEDED: IdentityCreateTransitionLatest +// NOT NEEDED: IdentityCreateTransitionV0Inner +// NOT NEEDED: IdentityCreditTransferToSelfError +// NOT NEEDED: IdentityCreditTransferTransitionLatest +// NOT NEEDED: IdentityCreditWithdrawalTransitionLatest +// NOT NEEDED: IdentityCreditWithdrawalTransitionV01 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV010 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV02 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV03 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV04 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV05 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV06 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV07 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV08 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV09 +// NOT NEEDED: IdentityFacade +// NOT NEEDED: IdentityFactory +// NOT NEEDED: IdentityInsufficientBalanceError +// NOT NEEDED: IdentityNotFoundError +// NOT NEEDED: IdentityNotPresentError +// NOT NEEDED: IdentityPublicKeyAlreadyExistsForUniqueContractBoundsError +// NOT NEEDED: IdentityPublicKeyIsDisabledError +// NOT NEEDED: IdentityPublicKeyIsReadOnlyError +// NOT NEEDED: IdentityV0 +// NOT NEEDED: IncompatibleDataContractSchemaError +// NOT NEEDED: IncompatibleDocumentTypeSchemaError +// NOT NEEDED: IncompatibleJsonSchemaOperation +// NOT NEEDED: IncompatibleProtocolVersionError +// NOT NEEDED: IncompatibleRe2PatternError +// NOT NEEDED: IncompleteBuilder +// NOT NEEDED: InconsistentCompoundIndexDataError +// NOT NEEDED: Index +// NOT NEEDED: IndexConstPath +// NOT NEEDED: IndexLevel +// NOT NEEDED: IndexLevelTypeInfo +// NOT NEEDED: IndexName +// NOT NEEDED: IndexOrderDirection +// NOT NEEDED: IndexProperties +// NOT NEEDED: IndexProperty +// NOT NEEDED: IndexPropertyName +// NOT NEEDED: IndexType +// NOT NEEDED: Input +// NOT NEEDED: InputWeightPrediction +// NOT NEEDED: DUPLICATE_InstantLock +// NOT NEEDED: Instruction +// NOT NEEDED: InstructionIndices +// NOT NEEDED: Instructions +// NOT NEEDED: IntegerReplacementType +// NOT NEEDED: InvalidAssetLockProofCoreChainHeightError +// NOT NEEDED: InvalidAssetLockProofTransactionHeightError +// NOT NEEDED: InvalidAssetLockTransactionOutputReturnSizeError +// NOT NEEDED: InvalidCompoundIndexError +// NOT NEEDED: InvalidDataContractIdError +// NOT NEEDED: InvalidDataContractVersionError +// NOT NEEDED: InvalidDocumentRevisionError +// NOT NEEDED: InvalidDocumentTransitionActionError +// NOT NEEDED: InvalidDocumentTransitionIdError +// NOT NEEDED: DUPLICATE_InvalidDocumentTypeError +// NOT NEEDED: InvalidDocumentTypeNameError +// NOT NEEDED: InvalidDocumentTypeRequiredSecurityLevelError +// NOT NEEDED: InvalidIdentifierError +// NOT NEEDED: InvalidIdentityAssetLockProofChainLockValidationError +// NOT NEEDED: InvalidIdentityAssetLockTransactionError +// NOT NEEDED: InvalidIdentityAssetLockTransactionOutputError +// NOT NEEDED: InvalidIdentityCreditTransferAmountError +// NOT NEEDED: InvalidIdentityCreditWithdrawalTransitionAmountError +// NOT NEEDED: InvalidIdentityCreditWithdrawalTransitionCoreFeeError +// NOT NEEDED: InvalidIdentityCreditWithdrawalTransitionOutputScriptError +// NOT NEEDED: InvalidIdentityKeySignatureError +// NOT NEEDED: InvalidIdentityNonceError +// NOT NEEDED: InvalidIdentityPublicKeyDataError +// NOT NEEDED: InvalidIdentityPublicKeyIdError +// NOT NEEDED: InvalidIdentityPublicKeySecurityLevelError +// NOT NEEDED: DUPLICATE_InvalidIdentityPublicKeyTypeError +// NOT NEEDED: InvalidIdentityRevisionError +// NOT NEEDED: InvalidIdentityUpdateTransitionDisableKeysError +// NOT NEEDED: InvalidIdentityUpdateTransitionEmptyError +// NOT NEEDED: InvalidIndexPropertyTypeError +// NOT NEEDED: InvalidIndexedPropertyConstraintError +// NOT NEEDED: InvalidInstantAssetLockProofError +// NOT NEEDED: InvalidInstantAssetLockProofSignatureError +// NOT NEEDED: InvalidJsonSchemaRefError +// NOT NEEDED: InvalidSignaturePublicKeyError +// NOT NEEDED: InvalidSignaturePublicKeyPurposeError +// NOT NEEDED: InvalidSignaturePublicKeySecurityLevelError +// NOT NEEDED: InvalidStateTransitionSignatureError +// NOT NEEDED: InvalidStateTransitionTypeError +// NOT NEEDED: InvalidVectorSizeError +// NOT NEEDED: Inventory +// NOT NEEDED: IoWrapper +// NOT NEEDED: IsIndexUnique +// NOT NEEDED: Iter +// NOT NEEDED: IterReader +// NOT NEEDED: JsonPath +// NOT NEEDED: JsonPathLiteral +// NOT NEEDED: JsonPathStep +// NOT NEEDED: JsonSchema +// NOT NEEDED: JsonSchemaCompilationError +// NOT NEEDED: DUPLICATE_JsonSchemaError +// NOT NEEDED: JsonSchemaErrorData +// NOT NEEDED: DUPLICATE_JsonSchemaValidator +// NOT NEEDED: JsonStateTransitionSerializationOptions +// NOT NEEDED: Key +// NOT NEEDED: KeyCount +// NOT NEEDED: KeyDerivationType +// NOT NEEDED: KeyRequest +// NOT NEEDED: KeySource +// NOT NEEDED: Keys +// NOT NEEDED: KnownCostItem +// NOT NEEDED: LLMQEntryVerificationSkipStatus +// NOT NEEDED: LLMQEntryVerificationStatus +// NOT NEEDED: LLMQModifierType +// NOT NEEDED: LLMQParams +// NOT NEEDED: LLMQQuarterReconstructionType +// NOT NEEDED: LLMQQuarterType +// NOT NEEDED: LLMQQuarterUsageType +// NOT NEEDED: LeafNode +// NOT NEEDED: LeafNodes +// NOT NEEDED: LeafVersion +// NOT NEEDED: LegacySighash +// NOT NEEDED: DUPLICATE_LockTime +// NOT NEEDED: LockTimeUnit +// NOT NEEDED: LockedVotePollCounter +// NOT NEEDED: Lower +// NOT NEEDED: MNSkipListMode +// NOT NEEDED: MapKeySerializer +// NOT NEEDED: MasterPublicKeyUpdateError +// NOT NEEDED: MasternodeIncorrectVoterIdentityIdError +// NOT NEEDED: MasternodeIncorrectVotingAddressError +// NOT NEEDED: MasternodeList +// NOT NEEDED: MasternodeListBuilder +// NOT NEEDED: MasternodeListEngine +// NOT NEEDED: MasternodeListEntry +// NOT NEEDED: MasternodeNotFoundError +// NOT NEEDED: MasternodeVoteAlreadyPresentError +// NOT NEEDED: MasternodeVoteTransitionLatest +// NOT NEEDED: MasternodeVotedTooManyTimesError +// NOT NEEDED: MaxDepthValidationResult +// NOT NEEDED: MaxDocumentsTransitionsExceededError +// NOT NEEDED: MaxIdentityPublicKeyLimitReachedError +// NOT NEEDED: MergeIdentityNonceResult +// NOT NEEDED: MerkleBlock +// NOT NEEDED: MerkleBlockError +// NOT NEEDED: MessageSignature +// NOT NEEDED: MessageSignatureError +// NOT NEEDED: MessageVerificationError +// NOT NEEDED: Metadata +// NOT NEEDED: MissingDataContractIdBasicError +// NOT NEEDED: MissingDocumentTransitionActionError +// NOT NEEDED: MissingDocumentTransitionTypeError +// NOT NEEDED: MissingDocumentTypeError +// NOT NEEDED: MissingIdentityPublicKeyIdsError +// NOT NEEDED: MissingMasterPublicKeyError +// NOT NEEDED: MissingPositionsInDocumentTypePropertiesError +// NOT NEEDED: MissingPublicKeyError +// NOT NEEDED: MissingStateTransitionTypeError +// NOT NEEDED: MissingTransferKeyError +// NOT NEEDED: MnListDiff +// NOT NEEDED: MoveOperation +// NOT NEEDED: NativeBlsModule +// NOT NEEDED: Network +// NOT NEEDED: NetworkChecked +// NOT NEEDED: NetworkMessage +// NOT NEEDED: NetworkUnchecked +// NOT NEEDED: NoTransferKeyForCoreWithdrawalAvailableError +// NOT NEEDED: NodeInfo +// NOT NEEDED: NonConsensusError +// NOT NEEDED: DUPLICATE_NonStandardSighashType +// NOT NEEDED: NonceOutOfBoundsError +// NOT NEEDED: NotImplementedIdentityCreditWithdrawalTransitionPoolingError +// NOT NEEDED: OperationError +// NOT NEEDED: OperatorPublicKey +// NOT NEEDED: OrderBy +// NOT NEEDED: Output +// NOT NEEDED: OutputType +// NOT NEEDED: OverflowError +// NOT NEEDED: OwnedPair +// NOT NEEDED: Pair +// NOT NEEDED: Params +// NOT NEEDED: ParentDocumentOptions +// NOT NEEDED: ParseAmountError +// NOT NEEDED: ParseIntError +// NOT NEEDED: ParseNetworkError +// NOT NEEDED: ParseOutPointError +// NOT NEEDED: PartialIdentity +// NOT NEEDED: PartialMerkleTree +// NOT NEEDED: PartiallySignedTransaction +// NOT NEEDED: PastAssetLockStateTransitionHashes +// NOT NEEDED: Patch +// NOT NEEDED: PatchDiffer +// NOT NEEDED: PatchError +// NOT NEEDED: PatchErrorKind +// NOT NEEDED: PatchOperation +// NOT NEEDED: Payload +// NOT NEEDED: PlatformItemKey +// NOT NEEDED: PreferredKeyPurposeForSigningWithdrawal +// NOT NEEDED: PrefilledTransaction +// NOT NEEDED: PrefundedSpecializedBalanceIdentifier +// NOT NEEDED: PrefundedSpecializedBalanceInsufficientError +// NOT NEEDED: PrefundedSpecializedBalanceNotFoundError +// NOT NEEDED: Prevouts +// NOT NEEDED: PrivateKey +// NOT NEEDED: ProTxHash +// NOT NEEDED: PropertyPath +// NOT NEEDED: ProprietaryKey +// NOT NEEDED: ProprietaryType +// NOT NEEDED: ProtocolError +// NOT NEEDED: ProtocolValidationOperation +// NOT NEEDED: ProtocolVersion +// NOT NEEDED: ProtocolVersionParsingError +// NOT NEEDED: ProtocolVersionVoteCount +// NOT NEEDED: Psbt +// NOT NEEDED: PsbtHash +// NOT NEEDED: PsbtParseError +// NOT NEEDED: PsbtSighashType +// NOT NEEDED: PublicKey +// NOT NEEDED: PublicKeyIsDisabledError +// NOT NEEDED: PublicKeyMismatchError +// NOT NEEDED: DUPLICATE_PublicKeySecurityLevelNotMetError +// NOT NEEDED: PublicKeyValidationError +// NOT NEEDED: PushBytes +// NOT NEEDED: PushBytesBuf +// NOT NEEDED: DUPLICATE_PushBytesError +// NOT NEEDED: PushDataLenLen +// NOT NEEDED: QRInfo +// NOT NEEDED: QualifiedMasternodeListEntry +// NOT NEEDED: QualifiedQuorumEntry +// NOT NEEDED: QuorumCLSigObject +// NOT NEEDED: QuorumCommitmentHash +// NOT NEEDED: QuorumEntryHash +// NOT NEEDED: QuorumModifierHash +// NOT NEEDED: QuorumOrderingHash +// NOT NEEDED: QuorumSigningRequestId +// NOT NEEDED: QuorumSigningSignId +// NOT NEEDED: QuorumSnapshot +// NOT NEEDED: QuorumValidationError +// NOT NEEDED: RandomDocumentTypeParameters +// NOT NEEDED: RawAssetLockProof +// NOT NEEDED: RawNetworkMessage +// NOT NEEDED: ReadBytesFromFiniteReaderOpts +// NOT NEEDED: Reject +// NOT NEEDED: RejectReason +// NOT NEEDED: RemoveOperation +// NOT NEEDED: ReplaceOperation +// NOT NEEDED: ReplacementType +// NOT NEEDED: SMLEntry +// NOT NEEDED: SMLStore +// NOT NEEDED: Script +// NOT NEEDED: ScriptHash +// NOT NEEDED: ScriptLeaf +// NOT NEEDED: ScriptLeaves +// NOT NEEDED: ScriptMerkleProofMap +// NOT NEEDED: ScriptPath +// NOT NEEDED: SegwitCache +// NOT NEEDED: SegwitV0Sighash +// NOT NEEDED: SendCmpct +// NOT NEEDED: SeqIterator +// NOT NEEDED: SerdeParsingError +// NOT NEEDED: SerializeBytesAsHex +// NOT NEEDED: SerializeMap +// NOT NEEDED: SerializeStructVariant +// NOT NEEDED: SerializeTupleVariant +// NOT NEEDED: SerializeVec +// NOT NEEDED: SerializedObjectParsingError +// NOT NEEDED: SerializedSignature +// NOT NEEDED: Serializer +// NOT NEEDED: ServiceFlags +// NOT NEEDED: Sha256dHash +// NOT NEEDED: ShortId +// NOT NEEDED: ShouldInsertWithAllNull +// NOT NEEDED: SigHashCache +// NOT NEEDED: SigHashType +// NOT NEEDED: SighashCache +// NOT NEEDED: SighashComponents +// NOT NEEDED: DUPLICATE_SighashTypeParseError +// NOT NEEDED: SignError +// NOT NEEDED: SignableBytesHasher +// NOT NEEDED: DUPLICATE_Signature +// NOT NEEDED: SignatureError +// NOT NEEDED: SignatureShouldNotBePresentError +// NOT NEEDED: SignedAmount +// NOT NEEDED: SignedCredits +// NOT NEEDED: SignedCreditsPerEpoch +// NOT NEEDED: SigningAlgorithm +// NOT NEEDED: SigningErrors +// NOT NEEDED: SigningKeys +// NOT NEEDED: SimpleConsensusValidationResult +// NOT NEEDED: SimpleValidationResult +// NOT NEEDED: SimplifiedMNList +// NOT NEEDED: Sink +// NOT NEEDED: SmallVec +// NOT NEEDED: SmlError +// NOT NEEDED: SortKey +// NOT NEEDED: SpecialTransactionPayloadHash +// NOT NEEDED: SpecializedDocumentFactory +// NOT NEEDED: SpecializedDocumentFactoryV0 +// NOT NEEDED: SplitFeatureVersionOutcome +// NOT NEEDED: StateError +// NOT NEEDED: StateTransitionError +// NOT NEEDED: StateTransitionFactory +// NOT NEEDED: StateTransitionIsNotSignedError +// NOT NEEDED: StateTransitionMaxSizeExceededError +// NOT NEEDED: StateTransitionProofResult +// NOT NEEDED: StateTransitionType +// NOT NEEDED: StatelessJsonSchemaLazyValidator +// NOT NEEDED: StoredAssetLockInfo +// NOT NEEDED: StringPropertySizes +// NOT NEEDED: SubValidator +// NOT NEEDED: SystemPropertyIndexAlreadyPresentError +// NOT NEEDED: TapLeaf +// NOT NEEDED: TapSighashType +// NOT NEEDED: TapTree +// NOT NEEDED: TaprootBuilder +// NOT NEEDED: TaprootBuilderError +// NOT NEEDED: TaprootCache +// NOT NEEDED: TaprootError +// NOT NEEDED: TaprootMerkleBranch +// NOT NEEDED: TaprootSpendInfo +// NOT NEEDED: Target +// NOT NEEDED: TestConsensusError +// NOT NEEDED: DUPLICATE_TestData +// NOT NEEDED: TestOperation +// NOT NEEDED: DUPLICATE_Time +// NOT NEEDED: TimestampIncluded +// NOT NEEDED: TooManyMasterPublicKeyError +// NOT NEEDED: TotalCreditsBalance +// NOT NEEDED: TradeMode +// NOT NEEDED: Transferable +// NOT NEEDED: TransitionFingerprint +// NOT NEEDED: TryFromError +// NOT NEEDED: TweakedKeyPair +// NOT NEEDED: TweakedPublicKey +// NOT NEEDED: TxIn +// NOT NEEDED: TxIndexOutOfRangeError +// NOT NEEDED: TxMerkleNode +// NOT NEEDED: Type +// NOT NEEDED: U256 +// NOT NEEDED: UintError +// NOT NEEDED: UndefinedIndexPropertyError +// NOT NEEDED: UniqueIndicesLimitReachedError +// NOT NEEDED: UnknownAssetLockProofTypeError +// NOT NEEDED: UnknownChainHash +// NOT NEEDED: UnknownDocumentCreationRestrictionModeError +// NOT NEEDED: UnknownSecurityLevelError +// NOT NEEDED: UnknownStorageKeyRequirementsError +// NOT NEEDED: UnknownTradeModeError +// NOT NEEDED: UnknownTransferableTypeError +// NOT NEEDED: UnsupportedFeatureError +// NOT NEEDED: UnsupportedProtocolVersionError +// NOT NEEDED: UnsupportedVersionError +// NOT NEEDED: UntweakedKeyPair +// NOT NEEDED: UntweakedPublicKey +// NOT NEEDED: Upper +// NOT NEEDED: UpperWriter +// NOT NEEDED: DUPLICATE_UsedKeyMatrix +// NOT NEEDED: ValidationResult +// NOT NEEDED: Validator +// NOT NEEDED: ValidatorSet +// NOT NEEDED: ValidatorSetV0 +// NOT NEEDED: ValidatorV0 +// NOT NEEDED: ValueError +// NOT NEEDED: ValueMapDeserializer +// NOT NEEDED: VarInt +// NOT NEEDED: Version +// NOT NEEDED: VersionError +// NOT NEEDED: VersionMessage +// NOT NEEDED: Visitor +// NOT NEEDED: VotePollNotAvailableForVotingError +// NOT NEEDED: VotePollNotFoundError +// NOT NEEDED: WPubkeyHash +// NOT NEEDED: WScriptHash +// NOT NEEDED: Weight +// NOT NEEDED: With +// NOT NEEDED: WithdrawalOutputScriptNotAllowedWhenSigningWithOwnerKeyError +// NOT NEEDED: WithdrawalTransactionIndex +// NOT NEEDED: WithdrawalTransactionIndexAndBytes +// NOT NEEDED: Witness +// NOT NEEDED: WitnessCommitment +// NOT NEEDED: WitnessMerkleNode +// NOT NEEDED: WitnessProgram +// NOT NEEDED: WitnessVersion +// NOT NEEDED: Work +// NOT NEEDED: DUPLICATE_WrongPublicKeyPurposeError +// NOT NEEDED: Wtxid +// NOT NEEDED: XpubIdentifier +// NOT NEEDED: YesNoAbstainVoteChoice diff --git a/2-create-data-contract.ts b/2-create-data-contract.ts new file mode 100644 index 0000000..9e44370 --- /dev/null +++ b/2-create-data-contract.ts @@ -0,0 +1,189 @@ +// import Fs from "node:fs/promises"; + +import { doubleSha256 } from "dashtx" +import DashKeys from "dashkeys" +import * as Bincode from "./src/bincode.ts"; +import * as DashBincode from "./2.0.0/generated_bincode.js"; +import * as KeyUtils from "./src/key-utils.js"; + +import { loadWallet } from "./src/cli.ts" +import { deriveAllCreateIdentityKeys } from "./src/asset_lock.ts" +import { toHex } from "./src/hex.js" +import { connectToNode } from "./src/rpc.ts" +import { NODE_ADDRESS } from "./src/constants.ts" +import { findExistingIdentity } from "./src/identity.ts" +import { base58 } from "./src/util/base58.ts" + + +export async function step2CreateDataContract(walletPhrase: string, walletSalt: string, identityIndex: number) { + +const nodeRpc = connectToNode(NODE_ADDRESS); + +const walletKey = await loadWallet(walletPhrase, walletSalt); + +let hdOpts = { version: "testnet" } as const; // TODO + +let { + regFundKey, + changeKey, // TODO next change key from wallet + assetKey, + + masterKey, + otherKey, +} = await deriveAllCreateIdentityKeys(hdOpts, walletKey, identityIndex); + +// console.log('masterKey hex', toHex(masterKey.publicKey)) +// console.log('otherKey hex', toHex(otherKey.publicKey)) + +// console.log('masterKey pkh', toHex(await DashKeys.pubkeyToPkh(masterKey.publicKey))) +// console.log('otherKey pkh', toHex(await DashKeys.pubkeyToPkh(otherKey.publicKey))) + +const pkh = await DashKeys.pubkeyToPkh(masterKey.publicKey) +const existingIdentity = await findExistingIdentity(nodeRpc, pkh) +if (!existingIdentity) { + console.log('Identity Not Yet Created!') + process.exit(1); +} + +const existingIdentityV0: DashBincode.IdentityV0 = Bincode.match(existingIdentity, { + V0: i => i[0] +}); + +const existingIdentityId = existingIdentityV0.id[0][0]; + +const identityNonceResponse = await nodeRpc.platform.getIdentityNonce({version: { + oneofKind: "v0", + v0: { + identityId: existingIdentityId, + prove: false, + } +}}) +// console.log('identityNonceResponse', identityNonceResponse) +// console.log('identityNonceResponse', identityNonceResponse.response.version.v0.result) + +let current_identity_nonce = 0n; +if (identityNonceResponse.response.version.oneofKind === 'v0') { + const v0 = identityNonceResponse.response.version.v0; + if (v0.result.oneofKind === 'identityNonce') { + current_identity_nonce = BigInt(v0.result.identityNonce) + } else { + throw new Error("Cannot handle identityNonceResponse") + } +} else { + throw new Error("Cannot handle identityNonceResponse") +} +console.log('current_identity_nonce', current_identity_nonce) + +console.log('Identity:', base58.encode(existingIdentityV0.id[0][0])) +console.log(existingIdentityV0) + +const owner_id = existingIdentityId; +const identity_nonce = current_identity_nonce + 1n; + +// TODO: check to see if a data contract has already been created + +const documentSchemas = new Map(); +documentSchemas.set("note", DashBincode.Value.Map([ + [DashBincode.Value.Text("type"), DashBincode.Value.Text("object")], // required + [DashBincode.Value.Text("properties"), DashBincode.Value.Map([ + [DashBincode.Value.Text("message"), DashBincode.Value.Map([ + [DashBincode.Value.Text("type"), DashBincode.Value.Text("string")], + [DashBincode.Value.Text("position"), DashBincode.Value.U32(0)], + ])], + ])], + [DashBincode.Value.Text("additionalProperties"), DashBincode.Value.Bool(false)], +])) + +const newContractIdBuffer = new Uint8Array(owner_id.length + 8); +newContractIdBuffer.set(owner_id, 0); +new DataView(newContractIdBuffer.buffer).setBigUint64(owner_id.length, identity_nonce); +const newContractID = await doubleSha256(newContractIdBuffer) +const newContractIDStr = base58.encode(newContractID) +console.log('newContractID', newContractIDStr) + + +const dataContract = DashBincode.DataContractInSerializationFormatV0({ + version: 1, + owner_id: DashBincode.Identifier(DashBincode.IdentifierBytes32(owner_id)), + id: DashBincode.Identifier(DashBincode.IdentifierBytes32(newContractID)), + document_schemas: documentSchemas, + config: DashBincode.DataContractConfig.V0({ + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false + }), + // schema_defs: , +}) + +const createDataContract = DashBincode.DataContractCreateTransitionV0({ + data_contract: DashBincode.DataContractInSerializationFormat.V0(dataContract), + identity_nonce, // TODO: https://docs.dash.org/en/latest/docs/core/dips/dip-0030.html#identity-contract-nonce + user_fee_increase: 0, // extra fee to process this transition faster, leave 0 + signature_public_key_id: 1, // TODO: set to which identity public key are we signing with + signature: DashBincode.BinaryData(new Uint8Array), +}) + +const stateTransition = DashBincode.StateTransition.DataContractCreate( + DashBincode.DataContractCreateTransition.V0(createDataContract)); + +{ + const signableBytes = new Uint8Array(Bincode.encode(DashBincode.StateTransition, stateTransition, {signable: true})); + + const signableHash = await KeyUtils.doubleSha256(signableBytes); + + const signatureBytes = await KeyUtils.magicSign({ + privKeyBytes: otherKey.privateKey!, + doubleSha256Bytes: signableHash, + }); + + createDataContract.signature[0] = signatureBytes +} + +const signedBytes = new Uint8Array(Bincode.encode(DashBincode.StateTransition, stateTransition)); +const transitionHash = await KeyUtils.sha256(signedBytes); + +console.log("Broadcasting Data Contract Create Transition...") +try { + const response = await nodeRpc.platform.broadcastStateTransition({ + stateTransition: signedBytes, + }) + console.log('response', response.status, response.response); + // await Fs.writeFile('data-contract-' + newContractIDStr.slice(0, 6) + '.json', JSON.stringify({id: newContractIDStr})); + +} catch (e) { + console.error("Error: ", decodeURIComponent((e as any).message)) +} + +console.log(); +console.log('New Contract ID:', newContractIDStr) +console.log("https://testnet.platform-explorer.com/dataContract/" + newContractIDStr) +console.log(`https://testnet.platform-explorer.com/transaction/${toHex(transitionHash)}`); + +} + +if (typeof process === 'object' && process.argv[1] === import.meta.filename) { + + import("dotenv").then(dotenv => { + dotenv.default.config({ path: ".env" }); + + let walletPhrase = process.env.DASH_WALLET_PHRASE!; + let walletSalt = process.env.DASH_WALLET_SALT ?? ""; + + let identityIndex = parseInt(process.argv[2], 10); + if (isNaN(identityIndex)) { + console.error(""); + console.error("USAGE"); + console.error(` ${process.argv[0]} ${process.argv[1]} `); + console.error(""); + console.error("EXAMPLE"); + console.error(` ${process.argv[0]} ${process.argv[1]} 0`); + console.error(""); + process.exit(1); + } + + step2CreateDataContract(walletPhrase, walletSalt, identityIndex); + }); +} \ No newline at end of file diff --git a/2.0.0/generated_bincode.d.ts b/2.0.0/generated_bincode.d.ts new file mode 100644 index 0000000..a33f2fe --- /dev/null +++ b/2.0.0/generated_bincode.d.ts @@ -0,0 +1,5856 @@ +import { BinCode, BinCodeable, VARIANTS } from "../src/bincode.ts"; +import { Option, FixedBytes, Hash, SocketAddr, Transaction } from "../src/bincode_types.ts"; +declare module "./generated_bincode.js" { + +/** + * An Asset Lock payload. This is contained as the payload of an asset lock special transaction. + * The Asset Lock Special transaction and this payload is described in the Asset Lock DIP2X + * (todo:update this). + * An Asset Lock can fund multiple Identity registrations or top ups. + * The Asset Lock payload credit outputs field contains a vector of TxOuts. + * Each TxOut refers to a funding of an Identity. + */ +interface AssetLockPayload { + version: number; + credit_outputs: TxOut[]; +} +/** @ignore */ +const AssetLockPayload : BinCodeable & ((data: { + version: number, + credit_outputs: TxOut[], +}) => AssetLockPayload); + +/** allow clippy :: large_enum_variant */ +/** @ignore */ +export abstract class AssetLockProof { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: AssetLockProof): void; + /** @ignore */ + static decode(bc: BinCode): AssetLockProof; + /** @ignore @internal */ + [VARIANTS]: typeof AssetLockProof.variants; + /** @ignore */ + static variants: { + Instant: typeof AssetLockProof.Instant, + Chain: typeof AssetLockProof.Chain, + }; +} +namespace AssetLockProof { + /** @function */ + interface Instant extends AssetLockProof { + [0]: InstantAssetLockProof; + } + /** @ignore */ + const Instant: (f0: InstantAssetLockProof) => AssetLockProof.Instant; + /** @function */ + interface Chain extends AssetLockProof { + [0]: ChainAssetLockProof; + } + /** @ignore */ + const Chain: (f0: ChainAssetLockProof) => AssetLockProof.Chain; +} + +/** + * An Asset Unlock Base payload. This is the base payload of the Asset Unlock. In order to make + * it a full payload the request info should be added. + */ +interface AssetUnlockBasePayload { + /** The payload protocol version, is currently expected to be 0. */ + version: number; + /** The index of the unlock transaction. It gets bumped on each transaction */ + index: bigint; + /** The fee used in Duffs (Satoshis) */ + fee: number; +} +/** @ignore */ +const AssetUnlockBasePayload : BinCodeable & ((data: { + /** The payload protocol version, is currently expected to be 0. */ + version: number, + /** The index of the unlock transaction. It gets bumped on each transaction */ + index: bigint, + /** The fee used in Duffs (Satoshis) */ + fee: number, +}) => AssetUnlockBasePayload); + +/** + * A Credit Withdrawal payload. This is contained as the payload of a credit withdrawal special + * transaction. + * The Credit Withdrawal Special transaction and this payload is described in the Asset Lock DIP2X + * (todo:update this). + * The Credit Withdrawal Payload is signed by a quorum. + * + * Transaction using it have no inputs. Hence the proof of validity lies solely on the BLS signature. + */ +interface AssetUnlockPayload { + /** + * The base information about the asset unlock. This base information is the information that + * should be put into a queue. + */ + base: AssetUnlockBasePayload; + /** + * The request information. This should be added to the unlock transaction as it is being sent + * to be signed. + */ + request_info: AssetUnlockRequestInfo; + /** The threshold signature. This should be returned by the consensus engine. */ + quorum_sig: BLSSignature; +} +/** @ignore */ +const AssetUnlockPayload : BinCodeable & ((data: { + /** + * The base information about the asset unlock. This base information is the information that + * should be put into a queue. + */ + base: AssetUnlockBasePayload, + /** + * The request information. This should be added to the unlock transaction as it is being sent + * to be signed. + */ + request_info: AssetUnlockRequestInfo, + /** The threshold signature. This should be returned by the consensus engine. */ + quorum_sig: BLSSignature, +}) => AssetUnlockPayload); + +/** + * An asset unlock request info + * This is the information about the signing quorum + * The request height should be the height at which the specified quorum is active on core. + */ +interface AssetUnlockRequestInfo { + /** + * The core request height of the transaction. This should match a period where the quorum_hash + * is still active + */ + request_height: number; + /** The quorum hash. This is the block hash when the quorum was created. */ + quorum_hash: QuorumHash; +} +/** @ignore */ +const AssetUnlockRequestInfo : BinCodeable & ((data: { + /** + * The core request height of the transaction. This should match a period where the quorum_hash + * is still active + */ + request_height: number, + /** The quorum hash. This is the block hash when the quorum was created. */ + quorum_hash: QuorumHash, +}) => AssetUnlockRequestInfo); + +/** @ignore */ +export abstract class AuthorizedActionTakers { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: AuthorizedActionTakers): void; + /** @ignore */ + static decode(bc: BinCode): AuthorizedActionTakers; + /** @ignore @internal */ + [VARIANTS]: typeof AuthorizedActionTakers.variants; + /** @ignore */ + static variants: { + NoOne: typeof AuthorizedActionTakers.NoOne, + ContractOwner: typeof AuthorizedActionTakers.ContractOwner, + Identity: typeof AuthorizedActionTakers.Identity, + MainGroup: typeof AuthorizedActionTakers.MainGroup, + Group: typeof AuthorizedActionTakers.Group, + }; +} +namespace AuthorizedActionTakers { + /** default */ + const NoOne: () => AuthorizedActionTakers; + const ContractOwner: () => AuthorizedActionTakers; + /** @function */ + interface Identity extends AuthorizedActionTakers { + [0]: Identifier; + } + /** @ignore */ + const Identity: (f0: Identifier) => AuthorizedActionTakers.Identity; + const MainGroup: () => AuthorizedActionTakers; + /** @function */ + interface Group extends AuthorizedActionTakers { + [0]: GroupContractPosition; + } + /** @ignore */ + const Group: (f0: GroupContractPosition) => AuthorizedActionTakers.Group; +} + +/** + * A BLS Public key is 48 bytes in the scheme used for Dash Core + * attr since (1.48) , derive (PartialEq , Eq , Ord , PartialOrd , Hash) + */ +interface BLSPublicKey { + [0]: FixedBytes<48>; +} +/** @ignore */ +const BLSPublicKey : BinCodeable & (( + f0: FixedBytes<48>, +) => BLSPublicKey); + +/** + * A BLS Signature is 96 bytes in the scheme used for Dash Core + * attr since (1.48) , derive (PartialEq , Eq , Ord , PartialOrd , Hash) + */ +interface BLSSignature { + [0]: FixedBytes<96>; +} +/** @ignore */ +const BLSSignature : BinCodeable & (( + f0: FixedBytes<96>, +) => BLSSignature); + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.batch_state_transition" */ +/** @ignore */ +export abstract class BatchTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: BatchTransition): void; + /** @ignore */ + static decode(bc: BinCode): BatchTransition; + /** @ignore @internal */ + [VARIANTS]: typeof BatchTransition.variants; + /** @ignore */ + static variants: { + V0: typeof BatchTransition.V0, + V1: typeof BatchTransition.V1, + }; +} +namespace BatchTransition { + /** @function */ + interface V0 extends BatchTransition { + [0]: BatchTransitionV0; + } + /** @ignore */ + const V0: (f0: BatchTransitionV0) => BatchTransition.V0; + /** @function */ + interface V1 extends BatchTransition { + [0]: BatchTransitionV1; + } + /** @ignore */ + const V1: (f0: BatchTransitionV1) => BatchTransition.V1; +} + +interface BatchTransitionV0 { + owner_id: Identifier; + transitions: DocumentTransition[]; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const BatchTransitionV0 : BinCodeable & ((data: { + owner_id: Identifier, + transitions: DocumentTransition[], + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => BatchTransitionV0); + +interface BatchTransitionV1 { + owner_id: Identifier; + transitions: BatchedTransition[]; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const BatchTransitionV1 : BinCodeable & ((data: { + owner_id: Identifier, + transitions: BatchedTransition[], + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => BatchTransitionV1); + +/** @ignore */ +export abstract class BatchedTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: BatchedTransition): void; + /** @ignore */ + static decode(bc: BinCode): BatchedTransition; + /** @ignore @internal */ + [VARIANTS]: typeof BatchedTransition.variants; + /** @ignore */ + static variants: { + Document: typeof BatchedTransition.Document, + Token: typeof BatchedTransition.Token, + }; +} +namespace BatchedTransition { + /** @function */ + interface Document extends BatchedTransition { + [0]: DocumentTransition; + } + /** @ignore */ + const Document: (f0: DocumentTransition) => BatchedTransition.Document; + /** @function */ + interface Token extends BatchedTransition { + [0]: TokenTransition; + } + /** @ignore */ + const Token: (f0: TokenTransition) => BatchedTransition.Token; +} + +interface BinaryData { + [0]: Uint8Array; +} +/** @ignore */ +const BinaryData : BinCodeable & (( + f0: Uint8Array, +) => BinaryData); + +/** A dash block hash. */ +interface BlockHash { + [0]: Hash; +} +/** @ignore */ +const BlockHash : BinCodeable & (( + f0: Hash, +) => BlockHash); + +export type BlockHeight = bigint; + +export type BlockHeightInterval = bigint; + +/** + * Instant Asset Lock Proof is a part of Identity Create and Identity Topup + * transitions. It is a proof that specific output of dash is locked in credits + * pull and the transitions can mint credits and populate identity's balance. + * To prove that the output is locked, a height where transaction was chain locked is provided. + */ +interface ChainAssetLockProof { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: number; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: OutPoint; +} +/** @ignore */ +const ChainAssetLockProof : BinCodeable & ((data: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: number, + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: OutPoint, +}) => ChainAssetLockProof); + +/** @ignore */ +export abstract class ChangeControlRules { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: ChangeControlRules): void; + /** @ignore */ + static decode(bc: BinCode): ChangeControlRules; + /** @ignore @internal */ + [VARIANTS]: typeof ChangeControlRules.variants; + /** @ignore */ + static variants: { + V0: typeof ChangeControlRules.V0, + }; +} +namespace ChangeControlRules { + /** @function */ + interface V0 extends ChangeControlRules { + [0]: ChangeControlRulesV0; + } + /** @ignore */ + const V0: (f0: ChangeControlRulesV0) => ChangeControlRules.V0; +} + +interface ChangeControlRulesV0 { + /** This is who is authorized to make such a change */ + authorized_to_make_change: AuthorizedActionTakers; + /** This is who is authorized to make such a change to the people authorized to make a change */ + admin_action_takers: AuthorizedActionTakers; + /** Are we allowed to change to None in the future */ + changing_authorized_action_takers_to_no_one_allowed: boolean; + /** Are we allowed to change the admin action takers to no one in the future */ + changing_admin_action_takers_to_no_one_allowed: boolean; + /** Can the admin action takers change themselves */ + self_changing_admin_action_takers_allowed: boolean; +} +/** @ignore */ +const ChangeControlRulesV0 : BinCodeable & ((data: { + /** This is who is authorized to make such a change */ + authorized_to_make_change: AuthorizedActionTakers, + /** This is who is authorized to make such a change to the people authorized to make a change */ + admin_action_takers: AuthorizedActionTakers, + /** Are we allowed to change to None in the future */ + changing_authorized_action_takers_to_no_one_allowed: boolean, + /** Are we allowed to change the admin action takers to no one in the future */ + changing_admin_action_takers_to_no_one_allowed: boolean, + /** Can the admin action takers change themselves */ + self_changing_admin_action_takers_allowed: boolean, +}) => ChangeControlRulesV0); + +/** + * A Coinbase payload. This is contained as the payload of a coinbase special transaction. + * The Coinbase payload is described in DIP4. + */ +interface CoinbasePayload { + version: number; + height: number; + merkle_root_masternode_list: MerkleRootMasternodeList; + merkle_root_quorums: MerkleRootQuorums; + best_cl_height?: number; + best_cl_signature?: BLSSignature; + asset_locked_amount?: bigint; +} +/** @ignore */ +const CoinbasePayload : BinCodeable & ((data: { + version: number, + height: number, + merkle_root_masternode_list: MerkleRootMasternodeList, + merkle_root_quorums: MerkleRootQuorums, + best_cl_height?: number, + best_cl_signature?: BLSSignature, + asset_locked_amount?: bigint, +}) => CoinbasePayload); + +interface ContestedDocumentResourceVotePoll { + contract_id: Identifier; + document_type_name: string; + index_name: string; + index_values: Value[]; +} +/** @ignore */ +const ContestedDocumentResourceVotePoll : BinCodeable & ((data: { + contract_id: Identifier, + document_type_name: string, + index_name: string, + index_values: Value[], +}) => ContestedDocumentResourceVotePoll); + +/** + * A contract bounds is the bounds that the key has influence on. + * For authentication keys the bounds mean that the keys can only be used to sign + * within the specified contract. + * For encryption decryption this tells clients to only use these keys for specific + * contracts. + * + * repr u8 + */ +/** @ignore */ +export abstract class ContractBounds { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: ContractBounds): void; + /** @ignore */ + static decode(bc: BinCode): ContractBounds; + /** @ignore @internal */ + [VARIANTS]: typeof ContractBounds.variants; + /** @ignore */ + static variants: { + SingleContract: typeof ContractBounds.SingleContract, + SingleContractDocumentType: typeof ContractBounds.SingleContractDocumentType, + }; +} +namespace ContractBounds { + /** + * this key can only be used within a specific contract + * + * @function + */ + interface SingleContract extends ContractBounds { + id: Identifier; + } + const SingleContract: (data: { + id: Identifier, + }) => ContractBounds.SingleContract; + /** + * this key can only be used within a specific contract and for a specific document type + * + * @function + */ + interface SingleContractDocumentType extends ContractBounds { + id: Identifier; + document_type_name: string; + } + const SingleContractDocumentType: (data: { + id: Identifier, + document_type_name: string, + }) => ContractBounds.SingleContractDocumentType; +} + +interface CoreScript { + [0]: DashcoreScript; +} +/** @ignore */ +const CoreScript : BinCodeable & (( + f0: DashcoreScript, +) => CoreScript); + +export type Credits = bigint; + +export type DashcoreScript = ScriptBuf; + +/** @ignore */ +export abstract class DataContractConfig { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DataContractConfig): void; + /** @ignore */ + static decode(bc: BinCode): DataContractConfig; + /** @ignore @internal */ + [VARIANTS]: typeof DataContractConfig.variants; + /** @ignore */ + static variants: { + V0: typeof DataContractConfig.V0, + V1: typeof DataContractConfig.V1, + }; +} +namespace DataContractConfig { + /** @function */ + interface V0 extends DataContractConfig { + [0]: DataContractConfigV0; + } + /** @ignore */ + const V0: (f0: DataContractConfigV0) => DataContractConfig.V0; + /** @function */ + interface V1 extends DataContractConfig { + [0]: DataContractConfigV1; + } + /** @ignore */ + const V1: (f0: DataContractConfigV1) => DataContractConfig.V1; +} + +interface DataContractConfigV0 { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: boolean; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: boolean; + /** Does the contract keep history when the contract itself changes */ + keeps_history: boolean; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: boolean; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: boolean; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: boolean; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key?: StorageKeyRequirements; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key?: StorageKeyRequirements; +} +/** @ignore */ +const DataContractConfigV0 : BinCodeable & ((data: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: boolean, + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: boolean, + /** Does the contract keep history when the contract itself changes */ + keeps_history: boolean, + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: boolean, + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: boolean, + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: boolean, + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key?: StorageKeyRequirements, + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key?: StorageKeyRequirements, +}) => DataContractConfigV0); + +interface DataContractConfigV1 { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: boolean; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: boolean; + /** Does the contract keep history when the contract itself changes */ + keeps_history: boolean; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: boolean; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: boolean; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: boolean; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key?: StorageKeyRequirements; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key?: StorageKeyRequirements; + /** Use sized integer Rust types for `integer` property type based on validation rules */ + sized_integer_types: boolean; +} +/** @ignore */ +const DataContractConfigV1 : BinCodeable & ((data: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: boolean, + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: boolean, + /** Does the contract keep history when the contract itself changes */ + keeps_history: boolean, + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: boolean, + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: boolean, + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: boolean, + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key?: StorageKeyRequirements, + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key?: StorageKeyRequirements, + /** Use sized integer Rust types for `integer` property type based on validation rules */ + sized_integer_types: boolean, +}) => DataContractConfigV1); + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_create_state_transition" */ +/** @ignore */ +export abstract class DataContractCreateTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DataContractCreateTransition): void; + /** @ignore */ + static decode(bc: BinCode): DataContractCreateTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DataContractCreateTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DataContractCreateTransition.V0, + }; +} +namespace DataContractCreateTransition { + /** @function */ + interface V0 extends DataContractCreateTransition { + [0]: DataContractCreateTransitionV0; + } + /** @ignore */ + const V0: (f0: DataContractCreateTransitionV0) => DataContractCreateTransition.V0; +} + +/** DataContractCreateTransitionV0 has the same encoding structure */ +interface DataContractCreateTransitionV0 { + data_contract: DataContractInSerializationFormat; + identity_nonce: IdentityNonce; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const DataContractCreateTransitionV0 : BinCodeable & ((data: { + data_contract: DataContractInSerializationFormat, + identity_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => DataContractCreateTransitionV0); + +/** @ignore */ +export abstract class DataContractInSerializationFormat { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DataContractInSerializationFormat): void; + /** @ignore */ + static decode(bc: BinCode): DataContractInSerializationFormat; + /** @ignore @internal */ + [VARIANTS]: typeof DataContractInSerializationFormat.variants; + /** @ignore */ + static variants: { + V0: typeof DataContractInSerializationFormat.V0, + V1: typeof DataContractInSerializationFormat.V1, + }; +} +namespace DataContractInSerializationFormat { + /** @function */ + interface V0 extends DataContractInSerializationFormat { + [0]: DataContractInSerializationFormatV0; + } + /** @ignore */ + const V0: (f0: DataContractInSerializationFormatV0) => DataContractInSerializationFormat.V0; + /** @function */ + interface V1 extends DataContractInSerializationFormat { + [0]: DataContractInSerializationFormatV1; + } + /** @ignore */ + const V1: (f0: DataContractInSerializationFormatV1) => DataContractInSerializationFormat.V1; +} + +interface DataContractInSerializationFormatV0 { + /** A unique identifier for the data contract. */ + id: Identifier; + /** Internal configuration for the contract. */ + config: DataContractConfig; + /** The version of this data contract. */ + version: number; + /** The identifier of the contract owner. */ + owner_id: Identifier; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs?: Map; + /** Document JSON Schemas per type */ + document_schemas: Map; +} +/** @ignore */ +const DataContractInSerializationFormatV0 : BinCodeable & ((data: { + /** A unique identifier for the data contract. */ + id: Identifier, + /** Internal configuration for the contract. */ + config: DataContractConfig, + /** The version of this data contract. */ + version: number, + /** The identifier of the contract owner. */ + owner_id: Identifier, + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs?: Map, + /** Document JSON Schemas per type */ + document_schemas: Map, +}) => DataContractInSerializationFormatV0); + +interface DataContractInSerializationFormatV1 { + /** A unique identifier for the data contract. */ + id: Identifier; + /** Internal configuration for the contract. */ + config: DataContractConfig; + /** The version of this data contract. */ + version: number; + /** The identifier of the contract owner. */ + owner_id: Identifier; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs?: Map; + /** Document JSON Schemas per type */ + document_schemas: Map; + /** The time in milliseconds that the contract was created. */ + created_at?: TimestampMillis; + /** The time in milliseconds that the contract was last updated. */ + updated_at?: TimestampMillis; + /** The block that the document was created. */ + created_at_block_height?: BlockHeight; + /** The block that the contract was last updated */ + updated_at_block_height?: BlockHeight; + /** The epoch at which the contract was created. */ + created_at_epoch?: EpochIndex; + /** The epoch at which the contract was last updated. */ + updated_at_epoch?: EpochIndex; + /** Groups that allow for specific multiparty actions on the contract */ + groups: Map; + /** The tokens on the contract. */ + tokens: Map; + /** The contract's keywords for searching */ + keywords: string[]; + /** The contract's description */ + description?: string; +} +/** @ignore */ +const DataContractInSerializationFormatV1 : BinCodeable & ((data: { + /** A unique identifier for the data contract. */ + id: Identifier, + /** Internal configuration for the contract. */ + config: DataContractConfig, + /** The version of this data contract. */ + version: number, + /** The identifier of the contract owner. */ + owner_id: Identifier, + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs?: Map, + /** Document JSON Schemas per type */ + document_schemas: Map, + /** The time in milliseconds that the contract was created. */ + created_at?: TimestampMillis, + /** The time in milliseconds that the contract was last updated. */ + updated_at?: TimestampMillis, + /** The block that the document was created. */ + created_at_block_height?: BlockHeight, + /** The block that the contract was last updated */ + updated_at_block_height?: BlockHeight, + /** The epoch at which the contract was created. */ + created_at_epoch?: EpochIndex, + /** The epoch at which the contract was last updated. */ + updated_at_epoch?: EpochIndex, + /** Groups that allow for specific multiparty actions on the contract */ + groups: Map, + /** The tokens on the contract. */ + tokens: Map, + /** The contract's keywords for searching */ + keywords: string[], + /** The contract's description */ + description?: string, +}) => DataContractInSerializationFormatV1); + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_update_state_transition" */ +/** @ignore */ +export abstract class DataContractUpdateTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DataContractUpdateTransition): void; + /** @ignore */ + static decode(bc: BinCode): DataContractUpdateTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DataContractUpdateTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DataContractUpdateTransition.V0, + }; +} +namespace DataContractUpdateTransition { + /** @function */ + interface V0 extends DataContractUpdateTransition { + [0]: DataContractUpdateTransitionV0; + } + /** @ignore */ + const V0: (f0: DataContractUpdateTransitionV0) => DataContractUpdateTransition.V0; +} + +interface DataContractUpdateTransitionV0 { + identity_contract_nonce: IdentityNonce; + data_contract: DataContractInSerializationFormat; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const DataContractUpdateTransitionV0 : BinCodeable & ((data: { + identity_contract_nonce: IdentityNonce, + data_contract: DataContractInSerializationFormat, + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => DataContractUpdateTransitionV0); + +export type DefinitionName = string; + +export type DerivationEncryptionKeyIndex = number; + +/** @ignore */ +export abstract class DistributionFunction { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DistributionFunction): void; + /** @ignore */ + static decode(bc: BinCode): DistributionFunction; + /** @ignore @internal */ + [VARIANTS]: typeof DistributionFunction.variants; + /** @ignore */ + static variants: { + FixedAmount: typeof DistributionFunction.FixedAmount, + Random: typeof DistributionFunction.Random, + StepDecreasingAmount: typeof DistributionFunction.StepDecreasingAmount, + Stepwise: typeof DistributionFunction.Stepwise, + Linear: typeof DistributionFunction.Linear, + Polynomial: typeof DistributionFunction.Polynomial, + Exponential: typeof DistributionFunction.Exponential, + Logarithmic: typeof DistributionFunction.Logarithmic, + InvertedLogarithmic: typeof DistributionFunction.InvertedLogarithmic, + }; +} +namespace DistributionFunction { + /** + * Emits a constant (fixed) number of tokens for every period. + * + * # Formula + * For any period `x`, the emitted tokens are: + * + * ```text + * f(x) = n + * ``` + * + * # Use Case + * - When a predictable, unchanging reward is desired. + * - Simplicity and stable emissions. + * + * # Example + * - If `n = 5` tokens per block, then after 3 blocks the total emission is 15 tokens. + * + * @function + */ + interface FixedAmount extends DistributionFunction { + amount: TokenAmount; + } + const FixedAmount: (data: { + amount: TokenAmount, + }) => DistributionFunction.FixedAmount; + /** + * Emits a random number of tokens within a specified range. + * + * # Description + * - This function selects a **random** token emission amount between `min` and `max`. + * - The value is drawn **uniformly** between the bounds. + * - The randomness uses a Pseudo Random Function (PRF) from x. + * + * # Formula + * For any period `x`, the emitted tokens follow: + * + * ```text + * f(x) ∈ [min, max] + * ``` + * + * # Parameters + * - `min`: The **minimum** possible number of tokens emitted. + * - `max`: The **maximum** possible number of tokens emitted. + * + * # Use Cases + * - **Stochastic Rewards**: Introduces randomness into rewards to incentivize unpredictability. + * - **Lottery-Based Systems**: Used for randomized emissions, such as block rewards with probabilistic payouts. + * + * # Example + * Suppose a system emits **between 10 and 100 tokens per period**. + * + * ```text + * Random { min: 10, max: 100 } + * ``` + * + * | Period (x) | Emitted Tokens (Random) | + * |------------|------------------------| + * | 1 | 27 | + * | 2 | 94 | + * | 3 | 63 | + * | 4 | 12 | + * + * - Each period, the function emits a **random number of tokens** between `min = 10` and `max = 100`. + * - Over time, the **average reward trends toward the midpoint** `(min + max) / 2`. + * + * # Constraints + * - **`min` must be ≤ `max`**, otherwise the function is invalid. + * - If `min == max`, this behaves like a `FixedAmount` function with a constant emission. + * + * @function + */ + interface Random extends DistributionFunction { + min: TokenAmount; + max: TokenAmount; + } + const Random: (data: { + min: TokenAmount, + max: TokenAmount, + }) => DistributionFunction.Random; + /** + * Emits tokens that decrease in discrete steps at fixed intervals. + * + * # Formula + * For a given period `x`, the emission is calculated as: + * + * ```text + * f(x) = n * (1 - (decrease_per_interval_numerator / decrease_per_interval_denominator))^((x - s) / step_count) + * ``` + * + * For `x <= s`, `f(x) = n` + * + * # Parameters + * - `step_count`: The number of periods between each step. + * - `decrease_per_interval_numerator` and `decrease_per_interval_denominator`: Define the reduction factor per step. + * - `start_decreasing_offset`: Optional start period offset (e.g., start block or time). If not provided, the contract creation start is used. + * If this is provided before this number we give out the distribution start amount every interval. + * - `max_interval_count`: The maximum amount of intervals there can be. Can be up to 1024. + * !!!Very important!!! -> This will default to 128 is default if not set. + * This means that after 128 cycles we will be distributing trailing_distribution_interval_amount per interval. + * - `distribution_start_amount`: The initial token emission. + * - `trailing_distribution_interval_amount`: The token emission after all decreasing intervals. + * - `min_value`: Optional minimum emission value. + * + * # Use Case + * - Modeling reward systems similar to Bitcoin or Dash Core. + * - Encouraging early participation by providing higher rewards initially. + * + * # Example + * - Bitcoin-style: 50% reduction every 210,000 blocks. + * - Dash-style: Approximately a 7% reduction every 210,000 blocks. + * + * @function + */ + interface StepDecreasingAmount extends DistributionFunction { + step_count: number; + decrease_per_interval_numerator: number; + decrease_per_interval_denominator: number; + start_decreasing_offset?: bigint; + max_interval_count?: number; + distribution_start_amount: TokenAmount; + trailing_distribution_interval_amount: TokenAmount; + min_value?: bigint; + } + const StepDecreasingAmount: (data: { + step_count: number, + decrease_per_interval_numerator: number, + decrease_per_interval_denominator: number, + start_decreasing_offset?: bigint, + max_interval_count?: number, + distribution_start_amount: TokenAmount, + trailing_distribution_interval_amount: TokenAmount, + min_value?: bigint, + }) => DistributionFunction.StepDecreasingAmount; + /** + * Emits tokens in fixed amounts for predefined intervals (steps). + * + * # Details + * - Within each step, the emission remains constant. + * - The keys in the `BTreeMap` represent the starting period for each interval, + * and the corresponding values are the fixed token amounts to emit during that interval. + * - VERY IMPORTANT: the steps are the amount of intervals, not the time or the block count. + * So if you have step 5 with interval 10 using blocks that's 50 blocks. + * + * # Use Case + * - Adjusting rewards at specific milestones or time intervals. + * + * # Example + * - Emit 100 tokens per block for the first 1,000 blocks, then 50 tokens per block thereafter. + * + * @function + */ + interface Stepwise extends DistributionFunction { + [0]: Map; + } + /** @ignore */ + const Stepwise: (f0: Map) => DistributionFunction.Stepwise; + /** + * Emits tokens following a linear function that can increase or decrease over time + * with fractional precision. + * + * # Formula + * The emission at period `x` is given by: + * + * ```text + * f(x) = (a * (x - start_step) / d) + starting_amount + * ``` + * + * # Parameters + * - `a`: The slope numerator; determines the rate of change. + * - `d`: The slope divisor; together with `a` controls the fractional rate. + * - `s`: Optional start period offset. If not set, the contract creation start is assumed. + * - `b`: The initial token emission (offset). + * - `min_value` / `max_value`: Optional bounds to clamp the emission. + * + * # Details + * - If `a > 0`, emissions increase over time. + * - If `a < 0`, emissions decrease over time. + * + * # Behavior + * - **If `a > 0`**, emissions increase linearly over time. + * - **If `a < 0`**, emissions decrease linearly over time. + * - **If `a = 0`**, emissions remain constant at `b`. + * + * # Use Cases + * - **Predictable Inflation or Deflation:** A simple mechanism to adjust token supply dynamically. + * - **Long-Term Incentive Structures:** Ensures steady and measurable growth or reduction of rewards. + * - **Decaying Emissions:** Can be used to gradually taper off token rewards over time. + * - **Sustained Growth Models:** Encourages prolonged engagement by steadily increasing rewards. + * + * # Examples + * + * ## **1️⃣ Increasing Linear Emission (`a > 0`)** + * - Tokens increase by **1 token per block** starting from 10. + * + * ```text + * f(x) = (1 * (x - 0) / 1) + 10 + * ``` + * + * | Block (x) | f(x) (Tokens) | + * |-----------|---------------| + * | 0 | 10 | + * | 1 | 11 | + * | 2 | 12 | + * | 3 | 13 | + * + * **Use Case:** Encourages continued participation by providing increasing rewards over time. + * + * --- + * + * ## **2️⃣ Decreasing Linear Emission (`a < 0`)** + * - Tokens **start at 100 and decrease by 2 per period**. + * + * ```text + * f(x) = (-2 * (x - 0) / 1) + 100 + * ``` + * + * | Block (x) | f(x) (Tokens) | + * |-----------|---------------| + * | 0 | 100 | + * | 1 | 98 | + * | 2 | 96 | + * | 3 | 94 | + * + * **Use Case:** Suitable for deflationary models where rewards need to decrease over time. + * + * --- + * + * ## **3️⃣ Emission with a Delayed Start (`s > 0`)** + * - **No emissions before `x = s`** (e.g., rewards start at block `10`). + * + * ```text + * f(x) = (5 * (x - 10) / 1) + 50 + * ``` + * + * | Block (x) | f(x) (Tokens) | + * |-----------|---------------| + * | 9 | 50 (no change)| + * | 10 | 50 | + * | 11 | 55 | + * | 12 | 60 | + * + * **Use Case:** Useful when rewards should only begin at a specific milestone. + * + * --- + * + * ## **4️⃣ Clamping Emissions with `min_value` and `max_value`** + * - **Start at 50, increase by 2, but never exceed 60.** + * + * ```text + * f(x) = (2 * (x - 0) / 1) + 50 + * ``` + * + * | Block (x) | f(x) (Tokens) | + * |-----------|---------------| + * | 0 | 50 | + * | 1 | 52 | + * | 2 | 54 | + * | 5 | 60 (max cap) | + * + * **Use Case:** Prevents runaway inflation by limiting the emission range. + * + * --- + * + * # Summary + * - **Increasing rewards (`a > 0`)**: Encourages longer participation. + * - **Decreasing rewards (`a < 0`)**: Supports controlled deflation. + * - **Delayed start (`s > 0`)**: Ensures rewards only begin at a specific point. + * - **Clamping (`min_value`, `max_value`)**: Maintains controlled emission boundaries. + * + * @function + */ + interface Linear extends DistributionFunction { + a: bigint; + d: bigint; + start_step?: bigint; + starting_amount: TokenAmount; + min_value?: bigint; + max_value?: bigint; + } + const Linear: (data: { + a: bigint, + d: bigint, + start_step?: bigint, + starting_amount: TokenAmount, + min_value?: bigint, + max_value?: bigint, + }) => DistributionFunction.Linear; + /** + * Emits tokens following a polynomial curve with integer arithmetic. + * + * # Formula + * The emission at period `x` is given by: + * + * ```text + * f(x) = (a * (x - s + o)^(m/n)) / d + b + * ``` + * + * # Parameters + * - `a`: Scaling factor for the polynomial term. + * - `m` and `n`: Together specify the exponent as a rational number (allowing non-integer exponents). + * - `d`: A divisor for scaling. + * - `s`: Optional start period offset. If not provided, the contract creation start is used. + * - `o`: An offset for the polynomial function, this is useful if s is in None, + * - `b`: An offset added to the computed value. + * - `min_value` / `max_value`: Optional bounds to constrain the emission. + * + * # Behavior & Use Cases + * The polynomial function's behavior depends on the values of `a` (scaling factor) and `m` (exponent numerator). + * + * ## **1️⃣ `a > 0`, `m > 0` (Increasing Polynomial Growth)** + * - **Behavior**: Emissions **increase at an accelerating rate** over time. + * - **Use Case**: Suitable for models where incentives start small and grow over time (e.g., boosting late-stage participation). + * - **Example**: + * ```text + * f(x) = (2 * (x - s + o)^2) / d + 10 + * ``` + * - If `s = 0`, `o = 0`, and `d = 1`, then: + * - `f(1) = 12` + * - `f(2) = 18` + * - `f(3) = 28` (Emissions **accelerate over time**) + * + * ## **2️⃣ `a > 0`, `m < 0` (Decreasing Polynomial Decay)** + * - **Behavior**: Emissions **start high and gradually decline**. + * - **Use Case**: Useful for front-loaded incentives where rewards are larger at the beginning and taper off over time. + * - **Example**: + * ```text + * f(x) = (5 * (x - s + o)^(-1)) / d + 10 + * ``` + * - If `s = 0`, `o = 0`, and `d = 1`, then: + * - `f(1) = 15` + * - `f(2) = 12.5` + * - `f(3) = 11.67` (Emissions **shrink but never hit zero**) + * + * ## **3️⃣ `a < 0`, `m > 0` (Inverted Growth → Decreasing Over Time)** + * - **Behavior**: Emissions **start large but decrease faster over time**. + * - **Use Case**: Suitable for cases where high initial incentives quickly drop off (e.g., limited early rewards). + * - **Example**: + * ```text + * f(x) = (-3 * (x - s + o)^2) / d + 50 + * ``` + * - If `s = 0`, `o = 0`, and `d = 1`, then: + * - `f(1) = 47` + * - `f(2) = 38` + * - `f(3) = 23` (Emissions **fall sharply**) + * + * ## **4️⃣ `a < 0`, `m < 0` (Inverted Decay → Slowing Increase)** + * - **Behavior**: Emissions **start low, rise gradually, and then flatten out**. + * - **Use Case**: Useful for controlled inflation where rewards increase over time but approach a stable maximum. + * - **Example**: + * ```text + * f(x) = (-10 * (x - s + o)^(-2)) / d + 50 + * ``` + * - If `s = 0`, `o = 0`, and `d = 1`, then: + * - `f(1) = 40` + * - `f(2) = 47.5` + * - `f(3) = 48.89` (Growth **slows as it approaches 50**) + * + * # Summary + * - **Positive `a` means increasing emissions**, while **negative `a` means decreasing emissions**. + * - **Positive `m` leads to growth**, while **negative `m` leads to decay**. + * - The combination of `a` and `m` defines whether emissions accelerate, decay, or remain stable. + * + * @function + */ + interface Polynomial extends DistributionFunction { + a: bigint; + d: bigint; + m: bigint; + n: bigint; + o: bigint; + start_moment?: bigint; + b: TokenAmount; + min_value?: bigint; + max_value?: bigint; + } + const Polynomial: (data: { + a: bigint, + d: bigint, + m: bigint, + n: bigint, + o: bigint, + start_moment?: bigint, + b: TokenAmount, + min_value?: bigint, + max_value?: bigint, + }) => DistributionFunction.Polynomial; + /** + * Emits tokens following an exponential function. + * + * # Formula + * The emission at period `x` is given by: + * + * ```text + * f(x) = (a * e^(m * (x - s + o) / n)) / d + b + * ``` + * + * # Parameters + * - `a`: The scaling factor. + * - `m` and `n`: Define the exponent rate (with `m > 0` for growth and `m < 0` for decay). + * - `d`: A divisor used to scale the exponential term. + * - `s`: Optional start period offset. If not set, the contract creation start is assumed. + * - `o`: An offset for the exp function, this is useful if s is in None. + * - `b`: An offset added to the result. + * - `min_value` / `max_value`: Optional constraints on the emitted tokens. + * + * # Use Cases + * ## **Exponential Growth (`m > 0`):** + * - **Incentivized Spending**: Higher emissions over time increase the circulating supply, encouraging users to spend tokens. + * - **Progressive Emission Models**: Useful for models where early emissions are low but increase significantly over time. + * - **Early-Stage Adoption Strategies**: Helps drive later participation by offering increasing rewards as time progresses. + * + * ## **Exponential Decay (`m < 0`):** + * - **Deflationary Reward Models**: Reduces emissions over time, ensuring token scarcity. + * - **Early Participation Incentives**: Encourages early users by distributing more tokens initially and gradually decreasing rewards. + * - **Sustainable Emission Models**: Helps manage token supply while preventing runaway inflation. + * + * # Examples + * ## **Example 1: Exponential Growth (`m > 0`)** + * - **Use Case**: A staking model where rewards increase over time to encourage long-term participation. + * - **Parameters**: `a = 100`, `m = 2`, `n = 50`, `d = 10`, `c = 5` + * - **Formula**: + * ```text + * f(x) = (100 * e^(2 * (x - s) / 50)) / 10 + 5 + * ``` + * - **Effect**: Emissions start small but **increase exponentially** over time, rewarding late stakers more than early ones. + * + * ## **Example 2: Exponential Decay (`m < 0`)** + * - **Use Case**: A deflationary model where emissions start high and gradually decrease to ensure scarcity. + * - **Parameters**: `a = 500`, `m = -3`, `n = 100`, `d = 20`, `b = 10` + * - **Formula**: + * ```text + * f(x) = (500 * e^(-3 * (x - s) / 100)) / 20 + 10 + * ``` + * - **Effect**: Emissions start **high and decay exponentially**, ensuring early participants get larger rewards. + * + * @function + */ + interface Exponential extends DistributionFunction { + a: bigint; + d: bigint; + m: bigint; + n: bigint; + o: bigint; + start_moment?: bigint; + b: TokenAmount; + min_value?: bigint; + max_value?: bigint; + } + const Exponential: (data: { + a: bigint, + d: bigint, + m: bigint, + n: bigint, + o: bigint, + start_moment?: bigint, + b: TokenAmount, + min_value?: bigint, + max_value?: bigint, + }) => DistributionFunction.Exponential; + /** + * Emits tokens following a natural logarithmic (ln) function. + * + * # Formula + * The emission at period `x` is computed as: + * + * ```text + * f(x) = (a * ln(m * (x - s + o) / n)) / d + b + * ``` + * + * # Parameters + * - `a`: Scaling factor for the logarithmic term. + * - `d`: A divisor for scaling. + * - `m` and `n`: Adjust the input to the logarithm function. + * - `s`: Optional start period offset. If not provided, the contract creation start is used. + * - `o`: An offset for the log function, this is useful if s is in None. + * - `b`: An offset added to the result. + * - `min_value` / `max_value`: Optional bounds to ensure the emission remains within limits. + * + * # Use Case + * - **Gradual Growth with a Slowing Rate**: Suitable for reward schedules where the emission + * starts at a lower rate, increases quickly at first, but then slows down over time. + * - **Predictable Emission Scaling**: Ensures a growing but controlled emission curve that + * does not escalate too quickly. + * - **Sustainability and Inflation Control**: Helps prevent runaway token supply growth + * by ensuring rewards increase at a decreasing rate. + * + * # Example + * - Suppose we want token emissions to start at a low value and grow over time, but at a + * **decreasing rate**, ensuring controlled long-term growth. + * + * - Given the formula: + * ```text + * f(x) = (a * ln(m * (x - s + o) / n)) / d + b + * ``` + * + * - Let’s assume the following parameters: + * - `a = 100`: Scaling factor. + * - `d = 10`: Divisor to control overall scaling. + * - `m = 2`, `n = 1`: Adjust the logarithmic input. + * - `s = 0`, `o = 1`: Starting conditions. + * - `b = 50`: Base amount added. + * + * - This results in: + * ```text + * f(x) = (100 * ln(2 * (x + 1) / 1)) / 10 + 50 + * ``` + * + * - **Expected Behavior:** + * - At `x = 1`, emission = `f(1) = (100 * log(4)) / 10 + 50 ≈ 82` + * - At `x = 10`, emission = `f(10) = (100 * log(22)) / 10 + 50 ≈ 106` + * - At `x = 100`, emission = `f(100) = (100 * log(202)) / 10 + 50 ≈ 130` + * + * - **Observations:** + * - The emission **increases** over time, but at a **slowing rate**. + * - Early increases are more pronounced, but as `x` grows, the additional reward per + * period gets smaller. + * - This makes it ideal for long-term, controlled emission models. + * + * @function + */ + interface Logarithmic extends DistributionFunction { + a: bigint; + d: bigint; + m: bigint; + n: bigint; + o: bigint; + start_moment?: bigint; + b: TokenAmount; + min_value?: bigint; + max_value?: bigint; + } + const Logarithmic: (data: { + a: bigint, + d: bigint, + m: bigint, + n: bigint, + o: bigint, + start_moment?: bigint, + b: TokenAmount, + min_value?: bigint, + max_value?: bigint, + }) => DistributionFunction.Logarithmic; + /** + * Emits tokens following an inverted natural logarithmic function. + * + * # Formula + * The emission at period `x` is given by: + * + * ```text + * f(x) = (a * ln( n / (m * (x - s + o)) )) / d + b + * ``` + * + * # Parameters + * - `a`: Scaling factor. + * - `d`: Divisor for scaling. + * - `m` and `n`: Together control the logarithm argument inversion. + * - `o`: Offset applied inside the logarithm. + * - `s`: Optional start period offset. + * - `b`: Offset added to the computed value. + * - `min_value` / `max_value`: Optional boundaries for the emission. + * + * # Use Case + * - **Gradual Decay of Rewards**: Suitable when early adopters should receive higher rewards, + * but later participants should receive smaller but still meaningful amounts. + * - **Resource Draining / Controlled Burn**: Used when token emissions should drop significantly + * at first but slow down over time to preserve capital. + * - **Airdrop or Grant System**: Ensures early claimants receive larger distributions, but later + * claimants receive diminishing rewards. + * + * # Example + * ```text + * f(x) = 10000 * ln(5000 / x) + * ``` + * - Values: a = 10000 n = 5000 m = 1 o = 0 b = 0 d = 0 + * y + * ↑ + * 10000 |* + * 9000 | * + * 8000 | * + * 7000 | * + * 6000 | * + * 5000 | * + * 4000 | * + * 3000 | * + * 2000 | * + * 1000 | * + * 0 +-------------------*----------→ x + * 0 2000 4000 6000 8000 + * + * - The emission **starts high** and **gradually decreases**, ensuring early adopters receive + * more tokens while later participants still get rewards. + * - The function **slows down the rate of decrease** over time, preventing emissions from + * hitting zero too quickly. + * + * @function + */ + interface InvertedLogarithmic extends DistributionFunction { + a: bigint; + d: bigint; + m: bigint; + n: bigint; + o: bigint; + start_moment?: bigint; + b: TokenAmount; + min_value?: bigint; + max_value?: bigint; + } + const InvertedLogarithmic: (data: { + a: bigint, + d: bigint, + m: bigint, + n: bigint, + o: bigint, + start_moment?: bigint, + b: TokenAmount, + min_value?: bigint, + max_value?: bigint, + }) => DistributionFunction.InvertedLogarithmic; +} + +/** @ignore */ +export abstract class DocumentBaseTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentBaseTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentBaseTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentBaseTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentBaseTransition.V0, + V1: typeof DocumentBaseTransition.V1, + }; +} +namespace DocumentBaseTransition { + /** @function */ + interface V0 extends DocumentBaseTransition { + [0]: DocumentBaseTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentBaseTransitionV0) => DocumentBaseTransition.V0; + /** @function */ + interface V1 extends DocumentBaseTransition { + [0]: DocumentBaseTransitionV1; + } + /** @ignore */ + const V1: (f0: DocumentBaseTransitionV1) => DocumentBaseTransition.V1; +} + +interface DocumentBaseTransitionV0 { + /** The document ID */ + id: Identifier; + identity_contract_nonce: IdentityNonce; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: string; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier; +} +/** @ignore */ +const DocumentBaseTransitionV0 : BinCodeable & ((data: { + /** The document ID */ + id: Identifier, + identity_contract_nonce: IdentityNonce, + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: string, + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier, +}) => DocumentBaseTransitionV0); + +interface DocumentBaseTransitionV1 { + /** The document ID */ + id: Identifier; + identity_contract_nonce: IdentityNonce; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: string; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier; + /** An optional Token Payment Info */ + token_payment_info?: TokenPaymentInfo; +} +/** @ignore */ +const DocumentBaseTransitionV1 : BinCodeable & ((data: { + /** The document ID */ + id: Identifier, + identity_contract_nonce: IdentityNonce, + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: string, + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier, + /** An optional Token Payment Info */ + token_payment_info?: TokenPaymentInfo, +}) => DocumentBaseTransitionV1); + +/** @ignore */ +export abstract class DocumentCreateTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentCreateTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentCreateTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentCreateTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentCreateTransition.V0, + }; +} +namespace DocumentCreateTransition { + /** @function */ + interface V0 extends DocumentCreateTransition { + [0]: DocumentCreateTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentCreateTransitionV0) => DocumentCreateTransition.V0; +} + +interface DocumentCreateTransitionV0 { + /** Document Base Transition */ + base: DocumentBaseTransition; + /** Entropy used to create a Document ID. */ + entropy: FixedBytes<32>; + data: Map; + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance?: [string, Credits]; +} +/** @ignore */ +const DocumentCreateTransitionV0 : BinCodeable & ((data: { + /** Document Base Transition */ + base: DocumentBaseTransition, + /** Entropy used to create a Document ID. */ + entropy: FixedBytes<32>, + data: Map, + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance?: [string, Credits], +}) => DocumentCreateTransitionV0); + +/** @ignore */ +export abstract class DocumentDeleteTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentDeleteTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentDeleteTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentDeleteTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentDeleteTransition.V0, + }; +} +namespace DocumentDeleteTransition { + /** @function */ + interface V0 extends DocumentDeleteTransition { + [0]: DocumentDeleteTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentDeleteTransitionV0) => DocumentDeleteTransition.V0; +} + +interface DocumentDeleteTransitionV0 { + base: DocumentBaseTransition; +} +/** @ignore */ +const DocumentDeleteTransitionV0 : BinCodeable & ((data: { + base: DocumentBaseTransition, +}) => DocumentDeleteTransitionV0); + +export type DocumentName = string; + +/** @ignore */ +export abstract class DocumentPurchaseTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentPurchaseTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentPurchaseTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentPurchaseTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentPurchaseTransition.V0, + }; +} +namespace DocumentPurchaseTransition { + /** @function */ + interface V0 extends DocumentPurchaseTransition { + [0]: DocumentPurchaseTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentPurchaseTransitionV0) => DocumentPurchaseTransition.V0; +} + +interface DocumentPurchaseTransitionV0 { + base: DocumentBaseTransition; + revision: Revision; + price: Credits; +} +/** @ignore */ +const DocumentPurchaseTransitionV0 : BinCodeable & ((data: { + base: DocumentBaseTransition, + revision: Revision, + price: Credits, +}) => DocumentPurchaseTransitionV0); + +/** @ignore */ +export abstract class DocumentReplaceTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentReplaceTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentReplaceTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentReplaceTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentReplaceTransition.V0, + }; +} +namespace DocumentReplaceTransition { + /** @function */ + interface V0 extends DocumentReplaceTransition { + [0]: DocumentReplaceTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentReplaceTransitionV0) => DocumentReplaceTransition.V0; +} + +interface DocumentReplaceTransitionV0 { + base: DocumentBaseTransition; + revision: Revision; + data: Map; +} +/** @ignore */ +const DocumentReplaceTransitionV0 : BinCodeable & ((data: { + base: DocumentBaseTransition, + revision: Revision, + data: Map, +}) => DocumentReplaceTransitionV0); + +/** @ignore */ +export abstract class DocumentTransferTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentTransferTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentTransferTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentTransferTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentTransferTransition.V0, + }; +} +namespace DocumentTransferTransition { + /** @function */ + interface V0 extends DocumentTransferTransition { + [0]: DocumentTransferTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentTransferTransitionV0) => DocumentTransferTransition.V0; +} + +interface DocumentTransferTransitionV0 { + base: DocumentBaseTransition; + revision: Revision; + recipient_owner_id: Identifier; +} +/** @ignore */ +const DocumentTransferTransitionV0 : BinCodeable & ((data: { + base: DocumentBaseTransition, + revision: Revision, + recipient_owner_id: Identifier, +}) => DocumentTransferTransitionV0); + +/** @ignore */ +export abstract class DocumentTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentTransition.variants; + /** @ignore */ + static variants: { + Create: typeof DocumentTransition.Create, + Replace: typeof DocumentTransition.Replace, + Delete: typeof DocumentTransition.Delete, + Transfer: typeof DocumentTransition.Transfer, + UpdatePrice: typeof DocumentTransition.UpdatePrice, + Purchase: typeof DocumentTransition.Purchase, + }; +} +namespace DocumentTransition { + /** @function */ + interface Create extends DocumentTransition { + [0]: DocumentCreateTransition; + } + /** @ignore */ + const Create: (f0: DocumentCreateTransition) => DocumentTransition.Create; + /** @function */ + interface Replace extends DocumentTransition { + [0]: DocumentReplaceTransition; + } + /** @ignore */ + const Replace: (f0: DocumentReplaceTransition) => DocumentTransition.Replace; + /** @function */ + interface Delete extends DocumentTransition { + [0]: DocumentDeleteTransition; + } + /** @ignore */ + const Delete: (f0: DocumentDeleteTransition) => DocumentTransition.Delete; + /** @function */ + interface Transfer extends DocumentTransition { + [0]: DocumentTransferTransition; + } + /** @ignore */ + const Transfer: (f0: DocumentTransferTransition) => DocumentTransition.Transfer; + /** @function */ + interface UpdatePrice extends DocumentTransition { + [0]: DocumentUpdatePriceTransition; + } + /** @ignore */ + const UpdatePrice: (f0: DocumentUpdatePriceTransition) => DocumentTransition.UpdatePrice; + /** @function */ + interface Purchase extends DocumentTransition { + [0]: DocumentPurchaseTransition; + } + /** @ignore */ + const Purchase: (f0: DocumentPurchaseTransition) => DocumentTransition.Purchase; +} + +/** @ignore */ +export abstract class DocumentUpdatePriceTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: DocumentUpdatePriceTransition): void; + /** @ignore */ + static decode(bc: BinCode): DocumentUpdatePriceTransition; + /** @ignore @internal */ + [VARIANTS]: typeof DocumentUpdatePriceTransition.variants; + /** @ignore */ + static variants: { + V0: typeof DocumentUpdatePriceTransition.V0, + }; +} +namespace DocumentUpdatePriceTransition { + /** @function */ + interface V0 extends DocumentUpdatePriceTransition { + [0]: DocumentUpdatePriceTransitionV0; + } + /** @ignore */ + const V0: (f0: DocumentUpdatePriceTransitionV0) => DocumentUpdatePriceTransition.V0; +} + +interface DocumentUpdatePriceTransitionV0 { + base: DocumentBaseTransition; + revision: Revision; + price: Credits; +} +/** @ignore */ +const DocumentUpdatePriceTransitionV0 : BinCodeable & ((data: { + base: DocumentBaseTransition, + revision: Revision, + price: Credits, +}) => DocumentUpdatePriceTransitionV0); + +export type EpochIndex = number; + +export type EpochInterval = number; + +/** @ignore */ +export abstract class GasFeesPaidBy { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: GasFeesPaidBy): void; + /** @ignore */ + static decode(bc: BinCode): GasFeesPaidBy; + /** @ignore @internal */ + [VARIANTS]: typeof GasFeesPaidBy.variants; + /** @ignore */ + static variants: { + DocumentOwner: typeof GasFeesPaidBy.DocumentOwner, + ContractOwner: typeof GasFeesPaidBy.ContractOwner, + PreferContractOwner: typeof GasFeesPaidBy.PreferContractOwner, + }; +} +namespace GasFeesPaidBy { + /** + * The user pays the gas fees + * default + */ + const DocumentOwner: () => GasFeesPaidBy; + /** The contract owner pays the gas fees */ + const ContractOwner: () => GasFeesPaidBy; + /** + * The user is stating his willingness to pay the gas fee if the Contract owner's balance is + * insufficient. + */ + const PreferContractOwner: () => GasFeesPaidBy; +} + +/** @ignore */ +export abstract class Group { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: Group): void; + /** @ignore */ + static decode(bc: BinCode): Group; + /** @ignore @internal */ + [VARIANTS]: typeof Group.variants; + /** @ignore */ + static variants: { + V0: typeof Group.V0, + }; +} +namespace Group { + /** @function */ + interface V0 extends Group { + [0]: GroupV0; + } + /** @ignore */ + const V0: (f0: GroupV0) => Group.V0; +} + +export type GroupContractPosition = number; + +export type GroupMemberPower = number; + +export type GroupRequiredPower = number; + +interface GroupStateTransitionInfo { + group_contract_position: GroupContractPosition; + action_id: Identifier; + /** This is true if we are the proposer, otherwise we are just voting on a previous action. */ + action_is_proposer: boolean; +} +/** @ignore */ +const GroupStateTransitionInfo : BinCodeable & ((data: { + group_contract_position: GroupContractPosition, + action_id: Identifier, + /** This is true if we are the proposer, otherwise we are just voting on a previous action. */ + action_is_proposer: boolean, +}) => GroupStateTransitionInfo); + +interface GroupV0 { + members: Map; + required_power: GroupRequiredPower; +} +/** @ignore */ +const GroupV0 : BinCodeable & ((data: { + members: Map, + required_power: GroupRequiredPower, +}) => GroupV0); + +export type Hash256 = FixedBytes<32>; + +interface Identifier { + [0]: IdentifierBytes32; +} +/** @ignore */ +const Identifier : BinCodeable & (( + f0: IdentifierBytes32, +) => Identifier); + +interface IdentifierBytes32 { + [0]: FixedBytes<32>; +} +/** @ignore */ +const IdentifierBytes32 : BinCodeable & (( + f0: FixedBytes<32>, +) => IdentifierBytes32); + +/** + * The identity is not stored inside of drive, because of this, the serialization is mainly for + * transport, the serialization of the identity will include the version, so no passthrough or + * untagged is needed here + */ +/** @ignore */ +export abstract class Identity { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: Identity): void; + /** @ignore */ + static decode(bc: BinCode): Identity; + /** @ignore @internal */ + [VARIANTS]: typeof Identity.variants; + /** @ignore */ + static variants: { + V0: typeof Identity.V0, + }; +} +namespace Identity { + /** @function */ + interface V0 extends Identity { + [0]: IdentityV0; + } + /** @ignore */ + const V0: (f0: IdentityV0) => Identity.V0; +} + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_create_state_transition" */ +/** @ignore */ +export abstract class IdentityCreateTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: IdentityCreateTransition): void; + /** @ignore */ + static decode(bc: BinCode): IdentityCreateTransition; + /** @ignore @internal */ + [VARIANTS]: typeof IdentityCreateTransition.variants; + /** @ignore */ + static variants: { + V0: typeof IdentityCreateTransition.V0, + }; +} +namespace IdentityCreateTransition { + /** @function */ + interface V0 extends IdentityCreateTransition { + [0]: IdentityCreateTransitionV0; + } + /** @ignore */ + const V0: (f0: IdentityCreateTransitionV0) => IdentityCreateTransition.V0; +} + +/** platform_signable derive_bincode_with_borrowed_vec */ +interface IdentityCreateTransitionV0 { + /** platform_signable into = "Vec" */ + public_keys: IdentityPublicKeyInCreation[]; + asset_lock_proof: AssetLockProof; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; + /** platform_signable exclude_from_sig_hash */ + identity_id: Identifier; +} +/** @ignore */ +const IdentityCreateTransitionV0 : BinCodeable & ((data: { + /** platform_signable into = "Vec" */ + public_keys: IdentityPublicKeyInCreation[], + asset_lock_proof: AssetLockProof, + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, + /** platform_signable exclude_from_sig_hash */ + identity_id: Identifier, +}) => IdentityCreateTransitionV0); + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_credit_transfer_state_transition" */ +/** @ignore */ +export abstract class IdentityCreditTransferTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: IdentityCreditTransferTransition): void; + /** @ignore */ + static decode(bc: BinCode): IdentityCreditTransferTransition; + /** @ignore @internal */ + [VARIANTS]: typeof IdentityCreditTransferTransition.variants; + /** @ignore */ + static variants: { + V0: typeof IdentityCreditTransferTransition.V0, + }; +} +namespace IdentityCreditTransferTransition { + /** @function */ + interface V0 extends IdentityCreditTransferTransition { + [0]: IdentityCreditTransferTransitionV0; + } + /** @ignore */ + const V0: (f0: IdentityCreditTransferTransitionV0) => IdentityCreditTransferTransition.V0; +} + +interface IdentityCreditTransferTransitionV0 { + identity_id: Identifier; + recipient_id: Identifier; + amount: bigint; + nonce: IdentityNonce; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const IdentityCreditTransferTransitionV0 : BinCodeable & ((data: { + identity_id: Identifier, + recipient_id: Identifier, + amount: bigint, + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => IdentityCreditTransferTransitionV0); + +/** platform_version_path "dpp.state_transition_serialization_versions.identity_credit_withdrawal_state_transition" */ +/** @ignore */ +export abstract class IdentityCreditWithdrawalTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: IdentityCreditWithdrawalTransition): void; + /** @ignore */ + static decode(bc: BinCode): IdentityCreditWithdrawalTransition; + /** @ignore @internal */ + [VARIANTS]: typeof IdentityCreditWithdrawalTransition.variants; + /** @ignore */ + static variants: { + V0: typeof IdentityCreditWithdrawalTransition.V0, + V1: typeof IdentityCreditWithdrawalTransition.V1, + }; +} +namespace IdentityCreditWithdrawalTransition { + /** @function */ + interface V0 extends IdentityCreditWithdrawalTransition { + [0]: IdentityCreditWithdrawalTransitionV0; + } + /** @ignore */ + const V0: (f0: IdentityCreditWithdrawalTransitionV0) => IdentityCreditWithdrawalTransition.V0; + /** @function */ + interface V1 extends IdentityCreditWithdrawalTransition { + [0]: IdentityCreditWithdrawalTransitionV1; + } + /** @ignore */ + const V1: (f0: IdentityCreditWithdrawalTransitionV1) => IdentityCreditWithdrawalTransition.V1; +} + +interface IdentityCreditWithdrawalTransitionV0 { + identity_id: Identifier; + amount: bigint; + core_fee_per_byte: number; + pooling: Pooling; + output_script: CoreScript; + nonce: IdentityNonce; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const IdentityCreditWithdrawalTransitionV0 : BinCodeable & ((data: { + identity_id: Identifier, + amount: bigint, + core_fee_per_byte: number, + pooling: Pooling, + output_script: CoreScript, + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => IdentityCreditWithdrawalTransitionV0); + +interface IdentityCreditWithdrawalTransitionV1 { + identity_id: Identifier; + amount: bigint; + core_fee_per_byte: number; + pooling: Pooling; + /** If the send to output script is None, then we send the withdrawal to the address set by core */ + output_script?: CoreScript; + nonce: IdentityNonce; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const IdentityCreditWithdrawalTransitionV1 : BinCodeable & ((data: { + identity_id: Identifier, + amount: bigint, + core_fee_per_byte: number, + pooling: Pooling, + /** If the send to output script is None, then we send the withdrawal to the address set by core */ + output_script?: CoreScript, + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => IdentityCreditWithdrawalTransitionV1); + +export type IdentityNonce = bigint; + +/** @ignore */ +export abstract class IdentityPublicKey { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: IdentityPublicKey): void; + /** @ignore */ + static decode(bc: BinCode): IdentityPublicKey; + /** @ignore @internal */ + [VARIANTS]: typeof IdentityPublicKey.variants; + /** @ignore */ + static variants: { + V0: typeof IdentityPublicKey.V0, + }; +} +namespace IdentityPublicKey { + /** @function */ + interface V0 extends IdentityPublicKey { + [0]: IdentityPublicKeyV0; + } + /** @ignore */ + const V0: (f0: IdentityPublicKeyV0) => IdentityPublicKey.V0; +} + +/** platform_signable derive_into */ +/** @ignore */ +export abstract class IdentityPublicKeyInCreation { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: IdentityPublicKeyInCreation): void; + /** @ignore */ + static decode(bc: BinCode): IdentityPublicKeyInCreation; + /** @ignore @internal */ + [VARIANTS]: typeof IdentityPublicKeyInCreation.variants; + /** @ignore */ + static variants: { + V0: typeof IdentityPublicKeyInCreation.V0, + }; +} +namespace IdentityPublicKeyInCreation { + /** @function */ + interface V0 extends IdentityPublicKeyInCreation { + [0]: IdentityPublicKeyInCreationV0; + } + /** @ignore */ + const V0: (f0: IdentityPublicKeyInCreationV0) => IdentityPublicKeyInCreation.V0; +} + +interface IdentityPublicKeyInCreationV0 { + id: KeyID; + key_type: KeyType; + purpose: Purpose; + security_level: SecurityLevel; + contract_bounds?: ContractBounds; + read_only: boolean; + data: BinaryData; + /** + * The signature is needed for ECDSA_SECP256K1 Key type and BLS12_381 Key type + * platform_signable exclude_from_sig_hash + */ + signature: BinaryData; +} +/** @ignore */ +const IdentityPublicKeyInCreationV0 : BinCodeable & ((data: { + id: KeyID, + key_type: KeyType, + purpose: Purpose, + security_level: SecurityLevel, + contract_bounds?: ContractBounds, + read_only: boolean, + data: BinaryData, + /** + * The signature is needed for ECDSA_SECP256K1 Key type and BLS12_381 Key type + * platform_signable exclude_from_sig_hash + */ + signature: BinaryData, +}) => IdentityPublicKeyInCreationV0); + +interface IdentityPublicKeyV0 { + id: KeyID; + purpose: Purpose; + security_level: SecurityLevel; + contract_bounds?: ContractBounds; + key_type: KeyType; + read_only: boolean; + data: BinaryData; + disabled_at?: TimestampMillis; +} +/** @ignore */ +const IdentityPublicKeyV0 : BinCodeable & ((data: { + id: KeyID, + purpose: Purpose, + security_level: SecurityLevel, + contract_bounds?: ContractBounds, + key_type: KeyType, + read_only: boolean, + data: BinaryData, + disabled_at?: TimestampMillis, +}) => IdentityPublicKeyV0); + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_top_up_state_transition" */ +/** @ignore */ +export abstract class IdentityTopUpTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: IdentityTopUpTransition): void; + /** @ignore */ + static decode(bc: BinCode): IdentityTopUpTransition; + /** @ignore @internal */ + [VARIANTS]: typeof IdentityTopUpTransition.variants; + /** @ignore */ + static variants: { + V0: typeof IdentityTopUpTransition.V0, + }; +} +namespace IdentityTopUpTransition { + /** @function */ + interface V0 extends IdentityTopUpTransition { + [0]: IdentityTopUpTransitionV0; + } + /** @ignore */ + const V0: (f0: IdentityTopUpTransitionV0) => IdentityTopUpTransition.V0; +} + +interface IdentityTopUpTransitionV0 { + asset_lock_proof: AssetLockProof; + identity_id: Identifier; + user_fee_increase: UserFeeIncrease; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const IdentityTopUpTransitionV0 : BinCodeable & ((data: { + asset_lock_proof: AssetLockProof, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => IdentityTopUpTransitionV0); + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_update_state_transition" */ +/** @ignore */ +export abstract class IdentityUpdateTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: IdentityUpdateTransition): void; + /** @ignore */ + static decode(bc: BinCode): IdentityUpdateTransition; + /** @ignore @internal */ + [VARIANTS]: typeof IdentityUpdateTransition.variants; + /** @ignore */ + static variants: { + V0: typeof IdentityUpdateTransition.V0, + }; +} +namespace IdentityUpdateTransition { + /** @function */ + interface V0 extends IdentityUpdateTransition { + [0]: IdentityUpdateTransitionV0; + } + /** @ignore */ + const V0: (f0: IdentityUpdateTransitionV0) => IdentityUpdateTransition.V0; +} + +/** platform_signable derive_bincode_with_borrowed_vec */ +interface IdentityUpdateTransitionV0 { + /** Unique identifier of the identity to be updated */ + identity_id: Identifier; + /** The revision of the identity after update */ + revision: Revision; + /** Identity nonce for this transition to prevent replay attacks */ + nonce: IdentityNonce; + /** + * Public Keys to add to the Identity + * we want to skip serialization of transitions, as we does it manually in `to_object()` and `to_json()` + * platform_signable into = "Vec" + */ + add_public_keys: IdentityPublicKeyInCreation[]; + /** Identity Public Keys ID's to disable for the Identity */ + disable_public_keys: KeyID[]; + /** The fee multiplier */ + user_fee_increase: UserFeeIncrease; + /** + * The ID of the public key used to sing the State Transition + * platform_signable exclude_from_sig_hash + */ + signature_public_key_id: KeyID; + /** + * Cryptographic signature of the State Transition + * platform_signable exclude_from_sig_hash + */ + signature: BinaryData; +} +/** @ignore */ +const IdentityUpdateTransitionV0 : BinCodeable & ((data: { + /** Unique identifier of the identity to be updated */ + identity_id: Identifier, + /** The revision of the identity after update */ + revision: Revision, + /** Identity nonce for this transition to prevent replay attacks */ + nonce: IdentityNonce, + /** + * Public Keys to add to the Identity + * we want to skip serialization of transitions, as we does it manually in `to_object()` and `to_json()` + * platform_signable into = "Vec" + */ + add_public_keys: IdentityPublicKeyInCreation[], + /** Identity Public Keys ID's to disable for the Identity */ + disable_public_keys: KeyID[], + /** The fee multiplier */ + user_fee_increase: UserFeeIncrease, + /** + * The ID of the public key used to sing the State Transition + * platform_signable exclude_from_sig_hash + */ + signature_public_key_id: KeyID, + /** + * Cryptographic signature of the State Transition + * platform_signable exclude_from_sig_hash + */ + signature: BinaryData, +}) => IdentityUpdateTransitionV0); + +/** + * Implement the Identity. Identity is a low-level construct that provides the foundation + * for user-facing functionality on the platform + */ +interface IdentityV0 { + id: Identifier; + public_keys: Map; + balance: bigint; + revision: Revision; +} +/** @ignore */ +const IdentityV0 : BinCodeable & ((data: { + id: Identifier, + public_keys: Map, + balance: bigint, + revision: Revision, +}) => IdentityV0); + +/** A hash of all transaction inputs */ +interface InputsHash { + [0]: Hash; +} +/** @ignore */ +const InputsHash : BinCodeable & (( + f0: Hash, +) => InputsHash); + +export type InstantAssetLockProof = RawInstantLockProof; + +export type KeyID = number; + +/** + * allow non_camel_case_types + * repr u8 + */ +/** @ignore */ +export abstract class KeyType { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: KeyType): void; + /** @ignore */ + static decode(bc: BinCode): KeyType; + /** @ignore @internal */ + [VARIANTS]: typeof KeyType.variants; + /** @ignore */ + static variants: { + ECDSA_SECP256K1: typeof KeyType.ECDSA_SECP256K1, + BLS12_381: typeof KeyType.BLS12_381, + ECDSA_HASH160: typeof KeyType.ECDSA_HASH160, + BIP13_SCRIPT_HASH: typeof KeyType.BIP13_SCRIPT_HASH, + EDDSA_25519_HASH160: typeof KeyType.EDDSA_25519_HASH160, + }; +} +namespace KeyType { + /** default */ + const ECDSA_SECP256K1: () => KeyType; + const BLS12_381: () => KeyType; + const ECDSA_HASH160: () => KeyType; + const BIP13_SCRIPT_HASH: () => KeyType; + const EDDSA_25519_HASH160: () => KeyType; +} + +/** @ignore */ +export abstract class LLMQType { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: LLMQType): void; + /** @ignore */ + static decode(bc: BinCode): LLMQType; + /** @ignore @internal */ + [VARIANTS]: typeof LLMQType.variants; + /** @ignore */ + static variants: { + LlmqtypeUnknown: typeof LLMQType.LlmqtypeUnknown, + Llmqtype50_60: typeof LLMQType.Llmqtype50_60, + Llmqtype400_60: typeof LLMQType.Llmqtype400_60, + Llmqtype400_85: typeof LLMQType.Llmqtype400_85, + Llmqtype100_67: typeof LLMQType.Llmqtype100_67, + Llmqtype60_75: typeof LLMQType.Llmqtype60_75, + Llmqtype25_67: typeof LLMQType.Llmqtype25_67, + LlmqtypeTest: typeof LLMQType.LlmqtypeTest, + LlmqtypeDevnet: typeof LLMQType.LlmqtypeDevnet, + LlmqtypeTestV17: typeof LLMQType.LlmqtypeTestV17, + LlmqtypeTestDIP0024: typeof LLMQType.LlmqtypeTestDIP0024, + LlmqtypeTestInstantSend: typeof LLMQType.LlmqtypeTestInstantSend, + LlmqtypeDevnetDIP0024: typeof LLMQType.LlmqtypeDevnetDIP0024, + LlmqtypeTestnetPlatform: typeof LLMQType.LlmqtypeTestnetPlatform, + LlmqtypeDevnetPlatform: typeof LLMQType.LlmqtypeDevnetPlatform, + }; +} +namespace LLMQType { + const LlmqtypeUnknown: () => LLMQType; + const Llmqtype50_60: () => LLMQType; + const Llmqtype400_60: () => LLMQType; + const Llmqtype400_85: () => LLMQType; + const Llmqtype100_67: () => LLMQType; + const Llmqtype60_75: () => LLMQType; + const Llmqtype25_67: () => LLMQType; + const LlmqtypeTest: () => LLMQType; + const LlmqtypeDevnet: () => LLMQType; + const LlmqtypeTestV17: () => LLMQType; + const LlmqtypeTestDIP0024: () => LLMQType; + const LlmqtypeTestInstantSend: () => LLMQType; + const LlmqtypeDevnetDIP0024: () => LLMQType; + const LlmqtypeTestnetPlatform: () => LLMQType; + const LlmqtypeDevnetPlatform: () => LLMQType; +} + +/** platform_version_path_bounds "dpp.state_transition_serialization_versions.masternode_vote_state_transition" */ +/** @ignore */ +export abstract class MasternodeVoteTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: MasternodeVoteTransition): void; + /** @ignore */ + static decode(bc: BinCode): MasternodeVoteTransition; + /** @ignore @internal */ + [VARIANTS]: typeof MasternodeVoteTransition.variants; + /** @ignore */ + static variants: { + V0: typeof MasternodeVoteTransition.V0, + }; +} +namespace MasternodeVoteTransition { + /** @function */ + interface V0 extends MasternodeVoteTransition { + [0]: MasternodeVoteTransitionV0; + } + /** @ignore */ + const V0: (f0: MasternodeVoteTransitionV0) => MasternodeVoteTransition.V0; +} + +interface MasternodeVoteTransitionV0 { + pro_tx_hash: Identifier; + voter_identity_id: Identifier; + vote: Vote; + nonce: IdentityNonce; + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID; + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData; +} +/** @ignore */ +const MasternodeVoteTransitionV0 : BinCodeable & ((data: { + pro_tx_hash: Identifier, + voter_identity_id: Identifier, + vote: Vote, + nonce: IdentityNonce, + /** platform_signable exclude_from_sig_hash */ + signature_public_key_id: KeyID, + /** platform_signable exclude_from_sig_hash */ + signature: BinaryData, +}) => MasternodeVoteTransitionV0); + +/** + * Dash Additions + * + * The merkle root of the masternode list + * hash_newtype forward + */ +interface MerkleRootMasternodeList { + [0]: Hash; +} +/** @ignore */ +const MerkleRootMasternodeList : BinCodeable & (( + f0: Hash, +) => MerkleRootMasternodeList); + +/** + * The merkle root of the quorums + * hash_newtype forward + */ +interface MerkleRootQuorums { + [0]: Hash; +} +/** @ignore */ +const MerkleRootQuorums : BinCodeable & (( + f0: Hash, +) => MerkleRootQuorums); + +/** A reference to a transaction output. */ +interface OutPoint { + /** The referenced transaction's txid. */ + txid: Txid; + /** The index of the referenced output in its transaction's vout. */ + vout: number; +} +/** @ignore */ +const OutPoint : BinCodeable & ((data: { + /** The referenced transaction's txid. */ + txid: Txid, + /** The index of the referenced output in its transaction's vout. */ + vout: number, +}) => OutPoint); + +/** repr u8 */ +/** @ignore */ +export abstract class Pooling { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: Pooling): void; + /** @ignore */ + static decode(bc: BinCode): Pooling; + /** @ignore @internal */ + [VARIANTS]: typeof Pooling.variants; + /** @ignore */ + static variants: { + Never: typeof Pooling.Never, + IfAvailable: typeof Pooling.IfAvailable, + Standard: typeof Pooling.Standard, + }; +} +namespace Pooling { + /** default */ + const Never: () => Pooling; + const IfAvailable: () => Pooling; + const Standard: () => Pooling; +} + +export type PrivateEncryptedNote = [RootEncryptionKeyIndex, DerivationEncryptionKeyIndex, Uint8Array]; + +/** @ignore */ +export abstract class ProviderMasternodeType { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: ProviderMasternodeType): void; + /** @ignore */ + static decode(bc: BinCode): ProviderMasternodeType; + /** @ignore @internal */ + [VARIANTS]: typeof ProviderMasternodeType.variants; + /** @ignore */ + static variants: { + Regular: typeof ProviderMasternodeType.Regular, + HighPerformance: typeof ProviderMasternodeType.HighPerformance, + }; +} +namespace ProviderMasternodeType { + const Regular: () => ProviderMasternodeType; + const HighPerformance: () => ProviderMasternodeType; +} + +/** + * A Provider Registration Payload used in a Provider Registration Special Transaction. + * This is used to register a Masternode on the network. + * The current version is 0. + * Interesting Fields: + * *Provider type refers to the type of Masternode. Currently only valid value is 0. + * *Provider mode refers to the mode of the Masternode. Currently only valid value is 0. + * *The collateral outpoint links to a transaction with a 1000 Dash unspent (at registration) + * outpoint. + * *The operator reward defines the ratio when divided by 10000 of the amount going to the operator. + * The max value for the operator reward is 10000. + * *The script payout is the script to which one wants to have the masternode pay out. + * *The inputs hash is used to guarantee the uniqueness of the payload sig. + */ +interface ProviderRegistrationPayload { + version: number; + masternode_type: ProviderMasternodeType; + masternode_mode: number; + collateral_outpoint: OutPoint; + service_address: SocketAddr; + owner_key_hash: PubkeyHash; + operator_public_key: BLSPublicKey; + voting_key_hash: PubkeyHash; + operator_reward: number; + script_payout: ScriptBuf; + inputs_hash: InputsHash; + signature: Uint8Array; + platform_node_id?: PubkeyHash; + platform_p2p_port?: number; + platform_http_port?: number; +} +/** @ignore */ +const ProviderRegistrationPayload : BinCodeable & ((data: { + version: number, + masternode_type: ProviderMasternodeType, + masternode_mode: number, + collateral_outpoint: OutPoint, + service_address: SocketAddr, + owner_key_hash: PubkeyHash, + operator_public_key: BLSPublicKey, + voting_key_hash: PubkeyHash, + operator_reward: number, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + signature: Uint8Array, + platform_node_id?: PubkeyHash, + platform_p2p_port?: number, + platform_http_port?: number, +}) => ProviderRegistrationPayload); + +/** + * A Provider Update Registrar Payload used in a Provider Update Registrar Special Transaction. + * This is used to update the base aspects a Masternode on the network. + * It must be signed by the owner's key that was set at registration. + */ +interface ProviderUpdateRegistrarPayload { + version: number; + pro_tx_hash: Txid; + provider_mode: number; + operator_public_key: BLSPublicKey; + voting_key_hash: PubkeyHash; + script_payout: ScriptBuf; + inputs_hash: InputsHash; + payload_sig: Uint8Array; +} +/** @ignore */ +const ProviderUpdateRegistrarPayload : BinCodeable & ((data: { + version: number, + pro_tx_hash: Txid, + provider_mode: number, + operator_public_key: BLSPublicKey, + voting_key_hash: PubkeyHash, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + payload_sig: Uint8Array, +}) => ProviderUpdateRegistrarPayload); + +/** + * A Provider Update Revocation Payload used in a Provider Update Revocation Special Transaction. + * This is used to signal and stop a Masternode from the operator. + * It must be signed by the operator's key that was set at registration or registrar update. + */ +interface ProviderUpdateRevocationPayload { + version: number; + pro_tx_hash: Txid; + reason: number; + inputs_hash: InputsHash; + payload_sig: BLSSignature; +} +/** @ignore */ +const ProviderUpdateRevocationPayload : BinCodeable & ((data: { + version: number, + pro_tx_hash: Txid, + reason: number, + inputs_hash: InputsHash, + payload_sig: BLSSignature, +}) => ProviderUpdateRevocationPayload); + +/** + * A Provider Update Service Payload used in a Provider Update Service Special Transaction. + * This is used to update the operational aspects a Masternode on the network. + * It must be signed by the operator's key that was set either at registration or by the last + * registrar update of the masternode. + */ +interface ProviderUpdateServicePayload { + version: number; + pro_tx_hash: Txid; + ip_address: bigint; + port: number; + script_payout: ScriptBuf; + inputs_hash: InputsHash; + payload_sig: BLSSignature; +} +/** @ignore */ +const ProviderUpdateServicePayload : BinCodeable & ((data: { + version: number, + pro_tx_hash: Txid, + ip_address: bigint, + port: number, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + payload_sig: BLSSignature, +}) => ProviderUpdateServicePayload); + +/** A hash of a public key. */ +interface PubkeyHash { + [0]: Hash; +} +/** @ignore */ +const PubkeyHash : BinCodeable & (( + f0: Hash, +) => PubkeyHash); + +/** repr u8 */ +/** @ignore */ +export abstract class Purpose { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: Purpose): void; + /** @ignore */ + static decode(bc: BinCode): Purpose; + /** @ignore @internal */ + [VARIANTS]: typeof Purpose.variants; + /** @ignore */ + static variants: { + AUTHENTICATION: typeof Purpose.AUTHENTICATION, + ENCRYPTION: typeof Purpose.ENCRYPTION, + DECRYPTION: typeof Purpose.DECRYPTION, + TRANSFER: typeof Purpose.TRANSFER, + SYSTEM: typeof Purpose.SYSTEM, + VOTING: typeof Purpose.VOTING, + OWNER: typeof Purpose.OWNER, + }; +} +namespace Purpose { + /** + * at least one authentication key must be registered for all security levels + * default + */ + const AUTHENTICATION: () => Purpose; + /** this key cannot be used for signing documents */ + const ENCRYPTION: () => Purpose; + /** this key cannot be used for signing documents */ + const DECRYPTION: () => Purpose; + /** + * this key is used to sign credit transfer and withdrawal state transitions + * this key can also be used by identities for claims and transfers of tokens + */ + const TRANSFER: () => Purpose; + /** this key cannot be used for signing documents */ + const SYSTEM: () => Purpose; + /** this key cannot be used for signing documents */ + const VOTING: () => Purpose; + /** this key is used to prove ownership of a masternode or evonode */ + const OWNER: () => Purpose; +} + +/** + * A Quorum Commitment Payload used in a Quorum Commitment Special Transaction. + * This is used in the mining phase as described in DIP 6: + * [dip-0006.md#7-mining-phase](https://github.com/dashpay/dips/blob/master/dip-0006.md#7-mining-phase). + * + * Miners take the best final commitment for a DKG session and mine it into a block. + */ +interface QuorumCommitmentPayload { + version: number; + height: number; + finalization_commitment: QuorumEntry; +} +/** @ignore */ +const QuorumCommitmentPayload : BinCodeable & ((data: { + version: number, + height: number, + finalization_commitment: QuorumEntry, +}) => QuorumCommitmentPayload); + +/** + * A Quorum Finalization Commitment. It is described in the finalization section of DIP6: + * [dip-0006.md#6-finalization-phase](https://github.com/dashpay/dips/blob/master/dip-0006.md#6-finalization-phase) + */ +interface QuorumEntry { + version: number; + llmq_type: LLMQType; + quorum_hash: QuorumHash; + quorum_index?: number; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: BLSPublicKey; + quorum_vvec_hash: QuorumVVecHash; + threshold_sig: BLSSignature; + all_commitment_aggregated_signature: BLSSignature; +} +/** @ignore */ +const QuorumEntry : BinCodeable & ((data: { + version: number, + llmq_type: LLMQType, + quorum_hash: QuorumHash, + quorum_index?: number, + signers: boolean[], + valid_members: boolean[], + quorum_public_key: BLSPublicKey, + quorum_vvec_hash: QuorumVVecHash, + threshold_sig: BLSSignature, + all_commitment_aggregated_signature: BLSSignature, +}) => QuorumEntry); + +export type QuorumHash = BlockHash; + +/** A hash of a quorum verification vector */ +interface QuorumVVecHash { + [0]: Hash; +} +/** @ignore */ +const QuorumVVecHash : BinCodeable & (( + f0: Hash, +) => QuorumVVecHash); + +/** + * A representation of a dynamic value that can handled dynamically + * non_exhaustive + */ +/** @ignore */ +export abstract class Value { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: Value): void; + /** @ignore */ + static decode(bc: BinCode): Value; + /** @ignore @internal */ + [VARIANTS]: typeof Value.variants; + /** @ignore */ + static variants: { + U128: typeof Value.U128, + I128: typeof Value.I128, + U64: typeof Value.U64, + I64: typeof Value.I64, + U32: typeof Value.U32, + I32: typeof Value.I32, + U16: typeof Value.U16, + I16: typeof Value.I16, + U8: typeof Value.U8, + I8: typeof Value.I8, + Bytes: typeof Value.Bytes, + Bytes20: typeof Value.Bytes20, + Bytes32: typeof Value.Bytes32, + Bytes36: typeof Value.Bytes36, + EnumU8: typeof Value.EnumU8, + EnumString: typeof Value.EnumString, + Identifier: typeof Value.Identifier, + Float: typeof Value.Float, + Text: typeof Value.Text, + Bool: typeof Value.Bool, + Null: typeof Value.Null, + Array: typeof Value.Array, + Map: typeof Value.Map, + }; +} +namespace Value { + /** + * A u128 integer + * + * @function + */ + interface U128 extends Value { + [0]: bigint; + } + /** @ignore */ + const U128: (f0: bigint) => Value.U128; + /** + * A i128 integer + * + * @function + */ + interface I128 extends Value { + [0]: bigint; + } + /** @ignore */ + const I128: (f0: bigint) => Value.I128; + /** + * A u64 integer + * + * @function + */ + interface U64 extends Value { + [0]: bigint; + } + /** @ignore */ + const U64: (f0: bigint) => Value.U64; + /** + * A i64 integer + * + * @function + */ + interface I64 extends Value { + [0]: bigint; + } + /** @ignore */ + const I64: (f0: bigint) => Value.I64; + /** + * A u32 integer + * + * @function + */ + interface U32 extends Value { + [0]: number; + } + /** @ignore */ + const U32: (f0: number) => Value.U32; + /** + * A i32 integer + * + * @function + */ + interface I32 extends Value { + [0]: number; + } + /** @ignore */ + const I32: (f0: number) => Value.I32; + /** + * A u16 integer + * + * @function + */ + interface U16 extends Value { + [0]: number; + } + /** @ignore */ + const U16: (f0: number) => Value.U16; + /** + * A i16 integer + * + * @function + */ + interface I16 extends Value { + [0]: number; + } + /** @ignore */ + const I16: (f0: number) => Value.I16; + /** + * A u8 integer + * + * @function + */ + interface U8 extends Value { + [0]: number; + } + /** @ignore */ + const U8: (f0: number) => Value.U8; + /** + * A i8 integer + * + * @function + */ + interface I8 extends Value { + [0]: number; + } + /** @ignore */ + const I8: (f0: number) => Value.I8; + /** + * Bytes + * + * @function + */ + interface Bytes extends Value { + [0]: Uint8Array; + } + /** @ignore */ + const Bytes: (f0: Uint8Array) => Value.Bytes; + /** + * Bytes 20 + * + * @function + */ + interface Bytes20 extends Value { + [0]: FixedBytes<20>; + } + /** @ignore */ + const Bytes20: (f0: FixedBytes<20>) => Value.Bytes20; + /** + * Bytes 32 + * + * @function + */ + interface Bytes32 extends Value { + [0]: FixedBytes<32>; + } + /** @ignore */ + const Bytes32: (f0: FixedBytes<32>) => Value.Bytes32; + /** + * Bytes 36 : Useful for outpoints + * + * @function + */ + interface Bytes36 extends Value { + [0]: FixedBytes<36>; + } + /** @ignore */ + const Bytes36: (f0: FixedBytes<36>) => Value.Bytes36; + /** + * An enumeration of u8 + * + * @function + */ + interface EnumU8 extends Value { + [0]: Uint8Array; + } + /** @ignore */ + const EnumU8: (f0: Uint8Array) => Value.EnumU8; + /** + * An enumeration of strings + * + * @function + */ + interface EnumString extends Value { + [0]: string[]; + } + /** @ignore */ + const EnumString: (f0: string[]) => Value.EnumString; + /** + * Identifier + * The identifier is very similar to bytes, however it is serialized to Base58 when converted + * to a JSON Value + * + * @function + */ + interface Identifier extends Value { + [0]: Hash256; + } + /** @ignore */ + const Identifier: (f0: Hash256) => Value.Identifier; + /** + * A float + * + * @function + */ + interface Float extends Value { + [0]: number; + } + /** @ignore */ + const Float: (f0: number) => Value.Float; + /** + * A string + * + * @function + */ + interface Text extends Value { + [0]: string; + } + /** @ignore */ + const Text: (f0: string) => Value.Text; + /** + * A boolean + * + * @function + */ + interface Bool extends Value { + [0]: boolean; + } + /** @ignore */ + const Bool: (f0: boolean) => Value.Bool; + /** Null */ + const Null: () => Value; + /** + * An array + * + * @function + */ + interface Array extends Value { + [0]: Value[]; + } + /** @ignore */ + const Array: (f0: Value[]) => Value.Array; + /** + * A map + * + * @function + */ + interface Map extends Value { + [0]: ValueMap; + } + /** @ignore */ + const Map: (f0: ValueMap) => Value.Map; +} + +/** "Raw" instant lock for serialization */ +interface RawInstantLockProof { + instant_lock: BinaryData; + transaction: BinaryData; + output_index: number; +} +/** @ignore */ +const RawInstantLockProof : BinCodeable & ((data: { + instant_lock: BinaryData, + transaction: BinaryData, + output_index: number, +}) => RawInstantLockProof); + +export type RecipientKeyIndex = number; + +/** @ignore */ +export abstract class ResourceVote { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: ResourceVote): void; + /** @ignore */ + static decode(bc: BinCode): ResourceVote; + /** @ignore @internal */ + [VARIANTS]: typeof ResourceVote.variants; + /** @ignore */ + static variants: { + V0: typeof ResourceVote.V0, + }; +} +namespace ResourceVote { + /** @function */ + interface V0 extends ResourceVote { + [0]: ResourceVoteV0; + } + /** @ignore */ + const V0: (f0: ResourceVoteV0) => ResourceVote.V0; +} + +/** + * A resource votes is a votes determining what we should do with a contested resource. + * For example Alice and Bob both want the username "Malaka" + * Some would vote for Alice to get it by putting in her Identifier. + * Some would vote for Bob to get it by putting in Bob's Identifier. + * Let's say someone voted, but is now not quite sure of their votes, they can abstain. + * Lock is there to signal that the shared resource should be given to no one. + * In this case Malaka might have a bad connotation in Greek, hence some might votes to Lock + * the name. + */ +/** @ignore */ +export abstract class ResourceVoteChoice { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: ResourceVoteChoice): void; + /** @ignore */ + static decode(bc: BinCode): ResourceVoteChoice; + /** @ignore @internal */ + [VARIANTS]: typeof ResourceVoteChoice.variants; + /** @ignore */ + static variants: { + TowardsIdentity: typeof ResourceVoteChoice.TowardsIdentity, + Abstain: typeof ResourceVoteChoice.Abstain, + Lock: typeof ResourceVoteChoice.Lock, + }; +} +namespace ResourceVoteChoice { + /** @function */ + interface TowardsIdentity extends ResourceVoteChoice { + [0]: Identifier; + } + /** @ignore */ + const TowardsIdentity: (f0: Identifier) => ResourceVoteChoice.TowardsIdentity; + /** default */ + const Abstain: () => ResourceVoteChoice; + const Lock: () => ResourceVoteChoice; +} + +interface ResourceVoteV0 { + vote_poll: VotePoll; + resource_vote_choice: ResourceVoteChoice; +} +/** @ignore */ +const ResourceVoteV0 : BinCodeable & ((data: { + vote_poll: VotePoll, + resource_vote_choice: ResourceVoteChoice, +}) => ResourceVoteV0); + +export type Revision = bigint; + +/** @ignore */ +export abstract class RewardDistributionType { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: RewardDistributionType): void; + /** @ignore */ + static decode(bc: BinCode): RewardDistributionType; + /** @ignore @internal */ + [VARIANTS]: typeof RewardDistributionType.variants; + /** @ignore */ + static variants: { + BlockBasedDistribution: typeof RewardDistributionType.BlockBasedDistribution, + TimeBasedDistribution: typeof RewardDistributionType.TimeBasedDistribution, + EpochBasedDistribution: typeof RewardDistributionType.EpochBasedDistribution, + }; +} +namespace RewardDistributionType { + /** + * An amount of tokens is emitted every n blocks. + * The start and end are included if set. + * If start is not set then it will start at the height of the block when the data contract + * is registered. + * + * @function + */ + interface BlockBasedDistribution extends RewardDistributionType { + interval: BlockHeightInterval; + function: DistributionFunction; + } + const BlockBasedDistribution: (data: { + interval: BlockHeightInterval, + function: DistributionFunction, + }) => RewardDistributionType.BlockBasedDistribution; + /** + * An amount of tokens is emitted every amount of time given. + * The start and end are included if set. + * If start is not set then it will start at the time of the block when the data contract + * is registered. + * + * @function + */ + interface TimeBasedDistribution extends RewardDistributionType { + interval: TimestampMillisInterval; + function: DistributionFunction; + } + const TimeBasedDistribution: (data: { + interval: TimestampMillisInterval, + function: DistributionFunction, + }) => RewardDistributionType.TimeBasedDistribution; + /** + * An amount of tokens is emitted every amount of epochs. + * The start and end are included if set. + * If start is not set then it will start at the epoch of the block when the data contract + * is registered. A distribution would happen at the start of the following epoch, even if it + * is just 1 block later. + * + * @function + */ + interface EpochBasedDistribution extends RewardDistributionType { + interval: EpochInterval; + function: DistributionFunction; + } + const EpochBasedDistribution: (data: { + interval: EpochInterval, + function: DistributionFunction, + }) => RewardDistributionType.EpochBasedDistribution; +} + +export type RootEncryptionKeyIndex = number; + + +/** + * An owned, growable script. + * + * `ScriptBuf` is the most common script type that has the ownership over the contents of the + * script. It has a close relationship with its borrowed counterpart, [`Script`]. + * + * Just as other similar types, this implements [`Deref`], so [deref coercions] apply. Also note + * that all the safety/validity restrictions that apply to [`Script`] apply to `ScriptBuf` as well. + * + * [deref coercions]: https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion + */ +interface ScriptBuf { + [0]: Uint8Array; +} +/** @ignore */ +const ScriptBuf : BinCodeable & (( + f0: Uint8Array, +) => ScriptBuf); + +/** repr u8 */ +/** @ignore */ +export abstract class SecurityLevel { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: SecurityLevel): void; + /** @ignore */ + static decode(bc: BinCode): SecurityLevel; + /** @ignore @internal */ + [VARIANTS]: typeof SecurityLevel.variants; + /** @ignore */ + static variants: { + MASTER: typeof SecurityLevel.MASTER, + CRITICAL: typeof SecurityLevel.CRITICAL, + HIGH: typeof SecurityLevel.HIGH, + MEDIUM: typeof SecurityLevel.MEDIUM, + }; +} +namespace SecurityLevel { + const MASTER: () => SecurityLevel; + const CRITICAL: () => SecurityLevel; + /** default */ + const HIGH: () => SecurityLevel; + const MEDIUM: () => SecurityLevel; +} + +export type SenderKeyIndex = number; + +export type SharedEncryptedNote = [SenderKeyIndex, RecipientKeyIndex, Uint8Array]; + +/** @ignore */ +export abstract class StateTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: StateTransition): void; + /** @ignore */ + static decode(bc: BinCode): StateTransition; + /** @ignore @internal */ + [VARIANTS]: typeof StateTransition.variants; + /** @ignore */ + static variants: { + DataContractCreate: typeof StateTransition.DataContractCreate, + DataContractUpdate: typeof StateTransition.DataContractUpdate, + Batch: typeof StateTransition.Batch, + IdentityCreate: typeof StateTransition.IdentityCreate, + IdentityTopUp: typeof StateTransition.IdentityTopUp, + IdentityCreditWithdrawal: typeof StateTransition.IdentityCreditWithdrawal, + IdentityUpdate: typeof StateTransition.IdentityUpdate, + IdentityCreditTransfer: typeof StateTransition.IdentityCreditTransfer, + MasternodeVote: typeof StateTransition.MasternodeVote, + }; +} +namespace StateTransition { + /** @function */ + interface DataContractCreate extends StateTransition { + [0]: DataContractCreateTransition; + } + /** @ignore */ + const DataContractCreate: (f0: DataContractCreateTransition) => StateTransition.DataContractCreate; + /** @function */ + interface DataContractUpdate extends StateTransition { + [0]: DataContractUpdateTransition; + } + /** @ignore */ + const DataContractUpdate: (f0: DataContractUpdateTransition) => StateTransition.DataContractUpdate; + /** @function */ + interface Batch extends StateTransition { + [0]: BatchTransition; + } + /** @ignore */ + const Batch: (f0: BatchTransition) => StateTransition.Batch; + /** @function */ + interface IdentityCreate extends StateTransition { + [0]: IdentityCreateTransition; + } + /** @ignore */ + const IdentityCreate: (f0: IdentityCreateTransition) => StateTransition.IdentityCreate; + /** @function */ + interface IdentityTopUp extends StateTransition { + [0]: IdentityTopUpTransition; + } + /** @ignore */ + const IdentityTopUp: (f0: IdentityTopUpTransition) => StateTransition.IdentityTopUp; + /** @function */ + interface IdentityCreditWithdrawal extends StateTransition { + [0]: IdentityCreditWithdrawalTransition; + } + /** @ignore */ + const IdentityCreditWithdrawal: (f0: IdentityCreditWithdrawalTransition) => StateTransition.IdentityCreditWithdrawal; + /** @function */ + interface IdentityUpdate extends StateTransition { + [0]: IdentityUpdateTransition; + } + /** @ignore */ + const IdentityUpdate: (f0: IdentityUpdateTransition) => StateTransition.IdentityUpdate; + /** @function */ + interface IdentityCreditTransfer extends StateTransition { + [0]: IdentityCreditTransferTransition; + } + /** @ignore */ + const IdentityCreditTransfer: (f0: IdentityCreditTransferTransition) => StateTransition.IdentityCreditTransfer; + /** @function */ + interface MasternodeVote extends StateTransition { + [0]: MasternodeVoteTransition; + } + /** @ignore */ + const MasternodeVote: (f0: MasternodeVoteTransition) => StateTransition.MasternodeVote; +} + +/** + * The Storage Key requirements + * repr u8 + */ +/** @ignore */ +export abstract class StorageKeyRequirements { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: StorageKeyRequirements): void; + /** @ignore */ + static decode(bc: BinCode): StorageKeyRequirements; + /** @ignore @internal */ + [VARIANTS]: typeof StorageKeyRequirements.variants; + /** @ignore */ + static variants: { + Unique: typeof StorageKeyRequirements.Unique, + Multiple: typeof StorageKeyRequirements.Multiple, + MultipleReferenceToLatest: typeof StorageKeyRequirements.MultipleReferenceToLatest, + }; +} +namespace StorageKeyRequirements { + const Unique: () => StorageKeyRequirements; + const Multiple: () => StorageKeyRequirements; + const MultipleReferenceToLatest: () => StorageKeyRequirements; +} + +export type TimestampMillis = bigint; + +export type TimestampMillisInterval = bigint; + +export type TokenAmount = bigint; + +/** @ignore */ +export abstract class TokenBaseTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenBaseTransition): void; + /** @ignore */ + static decode(bc: BinCode): TokenBaseTransition; + /** @ignore @internal */ + [VARIANTS]: typeof TokenBaseTransition.variants; + /** @ignore */ + static variants: { + V0: typeof TokenBaseTransition.V0, + }; +} +namespace TokenBaseTransition { + /** @function */ + interface V0 extends TokenBaseTransition { + [0]: TokenBaseTransitionV0; + } + /** @ignore */ + const V0: (f0: TokenBaseTransitionV0) => TokenBaseTransition.V0; +} + +interface TokenBaseTransitionV0 { + identity_contract_nonce: IdentityNonce; + /** ID of the token within the contract */ + token_contract_position: number; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier; + /** Token ID generated from the data contract ID and the token position */ + token_id: Identifier; + /** Using group multi party rules for authentication */ + using_group_info?: GroupStateTransitionInfo; +} +/** @ignore */ +const TokenBaseTransitionV0 : BinCodeable & ((data: { + identity_contract_nonce: IdentityNonce, + /** ID of the token within the contract */ + token_contract_position: number, + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier, + /** Token ID generated from the data contract ID and the token position */ + token_id: Identifier, + /** Using group multi party rules for authentication */ + using_group_info?: GroupStateTransitionInfo, +}) => TokenBaseTransitionV0); + +/** @ignore */ +export abstract class TokenBurnTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenBurnTransition): void; + /** @ignore */ + static decode(bc: BinCode): TokenBurnTransition; + /** @ignore @internal */ + [VARIANTS]: typeof TokenBurnTransition.variants; + /** @ignore */ + static variants: { + V0: typeof TokenBurnTransition.V0, + }; +} +namespace TokenBurnTransition { + /** @function */ + interface V0 extends TokenBurnTransition { + [0]: TokenBurnTransitionV0; + } + /** @ignore */ + const V0: (f0: TokenBurnTransitionV0) => TokenBurnTransition.V0; +} + +interface TokenBurnTransitionV0 { + /** Document Base Transition */ + base: TokenBaseTransition; + /** How much should we burn */ + burn_amount: bigint; + /** The public note */ + public_note?: string; +} +/** @ignore */ +const TokenBurnTransitionV0 : BinCodeable & ((data: { + /** Document Base Transition */ + base: TokenBaseTransition, + /** How much should we burn */ + burn_amount: bigint, + /** The public note */ + public_note?: string, +}) => TokenBurnTransitionV0); + +/** @ignore */ +export abstract class TokenClaimTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenClaimTransition): void; + /** @ignore */ + static decode(bc: BinCode): TokenClaimTransition; + /** @ignore @internal */ + [VARIANTS]: typeof TokenClaimTransition.variants; + /** @ignore */ + static variants: { + V0: typeof TokenClaimTransition.V0, + }; +} +namespace TokenClaimTransition { + /** @function */ + interface V0 extends TokenClaimTransition { + [0]: TokenClaimTransitionV0; + } + /** @ignore */ + const V0: (f0: TokenClaimTransitionV0) => TokenClaimTransition.V0; +} + +interface TokenClaimTransitionV0 { + /** Document Base Transition */ + base: TokenBaseTransition; + /** The type of distribution we are targeting */ + distribution_type: TokenDistributionType; + /** A public note, this will only get saved to the state if we are using a historical contract */ + public_note?: string; +} +/** @ignore */ +const TokenClaimTransitionV0 : BinCodeable & ((data: { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The type of distribution we are targeting */ + distribution_type: TokenDistributionType, + /** A public note, this will only get saved to the state if we are using a historical contract */ + public_note?: string, +}) => TokenClaimTransitionV0); + +/** @ignore */ +export abstract class TokenConfigUpdateTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenConfigUpdateTransition): void; + /** @ignore */ + static decode(bc: BinCode): TokenConfigUpdateTransition; + /** @ignore @internal */ + [VARIANTS]: typeof TokenConfigUpdateTransition.variants; + /** @ignore */ + static variants: { + V0: typeof TokenConfigUpdateTransition.V0, + }; +} +namespace TokenConfigUpdateTransition { + /** @function */ + interface V0 extends TokenConfigUpdateTransition { + [0]: TokenConfigUpdateTransitionV0; + } + /** @ignore */ + const V0: (f0: TokenConfigUpdateTransitionV0) => TokenConfigUpdateTransition.V0; +} + +interface TokenConfigUpdateTransitionV0 { + /** Document Base Transition */ + base: TokenBaseTransition; + /** Updated token configuration item */ + update_token_configuration_item: TokenConfigurationChangeItem; + /** The public note */ + public_note?: string; +} +/** @ignore */ +const TokenConfigUpdateTransitionV0 : BinCodeable & ((data: { + /** Document Base Transition */ + base: TokenBaseTransition, + /** Updated token configuration item */ + update_token_configuration_item: TokenConfigurationChangeItem, + /** The public note */ + public_note?: string, +}) => TokenConfigUpdateTransitionV0); + +/** @ignore */ +export abstract class TokenConfiguration { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenConfiguration): void; + /** @ignore */ + static decode(bc: BinCode): TokenConfiguration; + /** @ignore @internal */ + [VARIANTS]: typeof TokenConfiguration.variants; + /** @ignore */ + static variants: { + V0: typeof TokenConfiguration.V0, + }; +} +namespace TokenConfiguration { + /** @function */ + interface V0 extends TokenConfiguration { + [0]: TokenConfigurationV0; + } + /** @ignore */ + const V0: (f0: TokenConfigurationV0) => TokenConfiguration.V0; +} + +/** @ignore */ +export abstract class TokenConfigurationChangeItem { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenConfigurationChangeItem): void; + /** @ignore */ + static decode(bc: BinCode): TokenConfigurationChangeItem; + /** @ignore @internal */ + [VARIANTS]: typeof TokenConfigurationChangeItem.variants; + /** @ignore */ + static variants: { + TokenConfigurationNoChange: typeof TokenConfigurationChangeItem.TokenConfigurationNoChange, + Conventions: typeof TokenConfigurationChangeItem.Conventions, + ConventionsControlGroup: typeof TokenConfigurationChangeItem.ConventionsControlGroup, + ConventionsAdminGroup: typeof TokenConfigurationChangeItem.ConventionsAdminGroup, + MaxSupply: typeof TokenConfigurationChangeItem.MaxSupply, + MaxSupplyControlGroup: typeof TokenConfigurationChangeItem.MaxSupplyControlGroup, + MaxSupplyAdminGroup: typeof TokenConfigurationChangeItem.MaxSupplyAdminGroup, + PerpetualDistribution: typeof TokenConfigurationChangeItem.PerpetualDistribution, + PerpetualDistributionControlGroup: typeof TokenConfigurationChangeItem.PerpetualDistributionControlGroup, + PerpetualDistributionAdminGroup: typeof TokenConfigurationChangeItem.PerpetualDistributionAdminGroup, + NewTokensDestinationIdentity: typeof TokenConfigurationChangeItem.NewTokensDestinationIdentity, + NewTokensDestinationIdentityControlGroup: typeof TokenConfigurationChangeItem.NewTokensDestinationIdentityControlGroup, + NewTokensDestinationIdentityAdminGroup: typeof TokenConfigurationChangeItem.NewTokensDestinationIdentityAdminGroup, + MintingAllowChoosingDestination: typeof TokenConfigurationChangeItem.MintingAllowChoosingDestination, + MintingAllowChoosingDestinationControlGroup: typeof TokenConfigurationChangeItem.MintingAllowChoosingDestinationControlGroup, + MintingAllowChoosingDestinationAdminGroup: typeof TokenConfigurationChangeItem.MintingAllowChoosingDestinationAdminGroup, + ManualMinting: typeof TokenConfigurationChangeItem.ManualMinting, + ManualMintingAdminGroup: typeof TokenConfigurationChangeItem.ManualMintingAdminGroup, + ManualBurning: typeof TokenConfigurationChangeItem.ManualBurning, + ManualBurningAdminGroup: typeof TokenConfigurationChangeItem.ManualBurningAdminGroup, + Freeze: typeof TokenConfigurationChangeItem.Freeze, + FreezeAdminGroup: typeof TokenConfigurationChangeItem.FreezeAdminGroup, + Unfreeze: typeof TokenConfigurationChangeItem.Unfreeze, + UnfreezeAdminGroup: typeof TokenConfigurationChangeItem.UnfreezeAdminGroup, + DestroyFrozenFunds: typeof TokenConfigurationChangeItem.DestroyFrozenFunds, + DestroyFrozenFundsAdminGroup: typeof TokenConfigurationChangeItem.DestroyFrozenFundsAdminGroup, + EmergencyAction: typeof TokenConfigurationChangeItem.EmergencyAction, + EmergencyActionAdminGroup: typeof TokenConfigurationChangeItem.EmergencyActionAdminGroup, + MarketplaceTradeMode: typeof TokenConfigurationChangeItem.MarketplaceTradeMode, + MarketplaceTradeModeControlGroup: typeof TokenConfigurationChangeItem.MarketplaceTradeModeControlGroup, + MarketplaceTradeModeAdminGroup: typeof TokenConfigurationChangeItem.MarketplaceTradeModeAdminGroup, + MainControlGroup: typeof TokenConfigurationChangeItem.MainControlGroup, + }; +} +namespace TokenConfigurationChangeItem { + /** default */ + const TokenConfigurationNoChange: () => TokenConfigurationChangeItem; + /** @function */ + interface Conventions extends TokenConfigurationChangeItem { + [0]: TokenConfigurationConvention; + } + /** @ignore */ + const Conventions: (f0: TokenConfigurationConvention) => TokenConfigurationChangeItem.Conventions; + /** @function */ + interface ConventionsControlGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const ConventionsControlGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.ConventionsControlGroup; + /** @function */ + interface ConventionsAdminGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const ConventionsAdminGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.ConventionsAdminGroup; + /** @function */ + interface MaxSupply extends TokenConfigurationChangeItem { + [0]: Option; + } + /** @ignore */ + const MaxSupply: (f0: Option) => TokenConfigurationChangeItem.MaxSupply; + /** @function */ + interface MaxSupplyControlGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const MaxSupplyControlGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.MaxSupplyControlGroup; + /** @function */ + interface MaxSupplyAdminGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const MaxSupplyAdminGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.MaxSupplyAdminGroup; + /** @function */ + interface PerpetualDistribution extends TokenConfigurationChangeItem { + [0]: Option; + } + /** @ignore */ + const PerpetualDistribution: (f0: Option) => TokenConfigurationChangeItem.PerpetualDistribution; + /** @function */ + interface PerpetualDistributionControlGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const PerpetualDistributionControlGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.PerpetualDistributionControlGroup; + /** @function */ + interface PerpetualDistributionAdminGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const PerpetualDistributionAdminGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.PerpetualDistributionAdminGroup; + /** @function */ + interface NewTokensDestinationIdentity extends TokenConfigurationChangeItem { + [0]: Option; + } + /** @ignore */ + const NewTokensDestinationIdentity: (f0: Option) => TokenConfigurationChangeItem.NewTokensDestinationIdentity; + /** @function */ + interface NewTokensDestinationIdentityControlGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const NewTokensDestinationIdentityControlGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.NewTokensDestinationIdentityControlGroup; + /** @function */ + interface NewTokensDestinationIdentityAdminGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const NewTokensDestinationIdentityAdminGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.NewTokensDestinationIdentityAdminGroup; + /** @function */ + interface MintingAllowChoosingDestination extends TokenConfigurationChangeItem { + [0]: boolean; + } + /** @ignore */ + const MintingAllowChoosingDestination: (f0: boolean) => TokenConfigurationChangeItem.MintingAllowChoosingDestination; + /** @function */ + interface MintingAllowChoosingDestinationControlGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const MintingAllowChoosingDestinationControlGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.MintingAllowChoosingDestinationControlGroup; + /** @function */ + interface MintingAllowChoosingDestinationAdminGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const MintingAllowChoosingDestinationAdminGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.MintingAllowChoosingDestinationAdminGroup; + /** @function */ + interface ManualMinting extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const ManualMinting: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.ManualMinting; + /** @function */ + interface ManualMintingAdminGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const ManualMintingAdminGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.ManualMintingAdminGroup; + /** @function */ + interface ManualBurning extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const ManualBurning: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.ManualBurning; + /** @function */ + interface ManualBurningAdminGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const ManualBurningAdminGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.ManualBurningAdminGroup; + /** @function */ + interface Freeze extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const Freeze: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.Freeze; + /** @function */ + interface FreezeAdminGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const FreezeAdminGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.FreezeAdminGroup; + /** @function */ + interface Unfreeze extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const Unfreeze: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.Unfreeze; + /** @function */ + interface UnfreezeAdminGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const UnfreezeAdminGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.UnfreezeAdminGroup; + /** @function */ + interface DestroyFrozenFunds extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const DestroyFrozenFunds: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.DestroyFrozenFunds; + /** @function */ + interface DestroyFrozenFundsAdminGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const DestroyFrozenFundsAdminGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.DestroyFrozenFundsAdminGroup; + /** @function */ + interface EmergencyAction extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const EmergencyAction: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.EmergencyAction; + /** @function */ + interface EmergencyActionAdminGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const EmergencyActionAdminGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.EmergencyActionAdminGroup; + /** @function */ + interface MarketplaceTradeMode extends TokenConfigurationChangeItem { + [0]: TokenTradeMode; + } + /** @ignore */ + const MarketplaceTradeMode: (f0: TokenTradeMode) => TokenConfigurationChangeItem.MarketplaceTradeMode; + /** @function */ + interface MarketplaceTradeModeControlGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const MarketplaceTradeModeControlGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.MarketplaceTradeModeControlGroup; + /** @function */ + interface MarketplaceTradeModeAdminGroup extends TokenConfigurationChangeItem { + [0]: AuthorizedActionTakers; + } + /** @ignore */ + const MarketplaceTradeModeAdminGroup: (f0: AuthorizedActionTakers) => TokenConfigurationChangeItem.MarketplaceTradeModeAdminGroup; + /** @function */ + interface MainControlGroup extends TokenConfigurationChangeItem { + [0]: Option; + } + /** @ignore */ + const MainControlGroup: (f0: Option) => TokenConfigurationChangeItem.MainControlGroup; +} + +/** + * Versioned wrapper for token display conventions. + * + * `TokenConfigurationConvention` provides a flexible, forward-compatible structure + * for representing human-readable metadata about a token, such as localized names + * and decimal formatting standards. + * + * This enum enables evolution of the convention schema over time without breaking + * compatibility with older tokens. Each variant defines a specific format version. + */ +/** @ignore */ +export abstract class TokenConfigurationConvention { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenConfigurationConvention): void; + /** @ignore */ + static decode(bc: BinCode): TokenConfigurationConvention; + /** @ignore @internal */ + [VARIANTS]: typeof TokenConfigurationConvention.variants; + /** @ignore */ + static variants: { + V0: typeof TokenConfigurationConvention.V0, + }; +} +namespace TokenConfigurationConvention { + /** + * Version 0 of the token convention schema. + * + * Defines localized names (by ISO 639 language codes) and the number of decimal places + * used for displaying token amounts. + * + * @function + */ + interface V0 extends TokenConfigurationConvention { + [0]: TokenConfigurationConventionV0; + } + /** @ignore */ + const V0: (f0: TokenConfigurationConventionV0) => TokenConfigurationConvention.V0; +} + +/** + * Defines display conventions for a token, including name localization and decimal precision. + * + * `TokenConfigurationConventionV0` provides human-readable metadata to guide client applications + * in rendering token names and formatting token values. This structure is purely informative + * and does not affect consensus-critical logic or supply calculations. + */ +interface TokenConfigurationConventionV0 { + /** + * A mapping of ISO 639-1 language codes (2-letter lowercase strings) to localized + * token names and metadata. + * + * These localizations enable wallets and dApps to display token information in the + * user's preferred language. At least one localization (e.g., English) is strongly recommended. + */ + localizations: Map; + /** + * The number of decimal places used to represent the token. + * + * For example, a value of `8` means that one full token is represented as `10^8` base units + * (similar to Bitcoin's satoshis or Dash's duffs). + * + * This value is used by clients to determine formatting and user interface display. + */ + decimals: number; +} +/** @ignore */ +const TokenConfigurationConventionV0 : BinCodeable & ((data: { + /** + * A mapping of ISO 639-1 language codes (2-letter lowercase strings) to localized + * token names and metadata. + * + * These localizations enable wallets and dApps to display token information in the + * user's preferred language. At least one localization (e.g., English) is strongly recommended. + */ + localizations: Map, + /** + * The number of decimal places used to represent the token. + * + * For example, a value of `8` means that one full token is represented as `10^8` base units + * (similar to Bitcoin's satoshis or Dash's duffs). + * + * This value is used by clients to determine formatting and user interface display. + */ + decimals: number, +}) => TokenConfigurationConventionV0); + +/** + * Versioned wrapper for token name localization data. + * + * `TokenConfigurationLocalization` allows extensibility for future schema upgrades + * while preserving backward compatibility. Each variant represents a specific format + * version for localization information. + * + * This structure is used to map language codes to localized token names in a flexible, + * forward-compatible manner. + */ +/** @ignore */ +export abstract class TokenConfigurationLocalization { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenConfigurationLocalization): void; + /** @ignore */ + static decode(bc: BinCode): TokenConfigurationLocalization; + /** @ignore @internal */ + [VARIANTS]: typeof TokenConfigurationLocalization.variants; + /** @ignore */ + static variants: { + V0: typeof TokenConfigurationLocalization.V0, + }; +} +namespace TokenConfigurationLocalization { + /** + * Version 0 of the token localization schema. + * + * Defines basic capitalization preference, singular form, and plural form + * for displaying token names. + * + * @function + */ + interface V0 extends TokenConfigurationLocalization { + [0]: TokenConfigurationLocalizationV0; + } + /** @ignore */ + const V0: (f0: TokenConfigurationLocalizationV0) => TokenConfigurationLocalization.V0; +} + +/** + * Defines the localized naming format for a token in a specific language. + * + * `TokenConfigurationLocalizationV0` enables tokens to present user-friendly names + * across different locales. This information is not used for validation or consensus + * but enhances UX by allowing consistent display in multilingual interfaces. + */ +interface TokenConfigurationLocalizationV0 { + /** + * Indicates whether the token name should be capitalized when displayed. + * + * This is a stylistic hint for clients (e.g., "Dash" vs. "dash") and is typically + * applied to both singular and plural forms unless overridden. + */ + should_capitalize: boolean; + /** + * The singular form of the token name in the target language. + * + * Example: "Dash", "Dollar", or "Token". + */ + singular_form: string; + /** + * The plural form of the token name in the target language. + * + * Example: "Dash", "Dollars", or "Tokens". + */ + plural_form: string; +} +/** @ignore */ +const TokenConfigurationLocalizationV0 : BinCodeable & ((data: { + /** + * Indicates whether the token name should be capitalized when displayed. + * + * This is a stylistic hint for clients (e.g., "Dash" vs. "dash") and is typically + * applied to both singular and plural forms unless overridden. + */ + should_capitalize: boolean, + /** + * The singular form of the token name in the target language. + * + * Example: "Dash", "Dollar", or "Token". + */ + singular_form: string, + /** + * The plural form of the token name in the target language. + * + * Example: "Dash", "Dollars", or "Tokens". + */ + plural_form: string, +}) => TokenConfigurationLocalizationV0); + +/** + * Defines the complete configuration for a version 0 token contract. + * + * `TokenConfigurationV0` encapsulates all metadata, control rules, supply settings, + * and governance constraints used to initialize and manage a token instance on Platform. + * This structure serves as the core representation of a token's logic, permissions, + * and capabilities. + * + * This configuration is designed to be deterministic and versioned for compatibility + * across protocol upgrades and validation environments. + */ +interface TokenConfigurationV0 { + /** Metadata conventions, including decimals and localizations. */ + conventions: TokenConfigurationConvention; + /** Change control rules governing who can modify the conventions field. */ + conventions_change_rules: ChangeControlRules; + /** The initial token supply minted at creation. */ + base_supply: TokenAmount; + /** + * The maximum allowable supply of the token. + * + * If `None`, the supply is unbounded unless otherwise constrained by minting logic. + */ + max_supply?: TokenAmount; + /** Configuration governing which historical actions are recorded for this token. */ + keeps_history: TokenKeepsHistoryRules; + /** + * Indicates whether the token should start in a paused state. + * + * When `true`, transfers are disallowed until explicitly unpaused via an emergency action. + */ + start_as_paused: boolean; + /** Allows minting and transferring to frozen token balances if enabled. */ + allow_transfer_to_frozen_balance: boolean; + /** + * Change control rules for updating the `max_supply`. + * + * Note: The `max_supply` can never be reduced below the `base_supply`. + */ + max_supply_change_rules: ChangeControlRules; + /** Defines the token's distribution logic, including perpetual and pre-programmed distributions. */ + distribution_rules: TokenDistributionRules; + /** Defines the token's marketplace logic. */ + marketplace_rules: TokenMarketplaceRules; + /** Rules controlling who is authorized to perform manual minting of tokens. */ + manual_minting_rules: ChangeControlRules; + /** Rules controlling who is authorized to perform manual burning of tokens. */ + manual_burning_rules: ChangeControlRules; + /** Rules governing who may freeze token balances. */ + freeze_rules: ChangeControlRules; + /** Rules governing who may unfreeze token balances. */ + unfreeze_rules: ChangeControlRules; + /** Rules governing who may destroy frozen funds. */ + destroy_frozen_funds_rules: ChangeControlRules; + /** Rules governing who may invoke emergency actions, such as pausing transfers. */ + emergency_action_rules: ChangeControlRules; + /** Optional reference to the group assigned as the token's main control group. */ + main_control_group?: GroupContractPosition; + /** Defines whether and how the main control group assignment may be modified. */ + main_control_group_can_be_modified: AuthorizedActionTakers; + /** Optional textual description of the token's purpose, behavior, or metadata. */ + description?: string; +} +/** @ignore */ +const TokenConfigurationV0 : BinCodeable & ((data: { + /** Metadata conventions, including decimals and localizations. */ + conventions: TokenConfigurationConvention, + /** Change control rules governing who can modify the conventions field. */ + conventions_change_rules: ChangeControlRules, + /** The initial token supply minted at creation. */ + base_supply: TokenAmount, + /** + * The maximum allowable supply of the token. + * + * If `None`, the supply is unbounded unless otherwise constrained by minting logic. + */ + max_supply?: TokenAmount, + /** Configuration governing which historical actions are recorded for this token. */ + keeps_history: TokenKeepsHistoryRules, + /** + * Indicates whether the token should start in a paused state. + * + * When `true`, transfers are disallowed until explicitly unpaused via an emergency action. + */ + start_as_paused: boolean, + /** Allows minting and transferring to frozen token balances if enabled. */ + allow_transfer_to_frozen_balance: boolean, + /** + * Change control rules for updating the `max_supply`. + * + * Note: The `max_supply` can never be reduced below the `base_supply`. + */ + max_supply_change_rules: ChangeControlRules, + /** Defines the token's distribution logic, including perpetual and pre-programmed distributions. */ + distribution_rules: TokenDistributionRules, + /** Defines the token's marketplace logic. */ + marketplace_rules: TokenMarketplaceRules, + /** Rules controlling who is authorized to perform manual minting of tokens. */ + manual_minting_rules: ChangeControlRules, + /** Rules controlling who is authorized to perform manual burning of tokens. */ + manual_burning_rules: ChangeControlRules, + /** Rules governing who may freeze token balances. */ + freeze_rules: ChangeControlRules, + /** Rules governing who may unfreeze token balances. */ + unfreeze_rules: ChangeControlRules, + /** Rules governing who may destroy frozen funds. */ + destroy_frozen_funds_rules: ChangeControlRules, + /** Rules governing who may invoke emergency actions, such as pausing transfers. */ + emergency_action_rules: ChangeControlRules, + /** Optional reference to the group assigned as the token's main control group. */ + main_control_group?: GroupContractPosition, + /** Defines whether and how the main control group assignment may be modified. */ + main_control_group_can_be_modified: AuthorizedActionTakers, + /** Optional textual description of the token's purpose, behavior, or metadata. */ + description?: string, +}) => TokenConfigurationV0); + +export type TokenContractPosition = number; + +/** @ignore */ +export abstract class TokenDestroyFrozenFundsTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenDestroyFrozenFundsTransition): void; + /** @ignore */ + static decode(bc: BinCode): TokenDestroyFrozenFundsTransition; + /** @ignore @internal */ + [VARIANTS]: typeof TokenDestroyFrozenFundsTransition.variants; + /** @ignore */ + static variants: { + V0: typeof TokenDestroyFrozenFundsTransition.V0, + }; +} +namespace TokenDestroyFrozenFundsTransition { + /** @function */ + interface V0 extends TokenDestroyFrozenFundsTransition { + [0]: TokenDestroyFrozenFundsTransitionV0; + } + /** @ignore */ + const V0: (f0: TokenDestroyFrozenFundsTransitionV0) => TokenDestroyFrozenFundsTransition.V0; +} + +interface TokenDestroyFrozenFundsTransitionV0 { + /** Document Base Transition */ + base: TokenBaseTransition; + /** The identity id of the account whose balance should be destroyed */ + frozen_identity_id: Identifier; + /** The public note */ + public_note?: string; +} +/** @ignore */ +const TokenDestroyFrozenFundsTransitionV0 : BinCodeable & ((data: { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The identity id of the account whose balance should be destroyed */ + frozen_identity_id: Identifier, + /** The public note */ + public_note?: string, +}) => TokenDestroyFrozenFundsTransitionV0); + +/** + * Represents a versioned transition for direct token purchases. + * + * This enum allows for forward-compatible support of different versions + * of the `TokenDirectPurchaseTransition` structure. Each variant corresponds + * to a specific version of the transition logic and structure. + * + * This transition type is used when a user intends to directly purchase tokens + * by specifying the desired amount and the maximum total price they are willing to pay. + */ +/** @ignore */ +export abstract class TokenDirectPurchaseTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenDirectPurchaseTransition): void; + /** @ignore */ + static decode(bc: BinCode): TokenDirectPurchaseTransition; + /** @ignore @internal */ + [VARIANTS]: typeof TokenDirectPurchaseTransition.variants; + /** @ignore */ + static variants: { + V0: typeof TokenDirectPurchaseTransition.V0, + }; +} +namespace TokenDirectPurchaseTransition { + /** + * Version 0 of the token direct purchase transition. + * + * This version includes the base document transition, the number of tokens + * to purchase, and the maximum total price the user agrees to pay. + * If the price in the contract is lower than the agreed price, the lower + * price is used. + * + * @function + */ + interface V0 extends TokenDirectPurchaseTransition { + [0]: TokenDirectPurchaseTransitionV0; + } + /** @ignore */ + const V0: (f0: TokenDirectPurchaseTransitionV0) => TokenDirectPurchaseTransition.V0; +} + +interface TokenDirectPurchaseTransitionV0 { + /** Document Base Transition */ + base: TokenBaseTransition; + /** How many tokens should we buy. */ + token_count: TokenAmount; + /** + * Price that the user is willing to pay for all the tokens. + * The user will pay up to this amount. + * If the actual cost of the token per the contract is less than the agreed price that the user is willing to pay + * Then we take the actual cost per the contract. + */ + total_agreed_price: Credits; +} +/** @ignore */ +const TokenDirectPurchaseTransitionV0 : BinCodeable & ((data: { + /** Document Base Transition */ + base: TokenBaseTransition, + /** How many tokens should we buy. */ + token_count: TokenAmount, + /** + * Price that the user is willing to pay for all the tokens. + * The user will pay up to this amount. + * If the actual cost of the token per the contract is less than the agreed price that the user is willing to pay + * Then we take the actual cost per the contract. + */ + total_agreed_price: Credits, +}) => TokenDirectPurchaseTransitionV0); + +/** @ignore */ +export abstract class TokenDistributionRecipient { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenDistributionRecipient): void; + /** @ignore */ + static decode(bc: BinCode): TokenDistributionRecipient; + /** @ignore @internal */ + [VARIANTS]: typeof TokenDistributionRecipient.variants; + /** @ignore */ + static variants: { + ContractOwner: typeof TokenDistributionRecipient.ContractOwner, + Identity: typeof TokenDistributionRecipient.Identity, + EvonodesByParticipation: typeof TokenDistributionRecipient.EvonodesByParticipation, + }; +} +namespace TokenDistributionRecipient { + /** + * Distribute to the contract Owner + * default + */ + const ContractOwner: () => TokenDistributionRecipient; + /** + * Distribute to a single identity + * + * @function + */ + interface Identity extends TokenDistributionRecipient { + [0]: Identifier; + } + /** @ignore */ + const Identity: (f0: Identifier) => TokenDistributionRecipient.Identity; + /** + * Distribute tokens by participation + * This distribution can only happen when choosing epoch based distribution + */ + const EvonodesByParticipation: () => TokenDistributionRecipient; +} + +/** @ignore */ +export abstract class TokenDistributionRules { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenDistributionRules): void; + /** @ignore */ + static decode(bc: BinCode): TokenDistributionRules; + /** @ignore @internal */ + [VARIANTS]: typeof TokenDistributionRules.variants; + /** @ignore */ + static variants: { + V0: typeof TokenDistributionRules.V0, + }; +} +namespace TokenDistributionRules { + /** @function */ + interface V0 extends TokenDistributionRules { + [0]: TokenDistributionRulesV0; + } + /** @ignore */ + const V0: (f0: TokenDistributionRulesV0) => TokenDistributionRules.V0; +} + +interface TokenDistributionRulesV0 { + perpetual_distribution?: TokenPerpetualDistribution; + perpetual_distribution_rules: ChangeControlRules; + pre_programmed_distribution?: TokenPreProgrammedDistribution; + new_tokens_destination_identity?: Identifier; + new_tokens_destination_identity_rules: ChangeControlRules; + minting_allow_choosing_destination: boolean; + minting_allow_choosing_destination_rules: ChangeControlRules; + change_direct_purchase_pricing_rules: ChangeControlRules; +} +/** @ignore */ +const TokenDistributionRulesV0 : BinCodeable & ((data: { + perpetual_distribution?: TokenPerpetualDistribution, + perpetual_distribution_rules: ChangeControlRules, + pre_programmed_distribution?: TokenPreProgrammedDistribution, + new_tokens_destination_identity?: Identifier, + new_tokens_destination_identity_rules: ChangeControlRules, + minting_allow_choosing_destination: boolean, + minting_allow_choosing_destination_rules: ChangeControlRules, + change_direct_purchase_pricing_rules: ChangeControlRules, +}) => TokenDistributionRulesV0); + +/** + * Represents the type of token distribution. + * + * - `PreProgrammed`: A scheduled distribution with predefined rules. + * - `Perpetual`: A continuous or recurring distribution. + */ +/** @ignore */ +export abstract class TokenDistributionType { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenDistributionType): void; + /** @ignore */ + static decode(bc: BinCode): TokenDistributionType; + /** @ignore @internal */ + [VARIANTS]: typeof TokenDistributionType.variants; + /** @ignore */ + static variants: { + PreProgrammed: typeof TokenDistributionType.PreProgrammed, + Perpetual: typeof TokenDistributionType.Perpetual, + }; +} +namespace TokenDistributionType { + /** + * A pre-programmed distribution scheduled for a specific time. + * default + */ + const PreProgrammed: () => TokenDistributionType; + /** A perpetual distribution that occurs at regular intervals. */ + const Perpetual: () => TokenDistributionType; +} + +/** @ignore */ +export abstract class TokenEmergencyAction { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenEmergencyAction): void; + /** @ignore */ + static decode(bc: BinCode): TokenEmergencyAction; + /** @ignore @internal */ + [VARIANTS]: typeof TokenEmergencyAction.variants; + /** @ignore */ + static variants: { + Pause: typeof TokenEmergencyAction.Pause, + Resume: typeof TokenEmergencyAction.Resume, + }; +} +namespace TokenEmergencyAction { + /** default */ + const Pause: () => TokenEmergencyAction; + const Resume: () => TokenEmergencyAction; +} + +/** @ignore */ +export abstract class TokenEmergencyActionTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenEmergencyActionTransition): void; + /** @ignore */ + static decode(bc: BinCode): TokenEmergencyActionTransition; + /** @ignore @internal */ + [VARIANTS]: typeof TokenEmergencyActionTransition.variants; + /** @ignore */ + static variants: { + V0: typeof TokenEmergencyActionTransition.V0, + }; +} +namespace TokenEmergencyActionTransition { + /** @function */ + interface V0 extends TokenEmergencyActionTransition { + [0]: TokenEmergencyActionTransitionV0; + } + /** @ignore */ + const V0: (f0: TokenEmergencyActionTransitionV0) => TokenEmergencyActionTransition.V0; +} + +interface TokenEmergencyActionTransitionV0 { + /** Document Base Transition */ + base: TokenBaseTransition; + /** The emergency action */ + emergency_action: TokenEmergencyAction; + /** The public note */ + public_note?: string; +} +/** @ignore */ +const TokenEmergencyActionTransitionV0 : BinCodeable & ((data: { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The emergency action */ + emergency_action: TokenEmergencyAction, + /** The public note */ + public_note?: string, +}) => TokenEmergencyActionTransitionV0); + +/** @ignore */ +export abstract class TokenFreezeTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenFreezeTransition): void; + /** @ignore */ + static decode(bc: BinCode): TokenFreezeTransition; + /** @ignore @internal */ + [VARIANTS]: typeof TokenFreezeTransition.variants; + /** @ignore */ + static variants: { + V0: typeof TokenFreezeTransition.V0, + }; +} +namespace TokenFreezeTransition { + /** @function */ + interface V0 extends TokenFreezeTransition { + [0]: TokenFreezeTransitionV0; + } + /** @ignore */ + const V0: (f0: TokenFreezeTransitionV0) => TokenFreezeTransition.V0; +} + +interface TokenFreezeTransitionV0 { + /** Document Base Transition */ + base: TokenBaseTransition; + /** The identity that we are freezing */ + identity_to_freeze_id: Identifier; + /** The public note */ + public_note?: string; +} +/** @ignore */ +const TokenFreezeTransitionV0 : BinCodeable & ((data: { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The identity that we are freezing */ + identity_to_freeze_id: Identifier, + /** The public note */ + public_note?: string, +}) => TokenFreezeTransitionV0); + +/** @ignore */ +export abstract class TokenKeepsHistoryRules { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenKeepsHistoryRules): void; + /** @ignore */ + static decode(bc: BinCode): TokenKeepsHistoryRules; + /** @ignore @internal */ + [VARIANTS]: typeof TokenKeepsHistoryRules.variants; + /** @ignore */ + static variants: { + V0: typeof TokenKeepsHistoryRules.V0, + }; +} +namespace TokenKeepsHistoryRules { + /** @function */ + interface V0 extends TokenKeepsHistoryRules { + [0]: TokenKeepsHistoryRulesV0; + } + /** @ignore */ + const V0: (f0: TokenKeepsHistoryRulesV0) => TokenKeepsHistoryRules.V0; +} + +/** + * The rules for keeping a ledger as documents of token events. + * Config update, Destroying Frozen Funds, Emergency Action, + * Pre Programmed Token Release always require an entry to the ledger + */ +interface TokenKeepsHistoryRulesV0 { + /** Whether transfer history is recorded. */ + keeps_transfer_history: boolean; + /** Whether freezing history is recorded. */ + keeps_freezing_history: boolean; + /** Whether minting history is recorded. */ + keeps_minting_history: boolean; + /** Whether burning history is recorded. */ + keeps_burning_history: boolean; + /** Whether direct pricing history is recorded. */ + keeps_direct_pricing_history: boolean; + /** Whether direct purchase history is recorded. */ + keeps_direct_purchase_history: boolean; +} +/** @ignore */ +const TokenKeepsHistoryRulesV0 : BinCodeable & ((data: { + /** Whether transfer history is recorded. */ + keeps_transfer_history: boolean, + /** Whether freezing history is recorded. */ + keeps_freezing_history: boolean, + /** Whether minting history is recorded. */ + keeps_minting_history: boolean, + /** Whether burning history is recorded. */ + keeps_burning_history: boolean, + /** Whether direct pricing history is recorded. */ + keeps_direct_pricing_history: boolean, + /** Whether direct purchase history is recorded. */ + keeps_direct_purchase_history: boolean, +}) => TokenKeepsHistoryRulesV0); + +/** @ignore */ +export abstract class TokenMarketplaceRules { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenMarketplaceRules): void; + /** @ignore */ + static decode(bc: BinCode): TokenMarketplaceRules; + /** @ignore @internal */ + [VARIANTS]: typeof TokenMarketplaceRules.variants; + /** @ignore */ + static variants: { + V0: typeof TokenMarketplaceRules.V0, + }; +} +namespace TokenMarketplaceRules { + /** @function */ + interface V0 extends TokenMarketplaceRules { + [0]: TokenMarketplaceRulesV0; + } + /** @ignore */ + const V0: (f0: TokenMarketplaceRulesV0) => TokenMarketplaceRules.V0; +} + +interface TokenMarketplaceRulesV0 { + trade_mode: TokenTradeMode; + trade_mode_change_rules: ChangeControlRules; +} +/** @ignore */ +const TokenMarketplaceRulesV0 : BinCodeable & ((data: { + trade_mode: TokenTradeMode, + trade_mode_change_rules: ChangeControlRules, +}) => TokenMarketplaceRulesV0); + +/** @ignore */ +export abstract class TokenMintTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenMintTransition): void; + /** @ignore */ + static decode(bc: BinCode): TokenMintTransition; + /** @ignore @internal */ + [VARIANTS]: typeof TokenMintTransition.variants; + /** @ignore */ + static variants: { + V0: typeof TokenMintTransition.V0, + }; +} +namespace TokenMintTransition { + /** @function */ + interface V0 extends TokenMintTransition { + [0]: TokenMintTransitionV0; + } + /** @ignore */ + const V0: (f0: TokenMintTransitionV0) => TokenMintTransition.V0; +} + +interface TokenMintTransitionV0 { + /** Document Base Transition */ + base: TokenBaseTransition; + /** + * Who should we issue the token to? If this is not set then we issue to the identity set in + * contract settings. If such an operation is allowed. + */ + issued_to_identity_id?: Identifier; + /** How much should we issue */ + amount: bigint; + /** The public note */ + public_note?: string; +} +/** @ignore */ +const TokenMintTransitionV0 : BinCodeable & ((data: { + /** Document Base Transition */ + base: TokenBaseTransition, + /** + * Who should we issue the token to? If this is not set then we issue to the identity set in + * contract settings. If such an operation is allowed. + */ + issued_to_identity_id?: Identifier, + /** How much should we issue */ + amount: bigint, + /** The public note */ + public_note?: string, +}) => TokenMintTransitionV0); + +/** @ignore */ +export abstract class TokenPaymentInfo { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenPaymentInfo): void; + /** @ignore */ + static decode(bc: BinCode): TokenPaymentInfo; + /** @ignore @internal */ + [VARIANTS]: typeof TokenPaymentInfo.variants; + /** @ignore */ + static variants: { + V0: typeof TokenPaymentInfo.V0, + }; +} +namespace TokenPaymentInfo { + /** @function */ + interface V0 extends TokenPaymentInfo { + [0]: TokenPaymentInfoV0; + } + /** @ignore */ + const V0: (f0: TokenPaymentInfoV0) => TokenPaymentInfo.V0; +} + +interface TokenPaymentInfoV0 { + /** + * By default, we use a token in the same contract, this field must be set if the document + * requires payment using another contracts token. + */ + payment_token_contract_id?: Identifier; + /** + * If we are expecting to pay with a token in a contract, which token are we expecting + * to pay with? + * We have this set so contract owners can't switch out to more valuable token. + * For example if my Data contract + */ + token_contract_position: TokenContractPosition; + /** Minimum token cost, this most often should not be set */ + minimum_token_cost?: TokenAmount; + /** + * Maximum token cost, this most often should be set + * If: + * - a client does not have this set + * - and the data contract allows the price of NFTs to be changed by the data contract's owner or allowed party. + * Then: + * - The user could see the cost changed on them + */ + maximum_token_cost?: TokenAmount; + /** Who pays the gas fees, this needs to match what the contract allows */ + gas_fees_paid_by: GasFeesPaidBy; +} +/** @ignore */ +const TokenPaymentInfoV0 : BinCodeable & ((data: { + /** + * By default, we use a token in the same contract, this field must be set if the document + * requires payment using another contracts token. + */ + payment_token_contract_id?: Identifier, + /** + * If we are expecting to pay with a token in a contract, which token are we expecting + * to pay with? + * We have this set so contract owners can't switch out to more valuable token. + * For example if my Data contract + */ + token_contract_position: TokenContractPosition, + /** Minimum token cost, this most often should not be set */ + minimum_token_cost?: TokenAmount, + /** + * Maximum token cost, this most often should be set + * If: + * - a client does not have this set + * - and the data contract allows the price of NFTs to be changed by the data contract's owner or allowed party. + * Then: + * - The user could see the cost changed on them + */ + maximum_token_cost?: TokenAmount, + /** Who pays the gas fees, this needs to match what the contract allows */ + gas_fees_paid_by: GasFeesPaidBy, +}) => TokenPaymentInfoV0); + +/** @ignore */ +export abstract class TokenPerpetualDistribution { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenPerpetualDistribution): void; + /** @ignore */ + static decode(bc: BinCode): TokenPerpetualDistribution; + /** @ignore @internal */ + [VARIANTS]: typeof TokenPerpetualDistribution.variants; + /** @ignore */ + static variants: { + V0: typeof TokenPerpetualDistribution.V0, + }; +} +namespace TokenPerpetualDistribution { + /** @function */ + interface V0 extends TokenPerpetualDistribution { + [0]: TokenPerpetualDistributionV0; + } + /** @ignore */ + const V0: (f0: TokenPerpetualDistributionV0) => TokenPerpetualDistribution.V0; +} + +interface TokenPerpetualDistributionV0 { + /** The distribution type that the token will use */ + distribution_type: RewardDistributionType; + /** The recipient type */ + distribution_recipient: TokenDistributionRecipient; +} +/** @ignore */ +const TokenPerpetualDistributionV0 : BinCodeable & ((data: { + /** The distribution type that the token will use */ + distribution_type: RewardDistributionType, + /** The recipient type */ + distribution_recipient: TokenDistributionRecipient, +}) => TokenPerpetualDistributionV0); + +/** @ignore */ +export abstract class TokenPreProgrammedDistribution { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenPreProgrammedDistribution): void; + /** @ignore */ + static decode(bc: BinCode): TokenPreProgrammedDistribution; + /** @ignore @internal */ + [VARIANTS]: typeof TokenPreProgrammedDistribution.variants; + /** @ignore */ + static variants: { + V0: typeof TokenPreProgrammedDistribution.V0, + }; +} +namespace TokenPreProgrammedDistribution { + /** @function */ + interface V0 extends TokenPreProgrammedDistribution { + [0]: TokenPreProgrammedDistributionV0; + } + /** @ignore */ + const V0: (f0: TokenPreProgrammedDistributionV0) => TokenPreProgrammedDistribution.V0; +} + +interface TokenPreProgrammedDistributionV0 { + distributions: Map>; +} +/** @ignore */ +const TokenPreProgrammedDistributionV0 : BinCodeable & ((data: { + distributions: Map>, +}) => TokenPreProgrammedDistributionV0); + +/** + * Defines the pricing schedule for tokens in terms of credits. + * + * A pricing schedule can either be a single, flat price applied to all + * token amounts, or a tiered pricing model where specific amounts + * correspond to specific credit values. + */ +/** @ignore */ +export abstract class TokenPricingSchedule { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenPricingSchedule): void; + /** @ignore */ + static decode(bc: BinCode): TokenPricingSchedule; + /** @ignore @internal */ + [VARIANTS]: typeof TokenPricingSchedule.variants; + /** @ignore */ + static variants: { + SinglePrice: typeof TokenPricingSchedule.SinglePrice, + SetPrices: typeof TokenPricingSchedule.SetPrices, + }; +} +namespace TokenPricingSchedule { + /** + * A single flat price in credits for all token amounts. + * + * This variant is used when the pricing does not depend on + * the number of tokens being purchased or processed. + * + * @function + */ + interface SinglePrice extends TokenPricingSchedule { + [0]: Credits; + } + /** @ignore */ + const SinglePrice: (f0: Credits) => TokenPricingSchedule.SinglePrice; + /** + * A tiered pricing model where specific token amounts map to credit prices. + * + * This allows for more complex pricing structures, such as + * volume discounts or progressive pricing. The map keys + * represent token amount thresholds, and the values are the + * corresponding credit prices. + * If the first token amount is greater than 1 this means that the user can only + * purchase that amount as a minimum at a time. + * + * @function + */ + interface SetPrices extends TokenPricingSchedule { + [0]: Map; + } + /** @ignore */ + const SetPrices: (f0: Map) => TokenPricingSchedule.SetPrices; +} + +/** + * Represents a versioned transition for setting or updating the price of a token + * available for direct purchase. + * + * This transition allows a token owner or controlling group to define or remove a pricing + * schedule for direct purchases. Setting the price to `None` disables further purchases + * of the token. + * + * This transition type supports **group actions**, meaning it can require **multi-signature + * (multisig) authorization**. In such cases, multiple identities must agree and sign + * the transition for it to be considered valid and executable. + * + * Versioning enables forward compatibility by allowing future enhancements or changes + * without breaking existing clients. + */ +/** @ignore */ +export abstract class TokenSetPriceForDirectPurchaseTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenSetPriceForDirectPurchaseTransition): void; + /** @ignore */ + static decode(bc: BinCode): TokenSetPriceForDirectPurchaseTransition; + /** @ignore @internal */ + [VARIANTS]: typeof TokenSetPriceForDirectPurchaseTransition.variants; + /** @ignore */ + static variants: { + V0: typeof TokenSetPriceForDirectPurchaseTransition.V0, + }; +} +namespace TokenSetPriceForDirectPurchaseTransition { + /** + * Version 0 of the token set price for direct purchase transition. + * + * This version includes: + * - A base document transition. + * - An optional pricing schedule: `Some(...)` to set the token's price, or `None` to make it non-purchasable. + * - An optional public note. + * + * Group actions with multisig are supported in this version, + * enabling shared control over token pricing among multiple authorized identities. + * + * @function + */ + interface V0 extends TokenSetPriceForDirectPurchaseTransition { + [0]: TokenSetPriceForDirectPurchaseTransitionV0; + } + /** @ignore */ + const V0: (f0: TokenSetPriceForDirectPurchaseTransitionV0) => TokenSetPriceForDirectPurchaseTransition.V0; +} + +interface TokenSetPriceForDirectPurchaseTransitionV0 { + /** Document Base Transition */ + base: TokenBaseTransition; + /** + * What should be the price for a single token + * Setting this to None makes it no longer purchasable + */ + price?: TokenPricingSchedule; + /** The public note */ + public_note?: string; +} +/** @ignore */ +const TokenSetPriceForDirectPurchaseTransitionV0 : BinCodeable & ((data: { + /** Document Base Transition */ + base: TokenBaseTransition, + /** + * What should be the price for a single token + * Setting this to None makes it no longer purchasable + */ + price?: TokenPricingSchedule, + /** The public note */ + public_note?: string, +}) => TokenSetPriceForDirectPurchaseTransitionV0); + +/** @ignore */ +export abstract class TokenTradeMode { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenTradeMode): void; + /** @ignore */ + static decode(bc: BinCode): TokenTradeMode; + /** @ignore @internal */ + [VARIANTS]: typeof TokenTradeMode.variants; + /** @ignore */ + static variants: { + NotTradeable: typeof TokenTradeMode.NotTradeable, + }; +} +namespace TokenTradeMode { + /** default */ + const NotTradeable: () => TokenTradeMode; +} + +/** @ignore */ +export abstract class TokenTransferTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenTransferTransition): void; + /** @ignore */ + static decode(bc: BinCode): TokenTransferTransition; + /** @ignore @internal */ + [VARIANTS]: typeof TokenTransferTransition.variants; + /** @ignore */ + static variants: { + V0: typeof TokenTransferTransition.V0, + }; +} +namespace TokenTransferTransition { + /** @function */ + interface V0 extends TokenTransferTransition { + [0]: TokenTransferTransitionV0; + } + /** @ignore */ + const V0: (f0: TokenTransferTransitionV0) => TokenTransferTransition.V0; +} + +interface TokenTransferTransitionV0 { + base: TokenBaseTransition; + amount: bigint; + recipient_id: Identifier; + /** The public note */ + public_note?: string; + /** An optional shared encrypted note */ + shared_encrypted_note?: SharedEncryptedNote; + /** An optional private encrypted note */ + private_encrypted_note?: PrivateEncryptedNote; +} +/** @ignore */ +const TokenTransferTransitionV0 : BinCodeable & ((data: { + base: TokenBaseTransition, + amount: bigint, + recipient_id: Identifier, + /** The public note */ + public_note?: string, + /** An optional shared encrypted note */ + shared_encrypted_note?: SharedEncryptedNote, + /** An optional private encrypted note */ + private_encrypted_note?: PrivateEncryptedNote, +}) => TokenTransferTransitionV0); + +/** @ignore */ +export abstract class TokenTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenTransition): void; + /** @ignore */ + static decode(bc: BinCode): TokenTransition; + /** @ignore @internal */ + [VARIANTS]: typeof TokenTransition.variants; + /** @ignore */ + static variants: { + Burn: typeof TokenTransition.Burn, + Mint: typeof TokenTransition.Mint, + Transfer: typeof TokenTransition.Transfer, + Freeze: typeof TokenTransition.Freeze, + Unfreeze: typeof TokenTransition.Unfreeze, + DestroyFrozenFunds: typeof TokenTransition.DestroyFrozenFunds, + Claim: typeof TokenTransition.Claim, + EmergencyAction: typeof TokenTransition.EmergencyAction, + ConfigUpdate: typeof TokenTransition.ConfigUpdate, + DirectPurchase: typeof TokenTransition.DirectPurchase, + SetPriceForDirectPurchase: typeof TokenTransition.SetPriceForDirectPurchase, + }; +} +namespace TokenTransition { + /** @function */ + interface Burn extends TokenTransition { + [0]: TokenBurnTransition; + } + /** @ignore */ + const Burn: (f0: TokenBurnTransition) => TokenTransition.Burn; + /** @function */ + interface Mint extends TokenTransition { + [0]: TokenMintTransition; + } + /** @ignore */ + const Mint: (f0: TokenMintTransition) => TokenTransition.Mint; + /** @function */ + interface Transfer extends TokenTransition { + [0]: TokenTransferTransition; + } + /** @ignore */ + const Transfer: (f0: TokenTransferTransition) => TokenTransition.Transfer; + /** @function */ + interface Freeze extends TokenTransition { + [0]: TokenFreezeTransition; + } + /** @ignore */ + const Freeze: (f0: TokenFreezeTransition) => TokenTransition.Freeze; + /** @function */ + interface Unfreeze extends TokenTransition { + [0]: TokenUnfreezeTransition; + } + /** @ignore */ + const Unfreeze: (f0: TokenUnfreezeTransition) => TokenTransition.Unfreeze; + /** @function */ + interface DestroyFrozenFunds extends TokenTransition { + [0]: TokenDestroyFrozenFundsTransition; + } + /** @ignore */ + const DestroyFrozenFunds: (f0: TokenDestroyFrozenFundsTransition) => TokenTransition.DestroyFrozenFunds; + /** @function */ + interface Claim extends TokenTransition { + [0]: TokenClaimTransition; + } + /** @ignore */ + const Claim: (f0: TokenClaimTransition) => TokenTransition.Claim; + /** @function */ + interface EmergencyAction extends TokenTransition { + [0]: TokenEmergencyActionTransition; + } + /** @ignore */ + const EmergencyAction: (f0: TokenEmergencyActionTransition) => TokenTransition.EmergencyAction; + /** @function */ + interface ConfigUpdate extends TokenTransition { + [0]: TokenConfigUpdateTransition; + } + /** @ignore */ + const ConfigUpdate: (f0: TokenConfigUpdateTransition) => TokenTransition.ConfigUpdate; + /** @function */ + interface DirectPurchase extends TokenTransition { + [0]: TokenDirectPurchaseTransition; + } + /** @ignore */ + const DirectPurchase: (f0: TokenDirectPurchaseTransition) => TokenTransition.DirectPurchase; + /** @function */ + interface SetPriceForDirectPurchase extends TokenTransition { + [0]: TokenSetPriceForDirectPurchaseTransition; + } + /** @ignore */ + const SetPriceForDirectPurchase: (f0: TokenSetPriceForDirectPurchaseTransition) => TokenTransition.SetPriceForDirectPurchase; +} + +/** @ignore */ +export abstract class TokenUnfreezeTransition { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TokenUnfreezeTransition): void; + /** @ignore */ + static decode(bc: BinCode): TokenUnfreezeTransition; + /** @ignore @internal */ + [VARIANTS]: typeof TokenUnfreezeTransition.variants; + /** @ignore */ + static variants: { + V0: typeof TokenUnfreezeTransition.V0, + }; +} +namespace TokenUnfreezeTransition { + /** @function */ + interface V0 extends TokenUnfreezeTransition { + [0]: TokenUnfreezeTransitionV0; + } + /** @ignore */ + const V0: (f0: TokenUnfreezeTransitionV0) => TokenUnfreezeTransition.V0; +} + +interface TokenUnfreezeTransitionV0 { + /** Document Base Transition */ + base: TokenBaseTransition; + /** The identity that we are freezing */ + frozen_identity_id: Identifier; + /** The public note */ + public_note?: string; +} +/** @ignore */ +const TokenUnfreezeTransitionV0 : BinCodeable & ((data: { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The identity that we are freezing */ + frozen_identity_id: Identifier, + /** The public note */ + public_note?: string, +}) => TokenUnfreezeTransitionV0); + +/** + * An enum wrapper around various special transaction payloads. + * Special transactions are defined in DIP 2. + */ +/** @ignore */ +export abstract class TransactionPayload { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TransactionPayload): void; + /** @ignore */ + static decode(bc: BinCode): TransactionPayload; + /** @ignore @internal */ + [VARIANTS]: typeof TransactionPayload.variants; + /** @ignore */ + static variants: { + ProviderRegistrationPayloadType: typeof TransactionPayload.ProviderRegistrationPayloadType, + ProviderUpdateServicePayloadType: typeof TransactionPayload.ProviderUpdateServicePayloadType, + ProviderUpdateRegistrarPayloadType: typeof TransactionPayload.ProviderUpdateRegistrarPayloadType, + ProviderUpdateRevocationPayloadType: typeof TransactionPayload.ProviderUpdateRevocationPayloadType, + CoinbasePayloadType: typeof TransactionPayload.CoinbasePayloadType, + QuorumCommitmentPayloadType: typeof TransactionPayload.QuorumCommitmentPayloadType, + AssetLockPayloadType: typeof TransactionPayload.AssetLockPayloadType, + AssetUnlockPayloadType: typeof TransactionPayload.AssetUnlockPayloadType, + }; +} +namespace TransactionPayload { + /** + * A wrapper for a Masternode Registration payload + * + * @function + */ + interface ProviderRegistrationPayloadType extends TransactionPayload { + [0]: ProviderRegistrationPayload; + } + /** @ignore */ + const ProviderRegistrationPayloadType: (f0: ProviderRegistrationPayload) => TransactionPayload.ProviderRegistrationPayloadType; + /** + * A wrapper for a Masternode Update Service payload + * + * @function + */ + interface ProviderUpdateServicePayloadType extends TransactionPayload { + [0]: ProviderUpdateServicePayload; + } + /** @ignore */ + const ProviderUpdateServicePayloadType: (f0: ProviderUpdateServicePayload) => TransactionPayload.ProviderUpdateServicePayloadType; + /** + * A wrapper for a Masternode Update Registrar payload + * + * @function + */ + interface ProviderUpdateRegistrarPayloadType extends TransactionPayload { + [0]: ProviderUpdateRegistrarPayload; + } + /** @ignore */ + const ProviderUpdateRegistrarPayloadType: (f0: ProviderUpdateRegistrarPayload) => TransactionPayload.ProviderUpdateRegistrarPayloadType; + /** + * A wrapper for a Masternode Update Revocation payload + * + * @function + */ + interface ProviderUpdateRevocationPayloadType extends TransactionPayload { + [0]: ProviderUpdateRevocationPayload; + } + /** @ignore */ + const ProviderUpdateRevocationPayloadType: (f0: ProviderUpdateRevocationPayload) => TransactionPayload.ProviderUpdateRevocationPayloadType; + /** + * A wrapper for a Coinbase payload + * + * @function + */ + interface CoinbasePayloadType extends TransactionPayload { + [0]: CoinbasePayload; + } + /** @ignore */ + const CoinbasePayloadType: (f0: CoinbasePayload) => TransactionPayload.CoinbasePayloadType; + /** + * A wrapper for a Quorum Commitment payload + * + * @function + */ + interface QuorumCommitmentPayloadType extends TransactionPayload { + [0]: QuorumCommitmentPayload; + } + /** @ignore */ + const QuorumCommitmentPayloadType: (f0: QuorumCommitmentPayload) => TransactionPayload.QuorumCommitmentPayloadType; + /** + * A wrapper for an Asset Lock payload + * + * @function + */ + interface AssetLockPayloadType extends TransactionPayload { + [0]: AssetLockPayload; + } + /** @ignore */ + const AssetLockPayloadType: (f0: AssetLockPayload) => TransactionPayload.AssetLockPayloadType; + /** + * A wrapper for an Asset Unlock payload + * + * @function + */ + interface AssetUnlockPayloadType extends TransactionPayload { + [0]: AssetUnlockPayload; + } + /** @ignore */ + const AssetUnlockPayloadType: (f0: AssetUnlockPayload) => TransactionPayload.AssetUnlockPayloadType; +} + +/** + * The transaction type. Special transactions were introduced in DIP2. + * Compared to Bitcoin the version field is split into two 16 bit integers. + * The first part for the version and the second part for the transaction + * type. + * + * repr u16 + */ +/** @ignore */ +export abstract class TransactionType { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: TransactionType): void; + /** @ignore */ + static decode(bc: BinCode): TransactionType; + /** @ignore @internal */ + [VARIANTS]: typeof TransactionType.variants; + /** @ignore */ + static variants: { + Classic: typeof TransactionType.Classic, + ProviderRegistration: typeof TransactionType.ProviderRegistration, + ProviderUpdateService: typeof TransactionType.ProviderUpdateService, + ProviderUpdateRegistrar: typeof TransactionType.ProviderUpdateRegistrar, + ProviderUpdateRevocation: typeof TransactionType.ProviderUpdateRevocation, + Coinbase: typeof TransactionType.Coinbase, + QuorumCommitment: typeof TransactionType.QuorumCommitment, + AssetLock: typeof TransactionType.AssetLock, + AssetUnlock: typeof TransactionType.AssetUnlock, + }; +} +namespace TransactionType { + /** A Classic transaction */ + const Classic: () => TransactionType; + /** A Masternode Registration Transaction */ + const ProviderRegistration: () => TransactionType; + /** A Masternode Update Service Transaction, used by the operator to signal changes to service */ + const ProviderUpdateService: () => TransactionType; + /** A Masternode Update Registrar Transaction, used by the owner to signal base changes */ + const ProviderUpdateRegistrar: () => TransactionType; + /** A Masternode Update Revocation Transaction, used by the operator to signal termination of service */ + const ProviderUpdateRevocation: () => TransactionType; + /** A Coinbase Transaction, contained as the first transaction in each block */ + const Coinbase: () => TransactionType; + /** A Quorum Commitment Transaction, used to save quorum information to the state */ + const QuorumCommitment: () => TransactionType; + /** An Asset Lock Transaction, used to transfer credits to Dash Platform, by locking them until withdrawals occur */ + const AssetLock: () => TransactionType; + /** An Asset Unlock Transaction, used to withdraw credits from Dash Platform, by unlocking them */ + const AssetUnlock: () => TransactionType; +} + +/** A transaction output, which defines new coins to be created from old ones. */ +interface TxOut { + /** The value of the output, in satoshis. */ + value: bigint; + /** The script which must be satisfied for the output to be spent. */ + script_pubkey: ScriptBuf; +} +/** @ignore */ +const TxOut : BinCodeable & ((data: { + /** The value of the output, in satoshis. */ + value: bigint, + /** The script which must be satisfied for the output to be spent. */ + script_pubkey: ScriptBuf, +}) => TxOut); + +/** A dash transaction hash/transaction ID. */ +interface Txid { + [0]: Hash; +} +/** @ignore */ +const Txid : BinCodeable & (( + f0: Hash, +) => Txid); + +export type UserFeeIncrease = number; + +export type ValueMap = [Value, Value][]; + +/** @ignore */ +export abstract class Vote { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: Vote): void; + /** @ignore */ + static decode(bc: BinCode): Vote; + /** @ignore @internal */ + [VARIANTS]: typeof Vote.variants; + /** @ignore */ + static variants: { + ResourceVote: typeof Vote.ResourceVote, + }; +} +namespace Vote { + /** @function */ + interface ResourceVote extends Vote { + [0]: ResourceVote; + } + /** @ignore */ + const ResourceVote: (f0: ResourceVote) => Vote.ResourceVote; +} + +/** @ignore */ +export abstract class VotePoll { + /** @ignore @internal */ + constructor(); + #private; + /** @ignore */ + static name: string; + /** @ignore */ + static isValid(v: unknown): boolean; + /** @ignore */ + static encode(bc: BinCode, v: VotePoll): void; + /** @ignore */ + static decode(bc: BinCode): VotePoll; + /** @ignore @internal */ + [VARIANTS]: typeof VotePoll.variants; + /** @ignore */ + static variants: { + ContestedDocumentResourceVotePoll: typeof VotePoll.ContestedDocumentResourceVotePoll, + }; +} +namespace VotePoll { + /** @function */ + interface ContestedDocumentResourceVotePoll extends VotePoll { + [0]: ContestedDocumentResourceVotePoll; + } + /** @ignore */ + const ContestedDocumentResourceVotePoll: (f0: ContestedDocumentResourceVotePoll) => VotePoll.ContestedDocumentResourceVotePoll; +} + + +} diff --git a/2.0.0/generated_bincode.js b/2.0.0/generated_bincode.js new file mode 100644 index 0000000..c28c330 --- /dev/null +++ b/2.0.0/generated_bincode.js @@ -0,0 +1,3220 @@ +import { + Bool, Bytes, Enum, VariantDiscriminant, FixedBytes, Lazy, Struct, StructTuple, + Int128, Int16, Int32, Int64, Int8, Uint128, Uint16, Uint32, Uint64, Uint8, Float64, + VarInt, VarUint, Vec, Tuple, Map, Option, String, Nothing, Range, NotSignable, + SocketAddr, +} from "../src/bincode.ts" +import { Transaction } from "../src/bincode_types.ts"; +export const Hash = Bytes; //FixedBytes(32) + +/** @type {*} */ +export let Value = Lazy("Value", () => REAL_Value); + +// !ENCODE +/** + * An Asset Unlock Base payload. This is the base payload of the Asset Unlock. In order to make + * it a full payload the request info should be added. + */ +export const AssetUnlockBasePayload = Struct("AssetUnlockBasePayload", { + /** The payload protocol version, is currently expected to be 0. */ + version: Uint8, + /** The index of the unlock transaction. It gets bumped on each transaction */ + index: VarUint, + /** The fee used in Duffs (Satoshis) */ + fee: VarUint, +}); + +// !ENCODE +/** + * A BLS Public key is 48 bytes in the scheme used for Dash Core + * attr since (1.48) , derive (PartialEq , Eq , Ord , PartialOrd , Hash) + */ +export const BLSPublicKey = StructTuple("BLSPublicKey", + FixedBytes(48), +); + +// !ENCODE +/** + * A BLS Signature is 96 bytes in the scheme used for Dash Core + * attr since (1.48) , derive (PartialEq , Eq , Ord , PartialOrd , Hash) + */ +export const BLSSignature = StructTuple("BLSSignature", + FixedBytes(96), +); + +export const BinaryData = StructTuple("BinaryData", + Bytes, +); + +// !ENCODE +/** A dash block hash. */ +export const BlockHash = StructTuple("BlockHash", + Hash, +); + +export const BlockHeight = VarUint + +export const BlockHeightInterval = VarUint + +export const Credits = VarUint + +export const DefinitionName = String + +export const DerivationEncryptionKeyIndex = VarUint + +export const DocumentName = String + +export const EpochIndex = VarUint + +export const EpochInterval = VarUint + +export const GasFeesPaidBy = Enum("GasFeesPaidBy", /** @type {const} */ ({ + /** + * The user pays the gas fees + * default + */ + DocumentOwner: [], + /** The contract owner pays the gas fees */ + ContractOwner: [], + /** + * The user is stating his willingness to pay the gas fee if the Contract owner's balance is + * insufficient. + */ + PreferContractOwner: [], +})) + +export const GroupContractPosition = VarUint + +export const GroupMemberPower = VarUint + +export const GroupRequiredPower = VarUint + +export const Hash256 = FixedBytes(32) + +export const IdentifierBytes32 = StructTuple("IdentifierBytes32", + FixedBytes(32), +); + +export const IdentityNonce = VarUint + +// !ENCODE +/** A hash of all transaction inputs */ +export const InputsHash = StructTuple("InputsHash", + Hash, +); + +export const KeyID = VarUint + +/** + * allow non_camel_case_types + * repr u8 + */ +export const KeyType = Enum("KeyType", /** @type {const} */ ({ + /** default */ + ECDSA_SECP256K1: [], + BLS12_381: [], + ECDSA_HASH160: [], + BIP13_SCRIPT_HASH: [], + EDDSA_25519_HASH160: [], +})) + +// !ENCODE +export const LLMQType = Enum("LLMQType", /** @type {const} */ ({ + LlmqtypeUnknown: [], + Llmqtype50_60: [], + Llmqtype400_60: [], + Llmqtype400_85: [], + Llmqtype100_67: [], + Llmqtype60_75: [], + Llmqtype25_67: [], + LlmqtypeTest: VariantDiscriminant([], 100), + LlmqtypeDevnet: VariantDiscriminant([], 101), + LlmqtypeTestV17: VariantDiscriminant([], 102), + LlmqtypeTestDIP0024: VariantDiscriminant([], 103), + LlmqtypeTestInstantSend: VariantDiscriminant([], 104), + LlmqtypeDevnetDIP0024: VariantDiscriminant([], 105), + LlmqtypeTestnetPlatform: VariantDiscriminant([], 106), + LlmqtypeDevnetPlatform: VariantDiscriminant([], 107), +})) + +// !ENCODE +/** + * Dash Additions + * + * The merkle root of the masternode list + * hash_newtype forward + */ +export const MerkleRootMasternodeList = StructTuple("MerkleRootMasternodeList", + Hash, +); + +// !ENCODE +/** + * The merkle root of the quorums + * hash_newtype forward + */ +export const MerkleRootQuorums = StructTuple("MerkleRootQuorums", + Hash, +); + +/** repr u8 */ +export const Pooling = Enum("Pooling", /** @type {const} */ ({ + /** default */ + Never: [], + IfAvailable: [], + Standard: [], +})) + +// !ENCODE +export const ProviderMasternodeType = Enum("ProviderMasternodeType", /** @type {const} */ ({ + Regular: [], + HighPerformance: [], +})) + +// !ENCODE +/** A hash of a public key. */ +export const PubkeyHash = StructTuple("PubkeyHash", + Hash, +); + +/** repr u8 */ +export const Purpose = Enum("Purpose", /** @type {const} */ ({ + /** + * at least one authentication key must be registered for all security levels + * default + */ + AUTHENTICATION: [], + /** this key cannot be used for signing documents */ + ENCRYPTION: [], + /** this key cannot be used for signing documents */ + DECRYPTION: [], + /** + * this key is used to sign credit transfer and withdrawal state transitions + * this key can also be used by identities for claims and transfers of tokens + */ + TRANSFER: [], + /** this key cannot be used for signing documents */ + SYSTEM: [], + /** this key cannot be used for signing documents */ + VOTING: [], + /** this key is used to prove ownership of a masternode or evonode */ + OWNER: [], +})) + +export const QuorumHash = BlockHash + +// !ENCODE +/** A hash of a quorum verification vector */ +export const QuorumVVecHash = StructTuple("QuorumVVecHash", + Hash, +); + +// !ENCODE +/** "Raw" instant lock for serialization */ +export const RawInstantLockProof = Struct("RawInstantLockProof", { + instant_lock: BinaryData, + transaction: BinaryData, + output_index: VarUint, +}); + +export const RecipientKeyIndex = VarUint + +export const Revision = VarUint + +export const RootEncryptionKeyIndex = VarUint + +// !ENCODE +/** + * An owned, growable script. + * + * `ScriptBuf` is the most common script type that has the ownership over the contents of the + * script. It has a close relationship with its borrowed counterpart, [`Script`]. + * + * Just as other similar types, this implements [`Deref`], so [deref coercions] apply. Also note + * that all the safety/validity restrictions that apply to [`Script`] apply to `ScriptBuf` as well. + * + * [deref coercions]: https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion + */ +export const ScriptBuf = StructTuple("ScriptBuf", + Bytes, +); + +/** repr u8 */ +export const SecurityLevel = Enum("SecurityLevel", /** @type {const} */ ({ + MASTER: [], + CRITICAL: [], + /** default */ + HIGH: [], + MEDIUM: [], +})) + +export const SenderKeyIndex = VarUint + +export const SharedEncryptedNote = Tuple(SenderKeyIndex, RecipientKeyIndex, Bytes) + +/** + * The Storage Key requirements + * repr u8 + */ +export const StorageKeyRequirements = Enum("StorageKeyRequirements", /** @type {const} */ ({ + Unique: [], + Multiple: [], + MultipleReferenceToLatest: [], +})) + +export const TimestampMillis = VarUint + +export const TimestampMillisInterval = VarUint + +export const TokenAmount = VarUint + +/** + * Defines the localized naming format for a token in a specific language. + * + * `TokenConfigurationLocalizationV0` enables tokens to present user-friendly names + * across different locales. This information is not used for validation or consensus + * but enhances UX by allowing consistent display in multilingual interfaces. + */ +export const TokenConfigurationLocalizationV0 = Struct("TokenConfigurationLocalizationV0", { + /** + * Indicates whether the token name should be capitalized when displayed. + * + * This is a stylistic hint for clients (e.g., "Dash" vs. "dash") and is typically + * applied to both singular and plural forms unless overridden. + */ + should_capitalize: Bool, + /** + * The singular form of the token name in the target language. + * + * Example: "Dash", "Dollar", or "Token". + */ + singular_form: String, + /** + * The plural form of the token name in the target language. + * + * Example: "Dash", "Dollars", or "Tokens". + */ + plural_form: String, +}); + +export const TokenContractPosition = VarUint + +/** + * Represents the type of token distribution. + * + * - `PreProgrammed`: A scheduled distribution with predefined rules. + * - `Perpetual`: A continuous or recurring distribution. + */ +export const TokenDistributionType = Enum("TokenDistributionType", /** @type {const} */ ({ + /** + * A pre-programmed distribution scheduled for a specific time. + * default + */ + PreProgrammed: [], + /** A perpetual distribution that occurs at regular intervals. */ + Perpetual: [], +})) + +export const TokenEmergencyAction = Enum("TokenEmergencyAction", /** @type {const} */ ({ + /** default */ + Pause: [], + Resume: [], +})) + +/** + * The rules for keeping a ledger as documents of token events. + * Config update, Destroying Frozen Funds, Emergency Action, + * Pre Programmed Token Release always require an entry to the ledger + */ +export const TokenKeepsHistoryRulesV0 = Struct("TokenKeepsHistoryRulesV0", { + /** Whether transfer history is recorded. */ + keeps_transfer_history: Bool, + /** Whether freezing history is recorded. */ + keeps_freezing_history: Bool, + /** Whether minting history is recorded. */ + keeps_minting_history: Bool, + /** Whether burning history is recorded. */ + keeps_burning_history: Bool, + /** Whether direct pricing history is recorded. */ + keeps_direct_pricing_history: Bool, + /** Whether direct purchase history is recorded. */ + keeps_direct_purchase_history: Bool, +}); + +/** + * Defines the pricing schedule for tokens in terms of credits. + * + * A pricing schedule can either be a single, flat price applied to all + * token amounts, or a tiered pricing model where specific amounts + * correspond to specific credit values. + */ +export const TokenPricingSchedule = Enum("TokenPricingSchedule", /** @type {const} */ ({ + /** + * A single flat price in credits for all token amounts. + * + * This variant is used when the pricing does not depend on + * the number of tokens being purchased or processed. + */ + SinglePrice: [Credits], + /** + * A tiered pricing model where specific token amounts map to credit prices. + * + * This allows for more complex pricing structures, such as + * volume discounts or progressive pricing. The map keys + * represent token amount thresholds, and the values are the + * corresponding credit prices. + * If the first token amount is greater than 1 this means that the user can only + * purchase that amount as a minimum at a time. + */ + SetPrices: [Map(TokenAmount, Credits)], +})) + +export const TokenTradeMode = Enum("TokenTradeMode", /** @type {const} */ ({ + /** default */ + NotTradeable: [], +})) + +// !ENCODE +/** + * The transaction type. Special transactions were introduced in DIP2. + * Compared to Bitcoin the version field is split into two 16 bit integers. + * The first part for the version and the second part for the transaction + * type. + * + * repr u16 + */ +export const TransactionType = Enum("TransactionType", /** @type {const} */ ({ + /** A Classic transaction */ + Classic: [], + /** A Masternode Registration Transaction */ + ProviderRegistration: [], + /** A Masternode Update Service Transaction, used by the operator to signal changes to service */ + ProviderUpdateService: [], + /** A Masternode Update Registrar Transaction, used by the owner to signal base changes */ + ProviderUpdateRegistrar: [], + /** A Masternode Update Revocation Transaction, used by the operator to signal termination of service */ + ProviderUpdateRevocation: [], + /** A Coinbase Transaction, contained as the first transaction in each block */ + Coinbase: [], + /** A Quorum Commitment Transaction, used to save quorum information to the state */ + QuorumCommitment: [], + /** An Asset Lock Transaction, used to transfer credits to Dash Platform, by locking them until withdrawals occur */ + AssetLock: VariantDiscriminant([], 8), + /** An Asset Unlock Transaction, used to withdraw credits from Dash Platform, by unlocking them */ + AssetUnlock: VariantDiscriminant([], 9), +})) + +// !ENCODE +/** A transaction output, which defines new coins to be created from old ones. */ +export const TxOut = Struct("TxOut", { + /** The value of the output, in satoshis. */ + value: VarUint, + /** The script which must be satisfied for the output to be spent. */ + script_pubkey: ScriptBuf, +}); + +// !ENCODE +/** A dash transaction hash/transaction ID. */ +export const Txid = StructTuple("Txid", + Hash, +); + +export const UserFeeIncrease = VarUint + +export const ValueMap = Vec(Tuple(Value, Value)) + +// !ENCODE +/** + * An Asset Lock payload. This is contained as the payload of an asset lock special transaction. + * The Asset Lock Special transaction and this payload is described in the Asset Lock DIP2X + * (todo:update this). + * An Asset Lock can fund multiple Identity registrations or top ups. + * The Asset Lock payload credit outputs field contains a vector of TxOuts. + * Each TxOut refers to a funding of an Identity. + */ +export const AssetLockPayload = Struct("AssetLockPayload", { + version: Uint8, + credit_outputs: Vec(TxOut), +}); + +// !ENCODE +/** + * An asset unlock request info + * This is the information about the signing quorum + * The request height should be the height at which the specified quorum is active on core. + */ +export const AssetUnlockRequestInfo = Struct("AssetUnlockRequestInfo", { + /** + * The core request height of the transaction. This should match a period where the quorum_hash + * is still active + */ + request_height: VarUint, + /** The quorum hash. This is the block hash when the quorum was created. */ + quorum_hash: QuorumHash, +}); + +// !ENCODE +/** + * A Coinbase payload. This is contained as the payload of a coinbase special transaction. + * The Coinbase payload is described in DIP4. + */ +export const CoinbasePayload = Struct("CoinbasePayload", { + version: VarUint, + height: VarUint, + merkle_root_masternode_list: MerkleRootMasternodeList, + merkle_root_quorums: MerkleRootQuorums, + best_cl_height: Option(VarUint), + best_cl_signature: Option(BLSSignature), + asset_locked_amount: Option(VarUint), +}); + +export const DashcoreScript = ScriptBuf + +export const DataContractConfigV0 = Struct("DataContractConfigV0", { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: Bool, + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: Bool, + /** Does the contract keep history when the contract itself changes */ + keeps_history: Bool, + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: Bool, + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: Bool, + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: Bool, + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: Option(StorageKeyRequirements), + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: Option(StorageKeyRequirements), +}); + +export const DataContractConfigV1 = Struct("DataContractConfigV1", { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: Bool, + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: Bool, + /** Does the contract keep history when the contract itself changes */ + keeps_history: Bool, + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: Bool, + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: Bool, + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: Bool, + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: Option(StorageKeyRequirements), + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: Option(StorageKeyRequirements), + /** Use sized integer Rust types for `integer` property type based on validation rules */ + sized_integer_types: Bool, +}); + +// !ENCODE +export const DistributionFunction = Enum("DistributionFunction", /** @type {const} */ ({ + /** + * Emits a constant (fixed) number of tokens for every period. + * + * # Formula + * For any period `x`, the emitted tokens are: + * + * ```text + * f(x) = n + * ``` + * + * # Use Case + * - When a predictable, unchanging reward is desired. + * - Simplicity and stable emissions. + * + * # Example + * - If `n = 5` tokens per block, then after 3 blocks the total emission is 15 tokens. + */ + FixedAmount: { + amount: TokenAmount, + }, + /** + * Emits a random number of tokens within a specified range. + * + * # Description + * - This function selects a **random** token emission amount between `min` and `max`. + * - The value is drawn **uniformly** between the bounds. + * - The randomness uses a Pseudo Random Function (PRF) from x. + * + * # Formula + * For any period `x`, the emitted tokens follow: + * + * ```text + * f(x) ∈ [min, max] + * ``` + * + * # Parameters + * - `min`: The **minimum** possible number of tokens emitted. + * - `max`: The **maximum** possible number of tokens emitted. + * + * # Use Cases + * - **Stochastic Rewards**: Introduces randomness into rewards to incentivize unpredictability. + * - **Lottery-Based Systems**: Used for randomized emissions, such as block rewards with probabilistic payouts. + * + * # Example + * Suppose a system emits **between 10 and 100 tokens per period**. + * + * ```text + * Random { min: 10, max: 100 } + * ``` + * + * | Period (x) | Emitted Tokens (Random) | + * |------------|------------------------| + * | 1 | 27 | + * | 2 | 94 | + * | 3 | 63 | + * | 4 | 12 | + * + * - Each period, the function emits a **random number of tokens** between `min = 10` and `max = 100`. + * - Over time, the **average reward trends toward the midpoint** `(min + max) / 2`. + * + * # Constraints + * - **`min` must be ≤ `max`**, otherwise the function is invalid. + * - If `min == max`, this behaves like a `FixedAmount` function with a constant emission. + */ + Random: { + min: TokenAmount, + max: TokenAmount, + }, + /** + * Emits tokens that decrease in discrete steps at fixed intervals. + * + * # Formula + * For a given period `x`, the emission is calculated as: + * + * ```text + * f(x) = n * (1 - (decrease_per_interval_numerator / decrease_per_interval_denominator))^((x - s) / step_count) + * ``` + * + * For `x <= s`, `f(x) = n` + * + * # Parameters + * - `step_count`: The number of periods between each step. + * - `decrease_per_interval_numerator` and `decrease_per_interval_denominator`: Define the reduction factor per step. + * - `start_decreasing_offset`: Optional start period offset (e.g., start block or time). If not provided, the contract creation start is used. + * If this is provided before this number we give out the distribution start amount every interval. + * - `max_interval_count`: The maximum amount of intervals there can be. Can be up to 1024. + * !!!Very important!!! -> This will default to 128 is default if not set. + * This means that after 128 cycles we will be distributing trailing_distribution_interval_amount per interval. + * - `distribution_start_amount`: The initial token emission. + * - `trailing_distribution_interval_amount`: The token emission after all decreasing intervals. + * - `min_value`: Optional minimum emission value. + * + * # Use Case + * - Modeling reward systems similar to Bitcoin or Dash Core. + * - Encouraging early participation by providing higher rewards initially. + * + * # Example + * - Bitcoin-style: 50% reduction every 210,000 blocks. + * - Dash-style: Approximately a 7% reduction every 210,000 blocks. + */ + StepDecreasingAmount: { + step_count: VarUint, + decrease_per_interval_numerator: VarUint, + decrease_per_interval_denominator: VarUint, + start_decreasing_offset: Option(VarUint), + max_interval_count: Option(VarUint), + distribution_start_amount: TokenAmount, + trailing_distribution_interval_amount: TokenAmount, + min_value: Option(VarUint), + }, + /** + * Emits tokens in fixed amounts for predefined intervals (steps). + * + * # Details + * - Within each step, the emission remains constant. + * - The keys in the `BTreeMap` represent the starting period for each interval, + * and the corresponding values are the fixed token amounts to emit during that interval. + * - VERY IMPORTANT: the steps are the amount of intervals, not the time or the block count. + * So if you have step 5 with interval 10 using blocks that's 50 blocks. + * + * # Use Case + * - Adjusting rewards at specific milestones or time intervals. + * + * # Example + * - Emit 100 tokens per block for the first 1,000 blocks, then 50 tokens per block thereafter. + */ + Stepwise: [Map(VarUint, TokenAmount)], + /** + * Emits tokens following a linear function that can increase or decrease over time + * with fractional precision. + * + * # Formula + * The emission at period `x` is given by: + * + * ```text + * f(x) = (a * (x - start_step) / d) + starting_amount + * ``` + * + * # Parameters + * - `a`: The slope numerator; determines the rate of change. + * - `d`: The slope divisor; together with `a` controls the fractional rate. + * - `s`: Optional start period offset. If not set, the contract creation start is assumed. + * - `b`: The initial token emission (offset). + * - `min_value` / `max_value`: Optional bounds to clamp the emission. + * + * # Details + * - If `a > 0`, emissions increase over time. + * - If `a < 0`, emissions decrease over time. + * + * # Behavior + * - **If `a > 0`**, emissions increase linearly over time. + * - **If `a < 0`**, emissions decrease linearly over time. + * - **If `a = 0`**, emissions remain constant at `b`. + * + * # Use Cases + * - **Predictable Inflation or Deflation:** A simple mechanism to adjust token supply dynamically. + * - **Long-Term Incentive Structures:** Ensures steady and measurable growth or reduction of rewards. + * - **Decaying Emissions:** Can be used to gradually taper off token rewards over time. + * - **Sustained Growth Models:** Encourages prolonged engagement by steadily increasing rewards. + * + * # Examples + * + * ## **1️⃣ Increasing Linear Emission (`a > 0`)** + * - Tokens increase by **1 token per block** starting from 10. + * + * ```text + * f(x) = (1 * (x - 0) / 1) + 10 + * ``` + * + * | Block (x) | f(x) (Tokens) | + * |-----------|---------------| + * | 0 | 10 | + * | 1 | 11 | + * | 2 | 12 | + * | 3 | 13 | + * + * **Use Case:** Encourages continued participation by providing increasing rewards over time. + * + * --- + * + * ## **2️⃣ Decreasing Linear Emission (`a < 0`)** + * - Tokens **start at 100 and decrease by 2 per period**. + * + * ```text + * f(x) = (-2 * (x - 0) / 1) + 100 + * ``` + * + * | Block (x) | f(x) (Tokens) | + * |-----------|---------------| + * | 0 | 100 | + * | 1 | 98 | + * | 2 | 96 | + * | 3 | 94 | + * + * **Use Case:** Suitable for deflationary models where rewards need to decrease over time. + * + * --- + * + * ## **3️⃣ Emission with a Delayed Start (`s > 0`)** + * - **No emissions before `x = s`** (e.g., rewards start at block `10`). + * + * ```text + * f(x) = (5 * (x - 10) / 1) + 50 + * ``` + * + * | Block (x) | f(x) (Tokens) | + * |-----------|---------------| + * | 9 | 50 (no change)| + * | 10 | 50 | + * | 11 | 55 | + * | 12 | 60 | + * + * **Use Case:** Useful when rewards should only begin at a specific milestone. + * + * --- + * + * ## **4️⃣ Clamping Emissions with `min_value` and `max_value`** + * - **Start at 50, increase by 2, but never exceed 60.** + * + * ```text + * f(x) = (2 * (x - 0) / 1) + 50 + * ``` + * + * | Block (x) | f(x) (Tokens) | + * |-----------|---------------| + * | 0 | 50 | + * | 1 | 52 | + * | 2 | 54 | + * | 5 | 60 (max cap) | + * + * **Use Case:** Prevents runaway inflation by limiting the emission range. + * + * --- + * + * # Summary + * - **Increasing rewards (`a > 0`)**: Encourages longer participation. + * - **Decreasing rewards (`a < 0`)**: Supports controlled deflation. + * - **Delayed start (`s > 0`)**: Ensures rewards only begin at a specific point. + * - **Clamping (`min_value`, `max_value`)**: Maintains controlled emission boundaries. + */ + Linear: { + a: VarInt, + d: VarUint, + start_step: Option(VarUint), + starting_amount: TokenAmount, + min_value: Option(VarUint), + max_value: Option(VarUint), + }, + /** + * Emits tokens following a polynomial curve with integer arithmetic. + * + * # Formula + * The emission at period `x` is given by: + * + * ```text + * f(x) = (a * (x - s + o)^(m/n)) / d + b + * ``` + * + * # Parameters + * - `a`: Scaling factor for the polynomial term. + * - `m` and `n`: Together specify the exponent as a rational number (allowing non-integer exponents). + * - `d`: A divisor for scaling. + * - `s`: Optional start period offset. If not provided, the contract creation start is used. + * - `o`: An offset for the polynomial function, this is useful if s is in None, + * - `b`: An offset added to the computed value. + * - `min_value` / `max_value`: Optional bounds to constrain the emission. + * + * # Behavior & Use Cases + * The polynomial function's behavior depends on the values of `a` (scaling factor) and `m` (exponent numerator). + * + * ## **1️⃣ `a > 0`, `m > 0` (Increasing Polynomial Growth)** + * - **Behavior**: Emissions **increase at an accelerating rate** over time. + * - **Use Case**: Suitable for models where incentives start small and grow over time (e.g., boosting late-stage participation). + * - **Example**: + * ```text + * f(x) = (2 * (x - s + o)^2) / d + 10 + * ``` + * - If `s = 0`, `o = 0`, and `d = 1`, then: + * - `f(1) = 12` + * - `f(2) = 18` + * - `f(3) = 28` (Emissions **accelerate over time**) + * + * ## **2️⃣ `a > 0`, `m < 0` (Decreasing Polynomial Decay)** + * - **Behavior**: Emissions **start high and gradually decline**. + * - **Use Case**: Useful for front-loaded incentives where rewards are larger at the beginning and taper off over time. + * - **Example**: + * ```text + * f(x) = (5 * (x - s + o)^(-1)) / d + 10 + * ``` + * - If `s = 0`, `o = 0`, and `d = 1`, then: + * - `f(1) = 15` + * - `f(2) = 12.5` + * - `f(3) = 11.67` (Emissions **shrink but never hit zero**) + * + * ## **3️⃣ `a < 0`, `m > 0` (Inverted Growth → Decreasing Over Time)** + * - **Behavior**: Emissions **start large but decrease faster over time**. + * - **Use Case**: Suitable for cases where high initial incentives quickly drop off (e.g., limited early rewards). + * - **Example**: + * ```text + * f(x) = (-3 * (x - s + o)^2) / d + 50 + * ``` + * - If `s = 0`, `o = 0`, and `d = 1`, then: + * - `f(1) = 47` + * - `f(2) = 38` + * - `f(3) = 23` (Emissions **fall sharply**) + * + * ## **4️⃣ `a < 0`, `m < 0` (Inverted Decay → Slowing Increase)** + * - **Behavior**: Emissions **start low, rise gradually, and then flatten out**. + * - **Use Case**: Useful for controlled inflation where rewards increase over time but approach a stable maximum. + * - **Example**: + * ```text + * f(x) = (-10 * (x - s + o)^(-2)) / d + 50 + * ``` + * - If `s = 0`, `o = 0`, and `d = 1`, then: + * - `f(1) = 40` + * - `f(2) = 47.5` + * - `f(3) = 48.89` (Growth **slows as it approaches 50**) + * + * # Summary + * - **Positive `a` means increasing emissions**, while **negative `a` means decreasing emissions**. + * - **Positive `m` leads to growth**, while **negative `m` leads to decay**. + * - The combination of `a` and `m` defines whether emissions accelerate, decay, or remain stable. + */ + Polynomial: { + a: VarInt, + d: VarUint, + m: VarInt, + n: VarUint, + o: VarInt, + start_moment: Option(VarUint), + b: TokenAmount, + min_value: Option(VarUint), + max_value: Option(VarUint), + }, + /** + * Emits tokens following an exponential function. + * + * # Formula + * The emission at period `x` is given by: + * + * ```text + * f(x) = (a * e^(m * (x - s + o) / n)) / d + b + * ``` + * + * # Parameters + * - `a`: The scaling factor. + * - `m` and `n`: Define the exponent rate (with `m > 0` for growth and `m < 0` for decay). + * - `d`: A divisor used to scale the exponential term. + * - `s`: Optional start period offset. If not set, the contract creation start is assumed. + * - `o`: An offset for the exp function, this is useful if s is in None. + * - `b`: An offset added to the result. + * - `min_value` / `max_value`: Optional constraints on the emitted tokens. + * + * # Use Cases + * ## **Exponential Growth (`m > 0`):** + * - **Incentivized Spending**: Higher emissions over time increase the circulating supply, encouraging users to spend tokens. + * - **Progressive Emission Models**: Useful for models where early emissions are low but increase significantly over time. + * - **Early-Stage Adoption Strategies**: Helps drive later participation by offering increasing rewards as time progresses. + * + * ## **Exponential Decay (`m < 0`):** + * - **Deflationary Reward Models**: Reduces emissions over time, ensuring token scarcity. + * - **Early Participation Incentives**: Encourages early users by distributing more tokens initially and gradually decreasing rewards. + * - **Sustainable Emission Models**: Helps manage token supply while preventing runaway inflation. + * + * # Examples + * ## **Example 1: Exponential Growth (`m > 0`)** + * - **Use Case**: A staking model where rewards increase over time to encourage long-term participation. + * - **Parameters**: `a = 100`, `m = 2`, `n = 50`, `d = 10`, `c = 5` + * - **Formula**: + * ```text + * f(x) = (100 * e^(2 * (x - s) / 50)) / 10 + 5 + * ``` + * - **Effect**: Emissions start small but **increase exponentially** over time, rewarding late stakers more than early ones. + * + * ## **Example 2: Exponential Decay (`m < 0`)** + * - **Use Case**: A deflationary model where emissions start high and gradually decrease to ensure scarcity. + * - **Parameters**: `a = 500`, `m = -3`, `n = 100`, `d = 20`, `b = 10` + * - **Formula**: + * ```text + * f(x) = (500 * e^(-3 * (x - s) / 100)) / 20 + 10 + * ``` + * - **Effect**: Emissions start **high and decay exponentially**, ensuring early participants get larger rewards. + */ + Exponential: { + a: VarUint, + d: VarUint, + m: VarInt, + n: VarUint, + o: VarInt, + start_moment: Option(VarUint), + b: TokenAmount, + min_value: Option(VarUint), + max_value: Option(VarUint), + }, + /** + * Emits tokens following a natural logarithmic (ln) function. + * + * # Formula + * The emission at period `x` is computed as: + * + * ```text + * f(x) = (a * ln(m * (x - s + o) / n)) / d + b + * ``` + * + * # Parameters + * - `a`: Scaling factor for the logarithmic term. + * - `d`: A divisor for scaling. + * - `m` and `n`: Adjust the input to the logarithm function. + * - `s`: Optional start period offset. If not provided, the contract creation start is used. + * - `o`: An offset for the log function, this is useful if s is in None. + * - `b`: An offset added to the result. + * - `min_value` / `max_value`: Optional bounds to ensure the emission remains within limits. + * + * # Use Case + * - **Gradual Growth with a Slowing Rate**: Suitable for reward schedules where the emission + * starts at a lower rate, increases quickly at first, but then slows down over time. + * - **Predictable Emission Scaling**: Ensures a growing but controlled emission curve that + * does not escalate too quickly. + * - **Sustainability and Inflation Control**: Helps prevent runaway token supply growth + * by ensuring rewards increase at a decreasing rate. + * + * # Example + * - Suppose we want token emissions to start at a low value and grow over time, but at a + * **decreasing rate**, ensuring controlled long-term growth. + * + * - Given the formula: + * ```text + * f(x) = (a * ln(m * (x - s + o) / n)) / d + b + * ``` + * + * - Let’s assume the following parameters: + * - `a = 100`: Scaling factor. + * - `d = 10`: Divisor to control overall scaling. + * - `m = 2`, `n = 1`: Adjust the logarithmic input. + * - `s = 0`, `o = 1`: Starting conditions. + * - `b = 50`: Base amount added. + * + * - This results in: + * ```text + * f(x) = (100 * ln(2 * (x + 1) / 1)) / 10 + 50 + * ``` + * + * - **Expected Behavior:** + * - At `x = 1`, emission = `f(1) = (100 * log(4)) / 10 + 50 ≈ 82` + * - At `x = 10`, emission = `f(10) = (100 * log(22)) / 10 + 50 ≈ 106` + * - At `x = 100`, emission = `f(100) = (100 * log(202)) / 10 + 50 ≈ 130` + * + * - **Observations:** + * - The emission **increases** over time, but at a **slowing rate**. + * - Early increases are more pronounced, but as `x` grows, the additional reward per + * period gets smaller. + * - This makes it ideal for long-term, controlled emission models. + */ + Logarithmic: { + a: VarInt, + d: VarUint, + m: VarUint, + n: VarUint, + o: VarInt, + start_moment: Option(VarUint), + b: TokenAmount, + min_value: Option(VarUint), + max_value: Option(VarUint), + }, + /** + * Emits tokens following an inverted natural logarithmic function. + * + * # Formula + * The emission at period `x` is given by: + * + * ```text + * f(x) = (a * ln( n / (m * (x - s + o)) )) / d + b + * ``` + * + * # Parameters + * - `a`: Scaling factor. + * - `d`: Divisor for scaling. + * - `m` and `n`: Together control the logarithm argument inversion. + * - `o`: Offset applied inside the logarithm. + * - `s`: Optional start period offset. + * - `b`: Offset added to the computed value. + * - `min_value` / `max_value`: Optional boundaries for the emission. + * + * # Use Case + * - **Gradual Decay of Rewards**: Suitable when early adopters should receive higher rewards, + * but later participants should receive smaller but still meaningful amounts. + * - **Resource Draining / Controlled Burn**: Used when token emissions should drop significantly + * at first but slow down over time to preserve capital. + * - **Airdrop or Grant System**: Ensures early claimants receive larger distributions, but later + * claimants receive diminishing rewards. + * + * # Example + * ```text + * f(x) = 10000 * ln(5000 / x) + * ``` + * - Values: a = 10000 n = 5000 m = 1 o = 0 b = 0 d = 0 + * y + * ↑ + * 10000 |* + * 9000 | * + * 8000 | * + * 7000 | * + * 6000 | * + * 5000 | * + * 4000 | * + * 3000 | * + * 2000 | * + * 1000 | * + * 0 +-------------------*----------→ x + * 0 2000 4000 6000 8000 + * + * - The emission **starts high** and **gradually decreases**, ensuring early adopters receive + * more tokens while later participants still get rewards. + * - The function **slows down the rate of decrease** over time, preventing emissions from + * hitting zero too quickly. + */ + InvertedLogarithmic: { + a: VarInt, + d: VarUint, + m: VarUint, + n: VarUint, + o: VarInt, + start_moment: Option(VarUint), + b: TokenAmount, + min_value: Option(VarUint), + max_value: Option(VarUint), + }, +})) + +export const Identifier = StructTuple("Identifier", + IdentifierBytes32, +); + +/** platform_serialize unversioned */ +export const IdentityCreditTransferTransitionV0 = Struct("IdentityCreditTransferTransitionV0", { + identity_id: Identifier, + recipient_id: Identifier, + amount: VarUint, + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +export const InstantAssetLockProof = RawInstantLockProof + +// !ENCODE +/** A reference to a transaction output. */ +export const OutPoint = Struct("OutPoint", { + /** The referenced transaction's txid. */ + txid: Txid, + /** The index of the referenced output in its transaction's vout. */ + vout: VarUint, +}); + +export const PrivateEncryptedNote = Tuple(RootEncryptionKeyIndex, DerivationEncryptionKeyIndex, Bytes) + +// !ENCODE +/** + * A Provider Registration Payload used in a Provider Registration Special Transaction. + * This is used to register a Masternode on the network. + * The current version is 0. + * Interesting Fields: + * *Provider type refers to the type of Masternode. Currently only valid value is 0. + * *Provider mode refers to the mode of the Masternode. Currently only valid value is 0. + * *The collateral outpoint links to a transaction with a 1000 Dash unspent (at registration) + * outpoint. + * *The operator reward defines the ratio when divided by 10000 of the amount going to the operator. + * The max value for the operator reward is 10000. + * *The script payout is the script to which one wants to have the masternode pay out. + * *The inputs hash is used to guarantee the uniqueness of the payload sig. + */ +export const ProviderRegistrationPayload = Struct("ProviderRegistrationPayload", { + version: VarUint, + masternode_type: ProviderMasternodeType, + masternode_mode: VarUint, + collateral_outpoint: OutPoint, + service_address: SocketAddr, + owner_key_hash: PubkeyHash, + operator_public_key: BLSPublicKey, + voting_key_hash: PubkeyHash, + operator_reward: VarUint, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + signature: Bytes, + platform_node_id: Option(PubkeyHash), + platform_p2p_port: Option(VarUint), + platform_http_port: Option(VarUint), +}); + +// !ENCODE +/** + * A Provider Update Registrar Payload used in a Provider Update Registrar Special Transaction. + * This is used to update the base aspects a Masternode on the network. + * It must be signed by the owner's key that was set at registration. + */ +export const ProviderUpdateRegistrarPayload = Struct("ProviderUpdateRegistrarPayload", { + version: VarUint, + pro_tx_hash: Txid, + provider_mode: VarUint, + operator_public_key: BLSPublicKey, + voting_key_hash: PubkeyHash, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + payload_sig: Bytes, +}); + +// !ENCODE +/** + * A Provider Update Revocation Payload used in a Provider Update Revocation Special Transaction. + * This is used to signal and stop a Masternode from the operator. + * It must be signed by the operator's key that was set at registration or registrar update. + */ +export const ProviderUpdateRevocationPayload = Struct("ProviderUpdateRevocationPayload", { + version: VarUint, + pro_tx_hash: Txid, + reason: VarUint, + inputs_hash: InputsHash, + payload_sig: BLSSignature, +}); + +// !ENCODE +/** + * A Provider Update Service Payload used in a Provider Update Service Special Transaction. + * This is used to update the operational aspects a Masternode on the network. + * It must be signed by the operator's key that was set either at registration or by the last + * registrar update of the masternode. + */ +export const ProviderUpdateServicePayload = Struct("ProviderUpdateServicePayload", { + version: VarUint, + pro_tx_hash: Txid, + ip_address: VarUint, + port: VarUint, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + payload_sig: BLSSignature, +}); + +// !ENCODE +/** + * A Quorum Finalization Commitment. It is described in the finalization section of DIP6: + * [dip-0006.md#6-finalization-phase](https://github.com/dashpay/dips/blob/master/dip-0006.md#6-finalization-phase) + */ +export const QuorumEntry = Struct("QuorumEntry", { + version: VarUint, + llmq_type: LLMQType, + quorum_hash: QuorumHash, + quorum_index: Option(VarInt), + signers: Vec(Bool), + valid_members: Vec(Bool), + quorum_public_key: BLSPublicKey, + quorum_vvec_hash: QuorumVVecHash, + threshold_sig: BLSSignature, + all_commitment_aggregated_signature: BLSSignature, +}); + +/** + * A representation of a dynamic value that can handled dynamically + * non_exhaustive + */ +export const REAL_Value = Enum("Value", /** @type {const} */ ({ + /** A u128 integer */ + U128: [VarUint], + /** A i128 integer */ + I128: [VarInt], + /** A u64 integer */ + U64: [VarUint], + /** A i64 integer */ + I64: [VarInt], + /** A u32 integer */ + U32: [VarUint], + /** A i32 integer */ + I32: [VarInt], + /** A u16 integer */ + U16: [VarUint], + /** A i16 integer */ + I16: [VarInt], + /** A u8 integer */ + U8: [Uint8], + /** A i8 integer */ + I8: [Int8], + /** Bytes */ + Bytes: [Bytes], + /** Bytes 20 */ + Bytes20: [FixedBytes(20)], + /** Bytes 32 */ + Bytes32: [FixedBytes(32)], + /** Bytes 36 : Useful for outpoints */ + Bytes36: [FixedBytes(36)], + /** An enumeration of u8 */ + EnumU8: [Bytes], + /** An enumeration of strings */ + EnumString: [Vec(String)], + /** + * Identifier + * The identifier is very similar to bytes, however it is serialized to Base58 when converted + * to a JSON Value + */ + Identifier: [Hash256], + /** A float */ + Float: [Float64], + /** A string */ + Text: [String], + /** A boolean */ + Bool: [Bool], + /** Null */ + Null: [], + /** An array */ + Array: [Vec(Value)], + /** A map */ + Map: [ValueMap], +})) + +/** + * A resource votes is a votes determining what we should do with a contested resource. + * For example Alice and Bob both want the username "Malaka" + * Some would vote for Alice to get it by putting in her Identifier. + * Some would vote for Bob to get it by putting in Bob's Identifier. + * Let's say someone voted, but is now not quite sure of their votes, they can abstain. + * Lock is there to signal that the shared resource should be given to no one. + * In this case Malaka might have a bad connotation in Greek, hence some might votes to Lock + * the name. + */ +export const ResourceVoteChoice = Enum("ResourceVoteChoice", /** @type {const} */ ({ + TowardsIdentity: [Identifier], + /** default */ + Abstain: [], + Lock: [], +})) + +export const RewardDistributionType = Enum("RewardDistributionType", /** @type {const} */ ({ + /** + * An amount of tokens is emitted every n blocks. + * The start and end are included if set. + * If start is not set then it will start at the height of the block when the data contract + * is registered. + */ + BlockBasedDistribution: { + interval: BlockHeightInterval, + function: DistributionFunction, + }, + /** + * An amount of tokens is emitted every amount of time given. + * The start and end are included if set. + * If start is not set then it will start at the time of the block when the data contract + * is registered. + */ + TimeBasedDistribution: { + interval: TimestampMillisInterval, + function: DistributionFunction, + }, + /** + * An amount of tokens is emitted every amount of epochs. + * The start and end are included if set. + * If start is not set then it will start at the epoch of the block when the data contract + * is registered. A distribution would happen at the start of the following epoch, even if it + * is just 1 block later. + */ + EpochBasedDistribution: { + interval: EpochInterval, + function: DistributionFunction, + }, +})) + +Value = REAL_Value; + +/** + * Versioned wrapper for token name localization data. + * + * `TokenConfigurationLocalization` allows extensibility for future schema upgrades + * while preserving backward compatibility. Each variant represents a specific format + * version for localization information. + * + * This structure is used to map language codes to localized token names in a flexible, + * forward-compatible manner. + */ +export const TokenConfigurationLocalization = Enum("TokenConfigurationLocalization", /** @type {const} */ ({ + /** + * Version 0 of the token localization schema. + * + * Defines basic capitalization preference, singular form, and plural form + * for displaying token names. + */ + V0: [TokenConfigurationLocalizationV0], +})) + +/** platform_serialize unversioned */ +export const TokenDistributionRecipient = Enum("TokenDistributionRecipient", /** @type {const} */ ({ + /** + * Distribute to the contract Owner + * default + */ + ContractOwner: [], + /** Distribute to a single identity */ + Identity: [Identifier], + /** + * Distribute tokens by participation + * This distribution can only happen when choosing epoch based distribution + */ + EvonodesByParticipation: [], +})) + +export const TokenKeepsHistoryRules = Enum("TokenKeepsHistoryRules", /** @type {const} */ ({ + V0: [TokenKeepsHistoryRulesV0], +})) + +export const TokenPaymentInfoV0 = Struct("TokenPaymentInfoV0", { + /** + * By default, we use a token in the same contract, this field must be set if the document + * requires payment using another contracts token. + */ + payment_token_contract_id: Option(Identifier), + /** + * If we are expecting to pay with a token in a contract, which token are we expecting + * to pay with? + * We have this set so contract owners can't switch out to more valuable token. + * For example if my Data contract + */ + token_contract_position: TokenContractPosition, + /** Minimum token cost, this most often should not be set */ + minimum_token_cost: Option(TokenAmount), + /** + * Maximum token cost, this most often should be set + * If: + * - a client does not have this set + * - and the data contract allows the price of NFTs to be changed by the data contract's owner or allowed party. + * Then: + * - The user could see the cost changed on them + */ + maximum_token_cost: Option(TokenAmount), + /** Who pays the gas fees, this needs to match what the contract allows */ + gas_fees_paid_by: GasFeesPaidBy, +}); + +export const TokenPerpetualDistributionV0 = Struct("TokenPerpetualDistributionV0", { + /** The distribution type that the token will use */ + distribution_type: RewardDistributionType, + /** The recipient type */ + distribution_recipient: TokenDistributionRecipient, +}); + +export const TokenPreProgrammedDistributionV0 = Struct("TokenPreProgrammedDistributionV0", { + distributions: Map(TimestampMillis, Map(Identifier, TokenAmount)), +}); + +// !ENCODE +/** + * A Credit Withdrawal payload. This is contained as the payload of a credit withdrawal special + * transaction. + * The Credit Withdrawal Special transaction and this payload is described in the Asset Lock DIP2X + * (todo:update this). + * The Credit Withdrawal Payload is signed by a quorum. + * + * Transaction using it have no inputs. Hence the proof of validity lies solely on the BLS signature. + */ +export const AssetUnlockPayload = Struct("AssetUnlockPayload", { + /** + * The base information about the asset unlock. This base information is the information that + * should be put into a queue. + */ + base: AssetUnlockBasePayload, + /** + * The request information. This should be added to the unlock transaction as it is being sent + * to be signed. + */ + request_info: AssetUnlockRequestInfo, + /** The threshold signature. This should be returned by the consensus engine. */ + quorum_sig: BLSSignature, +}); + +export const AuthorizedActionTakers = Enum("AuthorizedActionTakers", /** @type {const} */ ({ + /** default */ + NoOne: [], + ContractOwner: [], + Identity: [Identifier], + MainGroup: [], + Group: [GroupContractPosition], +})) + +// !ENCODE +/** + * Instant Asset Lock Proof is a part of Identity Create and Identity Topup + * transitions. It is a proof that specific output of dash is locked in credits + * pull and the transitions can mint credits and populate identity's balance. + * To prove that the output is locked, a height where transaction was chain locked is provided. + */ +export const ChainAssetLockProof = Struct("ChainAssetLockProof", { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: VarUint, + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: OutPoint, +}); + +export const ChangeControlRulesV0 = Struct("ChangeControlRulesV0", { + /** This is who is authorized to make such a change */ + authorized_to_make_change: AuthorizedActionTakers, + /** This is who is authorized to make such a change to the people authorized to make a change */ + admin_action_takers: AuthorizedActionTakers, + /** Are we allowed to change to None in the future */ + changing_authorized_action_takers_to_no_one_allowed: Bool, + /** Are we allowed to change the admin action takers to no one in the future */ + changing_admin_action_takers_to_no_one_allowed: Bool, + /** Can the admin action takers change themselves */ + self_changing_admin_action_takers_allowed: Bool, +}); + +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const ContestedDocumentResourceVotePoll = Struct("ContestedDocumentResourceVotePoll", { + contract_id: Identifier, + document_type_name: String, + index_name: String, + index_values: Vec(Value), +}); + +/** + * A contract bounds is the bounds that the key has influence on. + * For authentication keys the bounds mean that the keys can only be used to sign + * within the specified contract. + * For encryption decryption this tells clients to only use these keys for specific + * contracts. + * + * repr u8 + */ +export const ContractBounds = Enum("ContractBounds", /** @type {const} */ ({ + /** this key can only be used within a specific contract */ + SingleContract: { + id: Identifier, + }, + /** this key can only be used within a specific contract and for a specific document type */ + SingleContractDocumentType: { + id: Identifier, + document_type_name: String, + }, +})) + +// !ENCODE +export const CoreScript = StructTuple("CoreScript", + DashcoreScript, +); + +export const DataContractConfig = Enum("DataContractConfig", /** @type {const} */ ({ + V0: [DataContractConfigV0], + V1: [DataContractConfigV1], +})) + +export const DataContractInSerializationFormatV0 = Struct("DataContractInSerializationFormatV0", { + /** A unique identifier for the data contract. */ + id: Identifier, + /** Internal configuration for the contract. */ + config: DataContractConfig, + /** The version of this data contract. */ + version: VarUint, + /** The identifier of the contract owner. */ + owner_id: Identifier, + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: Option(Map(DefinitionName, Value)), + /** Document JSON Schemas per type */ + document_schemas: Map(DocumentName, Value), +}); + +export const DocumentBaseTransitionV0 = Struct("DocumentBaseTransitionV0", { + /** The document ID */ + id: Identifier, + identity_contract_nonce: IdentityNonce, + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: String, + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier, +}); + +export const GroupStateTransitionInfo = Struct("GroupStateTransitionInfo", { + group_contract_position: GroupContractPosition, + action_id: Identifier, + /** This is true if we are the proposer, otherwise we are just voting on a previous action. */ + action_is_proposer: Bool, +}); + +/** platform_serialize unversioned */ +export const GroupV0 = Struct("GroupV0", { + members: Map(Identifier, GroupMemberPower), + required_power: GroupRequiredPower, +}); + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_credit_transfer_state_transition" + */ +export const IdentityCreditTransferTransition = Enum("IdentityCreditTransferTransition", /** @type {const} */ ({ + V0: [IdentityCreditTransferTransitionV0], +})) + +export const IdentityCreditWithdrawalTransitionV0 = Struct("IdentityCreditWithdrawalTransitionV0", { + identity_id: Identifier, + amount: VarUint, + core_fee_per_byte: VarUint, + pooling: Pooling, + output_script: CoreScript, + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +export const IdentityCreditWithdrawalTransitionV1 = Struct("IdentityCreditWithdrawalTransitionV1", { + identity_id: Identifier, + amount: VarUint, + core_fee_per_byte: VarUint, + pooling: Pooling, + /** If the send to output script is None, then we send the withdrawal to the address set by core */ + output_script: Option(CoreScript), + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +export const IdentityPublicKeyInCreationV0 = Struct("IdentityPublicKeyInCreationV0", { + id: KeyID, + key_type: KeyType, + purpose: Purpose, + security_level: SecurityLevel, + contract_bounds: Option(ContractBounds), + read_only: Bool, + data: BinaryData, + /** The signature is needed for ECDSA_SECP256K1 Key type and BLS12_381 Key type */ + signature: NotSignable(BinaryData), +}); + +export const IdentityPublicKeyV0 = Struct("IdentityPublicKeyV0", { + id: KeyID, + purpose: Purpose, + security_level: SecurityLevel, + contract_bounds: Option(ContractBounds), + key_type: KeyType, + read_only: Bool, + data: BinaryData, + disabled_at: Option(TimestampMillis), +}); + +// !ENCODE +/** + * A Quorum Commitment Payload used in a Quorum Commitment Special Transaction. + * This is used in the mining phase as described in DIP 6: + * [dip-0006.md#7-mining-phase](https://github.com/dashpay/dips/blob/master/dip-0006.md#7-mining-phase). + * + * Miners take the best final commitment for a DKG session and mine it into a block. + */ +export const QuorumCommitmentPayload = Struct("QuorumCommitmentPayload", { + version: VarUint, + height: VarUint, + finalization_commitment: QuorumEntry, +}); + +export const TokenBaseTransitionV0 = Struct("TokenBaseTransitionV0", { + identity_contract_nonce: IdentityNonce, + /** ID of the token within the contract */ + token_contract_position: VarUint, + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier, + /** Token ID generated from the data contract ID and the token position */ + token_id: Identifier, + /** Using group multi party rules for authentication */ + using_group_info: Option(GroupStateTransitionInfo), +}); + +/** + * Defines display conventions for a token, including name localization and decimal precision. + * + * `TokenConfigurationConventionV0` provides human-readable metadata to guide client applications + * in rendering token names and formatting token values. This structure is purely informative + * and does not affect consensus-critical logic or supply calculations. + */ +export const TokenConfigurationConventionV0 = Struct("TokenConfigurationConventionV0", { + /** + * A mapping of ISO 639-1 language codes (2-letter lowercase strings) to localized + * token names and metadata. + * + * These localizations enable wallets and dApps to display token information in the + * user's preferred language. At least one localization (e.g., English) is strongly recommended. + */ + localizations: Map(String, TokenConfigurationLocalization), + /** + * The number of decimal places used to represent the token. + * + * For example, a value of `8` means that one full token is represented as `10^8` base units + * (similar to Bitcoin's satoshis or Dash's duffs). + * + * This value is used by clients to determine formatting and user interface display. + */ + decimals: Uint8, +}); + +export const TokenPaymentInfo = Enum("TokenPaymentInfo", /** @type {const} */ ({ + V0: [TokenPaymentInfoV0], +})) + +/** platform_serialize unversioned */ +export const TokenPerpetualDistribution = Enum("TokenPerpetualDistribution", /** @type {const} */ ({ + V0: [TokenPerpetualDistributionV0], +})) + +export const TokenPreProgrammedDistribution = Enum("TokenPreProgrammedDistribution", /** @type {const} */ ({ + V0: [TokenPreProgrammedDistributionV0], +})) + +// !ENCODE +/** + * An enum wrapper around various special transaction payloads. + * Special transactions are defined in DIP 2. + */ +export const TransactionPayload = Enum("TransactionPayload", /** @type {const} */ ({ + /** A wrapper for a Masternode Registration payload */ + ProviderRegistrationPayloadType: [ProviderRegistrationPayload], + /** A wrapper for a Masternode Update Service payload */ + ProviderUpdateServicePayloadType: [ProviderUpdateServicePayload], + /** A wrapper for a Masternode Update Registrar payload */ + ProviderUpdateRegistrarPayloadType: [ProviderUpdateRegistrarPayload], + /** A wrapper for a Masternode Update Revocation payload */ + ProviderUpdateRevocationPayloadType: [ProviderUpdateRevocationPayload], + /** A wrapper for a Coinbase payload */ + CoinbasePayloadType: [CoinbasePayload], + /** A wrapper for a Quorum Commitment payload */ + QuorumCommitmentPayloadType: [QuorumCommitmentPayload], + /** A wrapper for an Asset Lock payload */ + AssetLockPayloadType: [AssetLockPayload], + /** A wrapper for an Asset Unlock payload */ + AssetUnlockPayloadType: [AssetUnlockPayload], +})) + +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const VotePoll = Enum("VotePoll", /** @type {const} */ ({ + ContestedDocumentResourceVotePoll: [ContestedDocumentResourceVotePoll], +})) + +/** allow clippy :: large_enum_variant */ +export const AssetLockProof = Enum("AssetLockProof", /** @type {const} */ ({ + Instant: [InstantAssetLockProof], + Chain: [ChainAssetLockProof], +})) + +export const ChangeControlRules = Enum("ChangeControlRules", /** @type {const} */ ({ + V0: [ChangeControlRulesV0], +})) + +export const DocumentBaseTransitionV1 = Struct("DocumentBaseTransitionV1", { + /** The document ID */ + id: Identifier, + identity_contract_nonce: IdentityNonce, + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: String, + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier, + /** An optional Token Payment Info */ + token_payment_info: Option(TokenPaymentInfo), +}); + +/** platform_serialize unversioned */ +export const Group = Enum("Group", /** @type {const} */ ({ + V0: [GroupV0], +})) + +/** + * platform_serialize unversioned + * platform_version_path "dpp.state_transition_serialization_versions.identity_credit_withdrawal_state_transition" + */ +export const IdentityCreditWithdrawalTransition = Enum("IdentityCreditWithdrawalTransition", /** @type {const} */ ({ + V0: [IdentityCreditWithdrawalTransitionV0], + V1: [IdentityCreditWithdrawalTransitionV1], +})) + +/** platform_serialize limit = 2000 , unversioned */ +export const IdentityPublicKey = Enum("IdentityPublicKey", /** @type {const} */ ({ + V0: [IdentityPublicKeyV0], +})) + +export const IdentityPublicKeyInCreation = Enum("IdentityPublicKeyInCreation", /** @type {const} */ ({ + V0: [IdentityPublicKeyInCreationV0], +})) + +export const IdentityTopUpTransitionV0 = Struct("IdentityTopUpTransitionV0", { + asset_lock_proof: AssetLockProof, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + signature: NotSignable(BinaryData), +}); + +export const IdentityUpdateTransitionV0 = Struct("IdentityUpdateTransitionV0", { + /** Unique identifier of the identity to be updated */ + identity_id: Identifier, + /** The revision of the identity after update */ + revision: Revision, + /** Identity nonce for this transition to prevent replay attacks */ + nonce: IdentityNonce, + /** + * Public Keys to add to the Identity + * we want to skip serialization of transitions, as we does it manually in `to_object()` and `to_json()` + */ + add_public_keys: Vec(IdentityPublicKeyInCreation), + /** Identity Public Keys ID's to disable for the Identity */ + disable_public_keys: Vec(KeyID), + /** The fee multiplier */ + user_fee_increase: UserFeeIncrease, + /** The ID of the public key used to sing the State Transition */ + signature_public_key_id: NotSignable(KeyID), + /** Cryptographic signature of the State Transition */ + signature: NotSignable(BinaryData), +}); + +// !ENCODE +/** + * Implement the Identity. Identity is a low-level construct that provides the foundation + * for user-facing functionality on the platform + */ +export const IdentityV0 = Struct("IdentityV0", { + id: Identifier, + public_keys: Map(KeyID, IdentityPublicKey), + balance: VarUint, + revision: Revision, +}); + +/** platform_serialize unversioned */ +export const ResourceVoteV0 = Struct("ResourceVoteV0", { + vote_poll: VotePoll, + resource_vote_choice: ResourceVoteChoice, +}); + +export const TokenBaseTransition = Enum("TokenBaseTransition", /** @type {const} */ ({ + V0: [TokenBaseTransitionV0], +})) + +export const TokenBurnTransitionV0 = Struct("TokenBurnTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** How much should we burn */ + burn_amount: VarUint, + /** The public note */ + public_note: Option(String), +}); + +export const TokenClaimTransitionV0 = Struct("TokenClaimTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The type of distribution we are targeting */ + distribution_type: TokenDistributionType, + /** A public note, this will only get saved to the state if we are using a historical contract */ + public_note: Option(String), +}); + +/** + * Versioned wrapper for token display conventions. + * + * `TokenConfigurationConvention` provides a flexible, forward-compatible structure + * for representing human-readable metadata about a token, such as localized names + * and decimal formatting standards. + * + * This enum enables evolution of the convention schema over time without breaking + * compatibility with older tokens. Each variant defines a specific format version. + */ +export const TokenConfigurationConvention = Enum("TokenConfigurationConvention", /** @type {const} */ ({ + /** + * Version 0 of the token convention schema. + * + * Defines localized names (by ISO 639 language codes) and the number of decimal places + * used for displaying token amounts. + */ + V0: [TokenConfigurationConventionV0], +})) + +export const TokenDestroyFrozenFundsTransitionV0 = Struct("TokenDestroyFrozenFundsTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The identity id of the account whose balance should be destroyed */ + frozen_identity_id: Identifier, + /** The public note */ + public_note: Option(String), +}); + +export const TokenDirectPurchaseTransitionV0 = Struct("TokenDirectPurchaseTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** How many tokens should we buy. */ + token_count: TokenAmount, + /** + * Price that the user is willing to pay for all the tokens. + * The user will pay up to this amount. + * If the actual cost of the token per the contract is less than the agreed price that the user is willing to pay + * Then we take the actual cost per the contract. + */ + total_agreed_price: Credits, +}); + +export const TokenDistributionRulesV0 = Struct("TokenDistributionRulesV0", { + perpetual_distribution: Option(TokenPerpetualDistribution), + perpetual_distribution_rules: ChangeControlRules, + pre_programmed_distribution: Option(TokenPreProgrammedDistribution), + new_tokens_destination_identity: Option(Identifier), + new_tokens_destination_identity_rules: ChangeControlRules, + minting_allow_choosing_destination: Bool, + minting_allow_choosing_destination_rules: ChangeControlRules, + change_direct_purchase_pricing_rules: ChangeControlRules, +}); + +export const TokenEmergencyActionTransitionV0 = Struct("TokenEmergencyActionTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The emergency action */ + emergency_action: TokenEmergencyAction, + /** The public note */ + public_note: Option(String), +}); + +export const TokenFreezeTransitionV0 = Struct("TokenFreezeTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The identity that we are freezing */ + identity_to_freeze_id: Identifier, + /** The public note */ + public_note: Option(String), +}); + +export const TokenMarketplaceRulesV0 = Struct("TokenMarketplaceRulesV0", { + trade_mode: TokenTradeMode, + trade_mode_change_rules: ChangeControlRules, +}); + +export const TokenMintTransitionV0 = Struct("TokenMintTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** + * Who should we issue the token to? If this is not set then we issue to the identity set in + * contract settings. If such an operation is allowed. + */ + issued_to_identity_id: Option(Identifier), + /** How much should we issue */ + amount: VarUint, + /** The public note */ + public_note: Option(String), +}); + +export const TokenSetPriceForDirectPurchaseTransitionV0 = Struct("TokenSetPriceForDirectPurchaseTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** + * What should be the price for a single token + * Setting this to None makes it no longer purchasable + */ + price: Option(TokenPricingSchedule), + /** The public note */ + public_note: Option(String), +}); + +export const TokenTransferTransitionV0 = Struct("TokenTransferTransitionV0", { + base: TokenBaseTransition, + amount: VarUint, + recipient_id: Identifier, + /** The public note */ + public_note: Option(String), + /** An optional shared encrypted note */ + shared_encrypted_note: Option(SharedEncryptedNote), + /** An optional private encrypted note */ + private_encrypted_note: Option(PrivateEncryptedNote), +}); + +export const TokenUnfreezeTransitionV0 = Struct("TokenUnfreezeTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The identity that we are freezing */ + frozen_identity_id: Identifier, + /** The public note */ + public_note: Option(String), +}); + +export const DocumentBaseTransition = Enum("DocumentBaseTransition", /** @type {const} */ ({ + V0: [DocumentBaseTransitionV0], + V1: [DocumentBaseTransitionV1], +})) + +export const DocumentCreateTransitionV0 = Struct("DocumentCreateTransitionV0", { + /** Document Base Transition */ + base: DocumentBaseTransition, + /** Entropy used to create a Document ID. */ + entropy: FixedBytes(32), + data: Map(String, Value), + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance: Option(Tuple(String, Credits)), +}); + +export const DocumentDeleteTransitionV0 = Struct("DocumentDeleteTransitionV0", { + base: DocumentBaseTransition, +}); + +export const DocumentPurchaseTransitionV0 = Struct("DocumentPurchaseTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + price: Credits, +}); + +export const DocumentReplaceTransitionV0 = Struct("DocumentReplaceTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + data: Map(String, Value), +}); + +export const DocumentTransferTransitionV0 = Struct("DocumentTransferTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + recipient_owner_id: Identifier, +}); + +export const DocumentUpdatePriceTransitionV0 = Struct("DocumentUpdatePriceTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + price: Credits, +}); + +// !ENCODE +/** + * The identity is not stored inside of drive, because of this, the serialization is mainly for + * transport, the serialization of the identity will include the version, so no passthrough or + * untagged is needed here + */ +export const Identity = Enum("Identity", /** @type {const} */ ({ + V0: [IdentityV0], +})) + +export const IdentityCreateTransitionV0 = Struct("IdentityCreateTransitionV0", { + public_keys: Vec(IdentityPublicKeyInCreation), + asset_lock_proof: AssetLockProof, + user_fee_increase: UserFeeIncrease, + signature: NotSignable(BinaryData), + identity_id: NotSignable(Identifier), +}); + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_top_up_state_transition" + */ +export const IdentityTopUpTransition = Enum("IdentityTopUpTransition", /** @type {const} */ ({ + V0: [IdentityTopUpTransitionV0], +})) + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_update_state_transition" + */ +export const IdentityUpdateTransition = Enum("IdentityUpdateTransition", /** @type {const} */ ({ + V0: [IdentityUpdateTransitionV0], +})) + +/** platform_serialize limit = 15000 , unversioned */ +export const ResourceVote = Enum("ResourceVote", /** @type {const} */ ({ + V0: [ResourceVoteV0], +})) + +export const TokenBurnTransition = Enum("TokenBurnTransition", /** @type {const} */ ({ + V0: [TokenBurnTransitionV0], +})) + +export const TokenClaimTransition = Enum("TokenClaimTransition", /** @type {const} */ ({ + V0: [TokenClaimTransitionV0], +})) + +export const TokenConfigurationChangeItem = Enum("TokenConfigurationChangeItem", /** @type {const} */ ({ + /** default */ + TokenConfigurationNoChange: [], + Conventions: [TokenConfigurationConvention], + ConventionsControlGroup: [AuthorizedActionTakers], + ConventionsAdminGroup: [AuthorizedActionTakers], + MaxSupply: [Option(TokenAmount)], + MaxSupplyControlGroup: [AuthorizedActionTakers], + MaxSupplyAdminGroup: [AuthorizedActionTakers], + PerpetualDistribution: [Option(TokenPerpetualDistribution)], + PerpetualDistributionControlGroup: [AuthorizedActionTakers], + PerpetualDistributionAdminGroup: [AuthorizedActionTakers], + NewTokensDestinationIdentity: [Option(Identifier)], + NewTokensDestinationIdentityControlGroup: [AuthorizedActionTakers], + NewTokensDestinationIdentityAdminGroup: [AuthorizedActionTakers], + MintingAllowChoosingDestination: [Bool], + MintingAllowChoosingDestinationControlGroup: [AuthorizedActionTakers], + MintingAllowChoosingDestinationAdminGroup: [AuthorizedActionTakers], + ManualMinting: [AuthorizedActionTakers], + ManualMintingAdminGroup: [AuthorizedActionTakers], + ManualBurning: [AuthorizedActionTakers], + ManualBurningAdminGroup: [AuthorizedActionTakers], + Freeze: [AuthorizedActionTakers], + FreezeAdminGroup: [AuthorizedActionTakers], + Unfreeze: [AuthorizedActionTakers], + UnfreezeAdminGroup: [AuthorizedActionTakers], + DestroyFrozenFunds: [AuthorizedActionTakers], + DestroyFrozenFundsAdminGroup: [AuthorizedActionTakers], + EmergencyAction: [AuthorizedActionTakers], + EmergencyActionAdminGroup: [AuthorizedActionTakers], + MarketplaceTradeMode: [TokenTradeMode], + MarketplaceTradeModeControlGroup: [AuthorizedActionTakers], + MarketplaceTradeModeAdminGroup: [AuthorizedActionTakers], + MainControlGroup: [Option(GroupContractPosition)], +})) + +export const TokenDestroyFrozenFundsTransition = Enum("TokenDestroyFrozenFundsTransition", /** @type {const} */ ({ + V0: [TokenDestroyFrozenFundsTransitionV0], +})) + +/** + * Represents a versioned transition for direct token purchases. + * + * This enum allows for forward-compatible support of different versions + * of the `TokenDirectPurchaseTransition` structure. Each variant corresponds + * to a specific version of the transition logic and structure. + * + * This transition type is used when a user intends to directly purchase tokens + * by specifying the desired amount and the maximum total price they are willing to pay. + */ +export const TokenDirectPurchaseTransition = Enum("TokenDirectPurchaseTransition", /** @type {const} */ ({ + /** + * Version 0 of the token direct purchase transition. + * + * This version includes the base document transition, the number of tokens + * to purchase, and the maximum total price the user agrees to pay. + * If the price in the contract is lower than the agreed price, the lower + * price is used. + */ + V0: [TokenDirectPurchaseTransitionV0], +})) + +export const TokenDistributionRules = Enum("TokenDistributionRules", /** @type {const} */ ({ + V0: [TokenDistributionRulesV0], +})) + +export const TokenEmergencyActionTransition = Enum("TokenEmergencyActionTransition", /** @type {const} */ ({ + V0: [TokenEmergencyActionTransitionV0], +})) + +export const TokenFreezeTransition = Enum("TokenFreezeTransition", /** @type {const} */ ({ + V0: [TokenFreezeTransitionV0], +})) + +export const TokenMarketplaceRules = Enum("TokenMarketplaceRules", /** @type {const} */ ({ + V0: [TokenMarketplaceRulesV0], +})) + +export const TokenMintTransition = Enum("TokenMintTransition", /** @type {const} */ ({ + V0: [TokenMintTransitionV0], +})) + +/** + * Represents a versioned transition for setting or updating the price of a token + * available for direct purchase. + * + * This transition allows a token owner or controlling group to define or remove a pricing + * schedule for direct purchases. Setting the price to `None` disables further purchases + * of the token. + * + * This transition type supports **group actions**, meaning it can require **multi-signature + * (multisig) authorization**. In such cases, multiple identities must agree and sign + * the transition for it to be considered valid and executable. + * + * Versioning enables forward compatibility by allowing future enhancements or changes + * without breaking existing clients. + */ +export const TokenSetPriceForDirectPurchaseTransition = Enum("TokenSetPriceForDirectPurchaseTransition", /** @type {const} */ ({ + /** + * Version 0 of the token set price for direct purchase transition. + * + * This version includes: + * - A base document transition. + * - An optional pricing schedule: `Some(...)` to set the token's price, or `None` to make it non-purchasable. + * - An optional public note. + * + * Group actions with multisig are supported in this version, + * enabling shared control over token pricing among multiple authorized identities. + */ + V0: [TokenSetPriceForDirectPurchaseTransitionV0], +})) + +export const TokenTransferTransition = Enum("TokenTransferTransition", /** @type {const} */ ({ + V0: [TokenTransferTransitionV0], +})) + +export const TokenUnfreezeTransition = Enum("TokenUnfreezeTransition", /** @type {const} */ ({ + V0: [TokenUnfreezeTransitionV0], +})) + +/** platform_serialize limit = 15000 , unversioned */ +export const Vote = Enum("Vote", /** @type {const} */ ({ + ResourceVote: [ResourceVote], +})) + +export const DocumentCreateTransition = Enum("DocumentCreateTransition", /** @type {const} */ ({ + V0: [DocumentCreateTransitionV0], +})) + +export const DocumentDeleteTransition = Enum("DocumentDeleteTransition", /** @type {const} */ ({ + V0: [DocumentDeleteTransitionV0], +})) + +export const DocumentPurchaseTransition = Enum("DocumentPurchaseTransition", /** @type {const} */ ({ + V0: [DocumentPurchaseTransitionV0], +})) + +export const DocumentReplaceTransition = Enum("DocumentReplaceTransition", /** @type {const} */ ({ + V0: [DocumentReplaceTransitionV0], +})) + +export const DocumentTransferTransition = Enum("DocumentTransferTransition", /** @type {const} */ ({ + V0: [DocumentTransferTransitionV0], +})) + +export const DocumentUpdatePriceTransition = Enum("DocumentUpdatePriceTransition", /** @type {const} */ ({ + V0: [DocumentUpdatePriceTransitionV0], +})) + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_create_state_transition" + */ +export const IdentityCreateTransition = Enum("IdentityCreateTransition", /** @type {const} */ ({ + V0: [IdentityCreateTransitionV0], +})) + +/** platform_serialize unversioned */ +export const MasternodeVoteTransitionV0 = Struct("MasternodeVoteTransitionV0", { + pro_tx_hash: Identifier, + voter_identity_id: Identifier, + vote: Vote, + nonce: IdentityNonce, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +export const TokenConfigUpdateTransitionV0 = Struct("TokenConfigUpdateTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** Updated token configuration item */ + update_token_configuration_item: TokenConfigurationChangeItem, + /** The public note */ + public_note: Option(String), +}); + +/** + * Defines the complete configuration for a version 0 token contract. + * + * `TokenConfigurationV0` encapsulates all metadata, control rules, supply settings, + * and governance constraints used to initialize and manage a token instance on Platform. + * This structure serves as the core representation of a token's logic, permissions, + * and capabilities. + * + * This configuration is designed to be deterministic and versioned for compatibility + * across protocol upgrades and validation environments. + */ +export const TokenConfigurationV0 = Struct("TokenConfigurationV0", { + /** Metadata conventions, including decimals and localizations. */ + conventions: TokenConfigurationConvention, + /** Change control rules governing who can modify the conventions field. */ + conventions_change_rules: ChangeControlRules, + /** The initial token supply minted at creation. */ + base_supply: TokenAmount, + /** + * The maximum allowable supply of the token. + * + * If `None`, the supply is unbounded unless otherwise constrained by minting logic. + */ + max_supply: Option(TokenAmount), + /** Configuration governing which historical actions are recorded for this token. */ + keeps_history: TokenKeepsHistoryRules, + /** + * Indicates whether the token should start in a paused state. + * + * When `true`, transfers are disallowed until explicitly unpaused via an emergency action. + */ + start_as_paused: Bool, + /** Allows minting and transferring to frozen token balances if enabled. */ + allow_transfer_to_frozen_balance: Bool, + /** + * Change control rules for updating the `max_supply`. + * + * Note: The `max_supply` can never be reduced below the `base_supply`. + */ + max_supply_change_rules: ChangeControlRules, + /** Defines the token's distribution logic, including perpetual and pre-programmed distributions. */ + distribution_rules: TokenDistributionRules, + /** Defines the token's marketplace logic. */ + marketplace_rules: TokenMarketplaceRules, + /** Rules controlling who is authorized to perform manual minting of tokens. */ + manual_minting_rules: ChangeControlRules, + /** Rules controlling who is authorized to perform manual burning of tokens. */ + manual_burning_rules: ChangeControlRules, + /** Rules governing who may freeze token balances. */ + freeze_rules: ChangeControlRules, + /** Rules governing who may unfreeze token balances. */ + unfreeze_rules: ChangeControlRules, + /** Rules governing who may destroy frozen funds. */ + destroy_frozen_funds_rules: ChangeControlRules, + /** Rules governing who may invoke emergency actions, such as pausing transfers. */ + emergency_action_rules: ChangeControlRules, + /** Optional reference to the group assigned as the token's main control group. */ + main_control_group: Option(GroupContractPosition), + /** Defines whether and how the main control group assignment may be modified. */ + main_control_group_can_be_modified: AuthorizedActionTakers, + /** Optional textual description of the token's purpose, behavior, or metadata. */ + description: Option(String), +}); + +export const DocumentTransition = Enum("DocumentTransition", /** @type {const} */ ({ + Create: [DocumentCreateTransition], + Replace: [DocumentReplaceTransition], + Delete: [DocumentDeleteTransition], + Transfer: [DocumentTransferTransition], + UpdatePrice: [DocumentUpdatePriceTransition], + Purchase: [DocumentPurchaseTransition], +})) + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.masternode_vote_state_transition" + */ +export const MasternodeVoteTransition = Enum("MasternodeVoteTransition", /** @type {const} */ ({ + V0: [MasternodeVoteTransitionV0], +})) + +export const TokenConfigUpdateTransition = Enum("TokenConfigUpdateTransition", /** @type {const} */ ({ + V0: [TokenConfigUpdateTransitionV0], +})) + +export const TokenConfiguration = Enum("TokenConfiguration", /** @type {const} */ ({ + V0: [TokenConfigurationV0], +})) + +export const TokenTransition = Enum("TokenTransition", /** @type {const} */ ({ + Burn: [TokenBurnTransition], + Mint: [TokenMintTransition], + Transfer: [TokenTransferTransition], + Freeze: [TokenFreezeTransition], + Unfreeze: [TokenUnfreezeTransition], + DestroyFrozenFunds: [TokenDestroyFrozenFundsTransition], + Claim: [TokenClaimTransition], + EmergencyAction: [TokenEmergencyActionTransition], + ConfigUpdate: [TokenConfigUpdateTransition], + DirectPurchase: [TokenDirectPurchaseTransition], + SetPriceForDirectPurchase: [TokenSetPriceForDirectPurchaseTransition], +})) + +export const BatchTransitionV0 = Struct("BatchTransitionV0", { + owner_id: Identifier, + transitions: Vec(DocumentTransition), + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +export const BatchedTransition = Enum("BatchedTransition", /** @type {const} */ ({ + Document: [DocumentTransition], + Token: [TokenTransition], +})) + +export const DataContractInSerializationFormatV1 = Struct("DataContractInSerializationFormatV1", { + /** A unique identifier for the data contract. */ + id: Identifier, + /** Internal configuration for the contract. */ + config: DataContractConfig, + /** The version of this data contract. */ + version: VarUint, + /** The identifier of the contract owner. */ + owner_id: Identifier, + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: Option(Map(DefinitionName, Value)), + /** Document JSON Schemas per type */ + document_schemas: Map(DocumentName, Value), + /** The time in milliseconds that the contract was created. */ + created_at: Option(TimestampMillis), + /** The time in milliseconds that the contract was last updated. */ + updated_at: Option(TimestampMillis), + /** The block that the document was created. */ + created_at_block_height: Option(BlockHeight), + /** The block that the contract was last updated */ + updated_at_block_height: Option(BlockHeight), + /** The epoch at which the contract was created. */ + created_at_epoch: Option(EpochIndex), + /** The epoch at which the contract was last updated. */ + updated_at_epoch: Option(EpochIndex), + /** Groups that allow for specific multiparty actions on the contract */ + groups: Map(GroupContractPosition, Group), + /** The tokens on the contract. */ + tokens: Map(TokenContractPosition, TokenConfiguration), + /** The contract's keywords for searching */ + keywords: Vec(String), + /** The contract's description */ + description: Option(String), +}); + +export const BatchTransitionV1 = Struct("BatchTransitionV1", { + owner_id: Identifier, + transitions: Vec(BatchedTransition), + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +export const DataContractInSerializationFormat = Enum("DataContractInSerializationFormat", /** @type {const} */ ({ + V0: [DataContractInSerializationFormatV0], + V1: [DataContractInSerializationFormatV1], +})) + +export const DataContractUpdateTransitionV0 = Struct("DataContractUpdateTransitionV0", { + identity_contract_nonce: IdentityNonce, + data_contract: DataContractInSerializationFormat, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.batch_state_transition" + */ +export const BatchTransition = Enum("BatchTransition", /** @type {const} */ ({ + V0: [BatchTransitionV0], + V1: [BatchTransitionV1], +})) + +/** DataContractCreateTransitionV0 has the same encoding structure */ +export const DataContractCreateTransitionV0 = Struct("DataContractCreateTransitionV0", { + data_contract: DataContractInSerializationFormat, + identity_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_update_state_transition" + */ +export const DataContractUpdateTransition = Enum("DataContractUpdateTransition", /** @type {const} */ ({ + V0: [DataContractUpdateTransitionV0], +})) + +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_create_state_transition" + */ +export const DataContractCreateTransition = Enum("DataContractCreateTransition", /** @type {const} */ ({ + V0: [DataContractCreateTransitionV0], +})) + +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const StateTransition = Enum("StateTransition", /** @type {const} */ ({ + DataContractCreate: [DataContractCreateTransition], + DataContractUpdate: [DataContractUpdateTransition], + Batch: [BatchTransition], + IdentityCreate: [IdentityCreateTransition], + IdentityTopUp: [IdentityTopUpTransition], + IdentityCreditWithdrawal: [IdentityCreditWithdrawalTransition], + IdentityUpdate: [IdentityUpdateTransition], + IdentityCreditTransfer: [IdentityCreditTransferTransition], + MasternodeVote: [MasternodeVoteTransition], +})) + +// NOT NEEDED: ActionGoal +// NOT NEEDED: ActionTaker +// NOT NEEDED: AddOperation +// NOT NEEDED: AddrV2 +// NOT NEEDED: AddrV2Message +// NOT NEEDED: DUPLICATE_Address +// NOT NEEDED: AddressEncoding +// NOT NEEDED: AddressInner +// NOT NEEDED: AddressType +// NOT NEEDED: All +// NOT NEEDED: AllowedCurrency +// NOT NEEDED: Amount +// NOT NEEDED: Annex +// NOT NEEDED: ArrayDeserializer +// NOT NEEDED: ArrayItemType +// NOT NEEDED: AssetLockOutputNotFoundError +// NOT NEEDED: AssetLockProofType +// NOT NEEDED: AssetLockTransactionIsNotFoundError +// NOT NEEDED: AssetLockValue +// NOT NEEDED: AssetLockValueV0 +// NOT NEEDED: AssetUnlockBaseTransactionInfo +// NOT NEEDED: BalanceChange +// NOT NEEDED: BalanceChangeForIdentity +// NOT NEEDED: BalanceIsNotEnoughError +// NOT NEEDED: BasicBLSError +// NOT NEEDED: BasicECDSAError +// NOT NEEDED: BasicError +// NOT NEEDED: BatchedTransitionMutRef +// NOT NEEDED: BatchedTransitionRef +// NOT NEEDED: BinVisitor +// NOT NEEDED: BinWriter +// NOT NEEDED: Bip34Error +// NOT NEEDED: BitStreamReader +// NOT NEEDED: BitStreamWriter +// NOT NEEDED: Block +// NOT NEEDED: BlockFilter +// NOT NEEDED: BlockFilterReader +// NOT NEEDED: BlockFilterWriter +// NOT NEEDED: BlockInfo +// NOT NEEDED: BlockTransactions +// NOT NEEDED: BlockTransactionsRequest +// NOT NEEDED: BlockTxn +// NOT NEEDED: BloomFlags +// NOT NEEDED: BorrowedPair +// NOT NEEDED: Builder +// NOT NEEDED: BurnFromIdentifier +// NOT NEEDED: ByteArrayKeyword +// NOT NEEDED: ByteArrayPropertySizes +// NOT NEEDED: Bytes +// NOT NEEDED: Bytes20 +// NOT NEEDED: Bytes32 +// NOT NEEDED: Bytes36 +// NOT NEEDED: BytesPerEpoch +// NOT NEEDED: BytesPerEpochByIdentifier +// NOT NEEDED: CFCheckpt +// NOT NEEDED: CFHeaders +// NOT NEEDED: CFilter +// NOT NEEDED: CachedEpochIndexFeeVersions +// NOT NEEDED: CachedEpochIndexFeeVersionsFieldsBeforeVersion4 +// NOT NEEDED: CborCanonicalMap +// NOT NEEDED: ChainCode +// NOT NEEDED: ChainHash +// NOT NEEDED: ChainLock +// NOT NEEDED: CheckedData +// NOT NEEDED: ChildNumber +// NOT NEEDED: ChoosingTokenMintRecipientNotAllowedError +// NOT NEEDED: Class +// NOT NEEDED: ClassifyContext +// NOT NEEDED: ClientDataRetrievalError +// NOT NEEDED: CmpctBlock +// NOT NEEDED: CommandString +// NOT NEEDED: CommandStringError +// NOT NEEDED: CommonCache +// NOT NEEDED: CompactTarget +// NOT NEEDED: CompatibleProtocolVersionIsNotDefinedError +// NOT NEEDED: ConfirmedHash +// NOT NEEDED: ConfirmedHashHashedWithProRegTx +// NOT NEEDED: ConsensusError +// NOT NEEDED: ConsensusValidationResult +// NOT NEEDED: Contender +// NOT NEEDED: ContenderV0 +// NOT NEEDED: ContenderWithSerializedDocument +// NOT NEEDED: ContenderWithSerializedDocumentV0 +// NOT NEEDED: ContestedDocumentVotePollStatus +// NOT NEEDED: ContestedDocumentVotePollStoredInfo +// NOT NEEDED: ContestedDocumentVotePollStoredInfoV0 +// NOT NEEDED: ContestedDocumentVotePollStoredInfoVoteEventV0 +// NOT NEEDED: ContestedDocumentVotePollWinnerInfo +// NOT NEEDED: ContestedDocumentsTemporarilyNotAllowedError +// NOT NEEDED: ContestedIndexFieldMatch +// NOT NEEDED: ContestedIndexInformation +// NOT NEEDED: ContestedIndexResolution +// NOT NEEDED: ContestedUniqueIndexOnMutableDocumentTypeError +// NOT NEEDED: ContestedUniqueIndexWithUniqueIndexError +// NOT NEEDED: ContractBoundsType +// NOT NEEDED: ContractHasNoTokensError +// NOT NEEDED: ControlBlock +// NOT NEEDED: ConversionError +// NOT NEEDED: CopyOperation +// NOT NEEDED: DUPLICATE_CoreBlockHeight +// NOT NEEDED: CreatedDataContract +// NOT NEEDED: CreatedDataContractInSerializationFormat +// NOT NEEDED: CreatedDataContractInSerializationFormatV0 +// NOT NEEDED: CreatedDataContractV0 +// NOT NEEDED: CreationRestrictionMode +// NOT NEEDED: CreditsPerEpoch +// NOT NEEDED: CreditsPerEpochByIdentifier +// NOT NEEDED: CycleHash +// NOT NEEDED: DKGParams +// NOT NEEDED: DPPError +// NOT NEEDED: DUPLICATE_DashPlatformProtocol +// NOT NEEDED: DashPlatformProtocolInitError +// NOT NEEDED: DataBuilder +// NOT NEEDED: DataContract +// NOT NEEDED: DataContractAlreadyPresentError +// NOT NEEDED: DataContractBoundsNotPresentError +// NOT NEEDED: DataContractConfigUpdateError +// NOT NEEDED: DataContractCreateTransitionLatest +// NOT NEEDED: DataContractError +// NOT NEEDED: DataContractFacade +// NOT NEEDED: DataContractFactory +// NOT NEEDED: DataContractFactoryV0 +// NOT NEEDED: DataContractHaveNewUniqueIndexError +// NOT NEEDED: DataContractImmutablePropertiesUpdateError +// NOT NEEDED: DataContractInvalidIndexDefinitionUpdateError +// NOT NEEDED: DataContractIsReadonlyError +// NOT NEEDED: DataContractMaxDepthExceedError +// NOT NEEDED: DataContractMismatch +// NOT NEEDED: DataContractNotFoundError +// NOT NEEDED: DUPLICATE_DataContractNotPresentError +// NOT NEEDED: DataContractTokenConfigurationUpdateError +// NOT NEEDED: DataContractUniqueIndicesChangedError +// NOT NEEDED: DataContractUpdateActionNotAllowedError +// NOT NEEDED: DataContractUpdatePermissionError +// NOT NEEDED: DataContractUpdateTransitionLatest +// NOT NEEDED: DataContractV0 +// NOT NEEDED: DataContractV1 +// NOT NEEDED: DataTriggerConditionError +// NOT NEEDED: DataTriggerError +// NOT NEEDED: DataTriggerExecutionError +// NOT NEEDED: DataTriggerInvalidResultError +// NOT NEEDED: DecimalsOverLimitError +// NOT NEEDED: DUPLICATE_DecodeError +// NOT NEEDED: DecodeInitError +// NOT NEEDED: DecodeProtocolIdentity +// NOT NEEDED: Decoder +// NOT NEEDED: DecodingError +// NOT NEEDED: DefaultEntropyGenerator +// NOT NEEDED: DeletedQuorum +// NOT NEEDED: Denomination +// NOT NEEDED: DerivationPath +// NOT NEEDED: DerivationPathIterator +// NOT NEEDED: DerivationPathReference +// NOT NEEDED: Deserializer +// NOT NEEDED: DestinationIdentityForTokenMintingNotSetError +// NOT NEEDED: DisablingKeyIdAlsoBeingAddedInSameTransitionError +// NOT NEEDED: Display +// NOT NEEDED: DisplayExpected +// NOT NEEDED: DisplayStyle +// NOT NEEDED: DisplayUnchecked +// NOT NEEDED: DisplayWrapper +// NOT NEEDED: DistributionAmount +// NOT NEEDED: DistributionLeftovers +// NOT NEEDED: Document +// NOT NEEDED: DocumentActionTokenCost +// NOT NEEDED: DocumentActionTokenEffect +// NOT NEEDED: DocumentAlreadyPresentError +// NOT NEEDED: DocumentBatchIterator +// NOT NEEDED: DocumentBatchV1Iterator +// NOT NEEDED: DocumentContestCurrentlyLockedError +// NOT NEEDED: DocumentContestDocumentWithSameIdAlreadyPresentError +// NOT NEEDED: DocumentContestIdentityAlreadyContestantError +// NOT NEEDED: DocumentContestNotJoinableError +// NOT NEEDED: DocumentContestNotPaidForError +// NOT NEEDED: DocumentCreationNotAllowedError +// NOT NEEDED: DocumentError +// NOT NEEDED: DocumentFacade +// NOT NEEDED: DocumentFactory +// NOT NEEDED: DocumentFactoryV0 +// NOT NEEDED: DocumentFieldFillSize +// NOT NEEDED: DocumentFieldFillType +// NOT NEEDED: DocumentFieldMaxSizeExceededError +// NOT NEEDED: DocumentForCbor +// NOT NEEDED: DocumentIncorrectPurchasePriceError +// NOT NEEDED: DocumentNotForSaleError +// NOT NEEDED: DocumentNotFoundError +// NOT NEEDED: DocumentOwnerIdMismatchError +// NOT NEEDED: DocumentPatch +// NOT NEEDED: DocumentProperty +// NOT NEEDED: DocumentPropertyType +// NOT NEEDED: DocumentPropertyTypeParsingOptions +// NOT NEEDED: DocumentTimestampWindowViolationError +// NOT NEEDED: DocumentTimestampsAreEqualError +// NOT NEEDED: DocumentTimestampsMismatchError +// NOT NEEDED: DocumentTransitionActionType +// NOT NEEDED: DocumentTransitionsAreAbsentError +// NOT NEEDED: DocumentType +// NOT NEEDED: DocumentTypeMutRef +// NOT NEEDED: DocumentTypeRef +// NOT NEEDED: DocumentTypeUpdateError +// NOT NEEDED: DocumentTypeV0 +// NOT NEEDED: DocumentTypeV1 +// NOT NEEDED: DocumentTypesAreMissingError +// NOT NEEDED: DocumentV0 +// NOT NEEDED: Duffs +// NOT NEEDED: DuplicateDocumentTransitionsWithIdsError +// NOT NEEDED: DuplicateDocumentTransitionsWithIndicesError +// NOT NEEDED: DuplicateIndexError +// NOT NEEDED: DuplicateIndexNameError +// NOT NEEDED: DuplicateKeywordsError +// NOT NEEDED: DuplicateUniqueIndexError +// NOT NEEDED: DuplicatedIdentityPublicKeyBasicError +// NOT NEEDED: DuplicatedIdentityPublicKeyIdBasicError +// NOT NEEDED: DuplicatedIdentityPublicKeyIdStateError +// NOT NEEDED: DuplicatedIdentityPublicKeyStateError +// NOT NEEDED: DUPLICATE_EcdsaSighashType +// NOT NEEDED: EmptyWrite +// NOT NEEDED: EncodeSigningDataResult +// NOT NEEDED: Encoder +// NOT NEEDED: Encoding +// NOT NEEDED: EntryMasternodeType +// NOT NEEDED: Epoch +// NOT NEEDED: EpochIndexFeeVersionsForStorage +// NOT NEEDED: DUPLICATE_Error +// NOT NEEDED: ErrorTrackingWriter +// NOT NEEDED: EvaluationStep +// NOT NEEDED: ExpectedDocumentsData +// NOT NEEDED: ExtendedBlockInfo +// NOT NEEDED: ExtendedBlockInfoV0 +// NOT NEEDED: ExtendedDocument +// NOT NEEDED: ExtendedDocumentV0 +// NOT NEEDED: ExtendedDocumentVisitor +// NOT NEEDED: ExtendedEpochInfo +// NOT NEEDED: ExtendedEpochInfoV0 +// NOT NEEDED: ExtendedPrivKey +// NOT NEEDED: ExtendedPubKey +// NOT NEEDED: FeeError +// NOT NEEDED: FeeMultiplier +// NOT NEEDED: FeeRate +// NOT NEEDED: FeeRefunds +// NOT NEEDED: FeeResult +// NOT NEEDED: FetchAndValidateDataContract +// NOT NEEDED: FieldMinMaxBounds +// NOT NEEDED: FieldType +// NOT NEEDED: FieldTypeWeights +// NOT NEEDED: FilterAdd +// NOT NEEDED: FilterHash +// NOT NEEDED: FilterHeader +// NOT NEEDED: FilterLoad +// NOT NEEDED: FinalizedContender +// NOT NEEDED: FinalizedContenderWithSerializedDocument +// NOT NEEDED: FinalizedEpochInfo +// NOT NEEDED: FinalizedEpochInfoV0 +// NOT NEEDED: FinalizedResourceVoteChoicesWithVoterInfo +// NOT NEEDED: Fingerprint +// NOT NEEDED: FormatOptions +// NOT NEEDED: FromHexError +// NOT NEEDED: FrozenIdentifier +// NOT NEEDED: FutureLeafVersion +// NOT NEEDED: GcsFilter +// NOT NEEDED: GcsFilterReader +// NOT NEEDED: GcsFilterWriter +// NOT NEEDED: GetBlockTxn +// NOT NEEDED: GetBlocksMessage +// NOT NEEDED: GetCFCheckpt +// NOT NEEDED: GetCFHeaders +// NOT NEEDED: GetCFilters +// NOT NEEDED: GetDataContractSecurityLevelRequirementFn +// NOT NEEDED: GetHeadersMessage +// NOT NEEDED: GetKeyError +// NOT NEEDED: GetMnListDiff +// NOT NEEDED: GetQRInfo +// NOT NEEDED: GroupAction +// NOT NEEDED: GroupActionAlreadyCompletedError +// NOT NEEDED: GroupActionAlreadySignedByIdentityError +// NOT NEEDED: GroupActionDoesNotExistError +// NOT NEEDED: GroupActionEvent +// NOT NEEDED: GroupActionNotAllowedOnTransitionError +// NOT NEEDED: GroupActionStatus +// NOT NEEDED: GroupActionV0 +// NOT NEEDED: GroupExceedsMaxMembersError +// NOT NEEDED: GroupHasTooFewMembersError +// NOT NEEDED: GroupMemberHasPowerOfZeroError +// NOT NEEDED: GroupMemberHasPowerOverLimitError +// NOT NEEDED: GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError +// NOT NEEDED: GroupPositionDoesNotExistError +// NOT NEEDED: GroupRequiredPowerIsInvalidError +// NOT NEEDED: GroupStateTransitionInfoStatus +// NOT NEEDED: GroupStateTransitionResolvedInfo +// NOT NEEDED: GroupSumPower +// NOT NEEDED: GroupTotalPowerLessThanRequiredError +// NOT NEEDED: HRVisitor +// NOT NEEDED: Header +// NOT NEEDED: HeaderAndShortIds +// NOT NEEDED: HeaderDeserializationWrapper +// NOT NEEDED: HeaderSerializationWrapper +// NOT NEEDED: DUPLICATE_Height +// NOT NEEDED: Hex +// NOT NEEDED: HiddenNodes +// NOT NEEDED: IHeader +// NOT NEEDED: IdentitiesContractKeys +// NOT NEEDED: IdentityAlreadyExistsError +// NOT NEEDED: IdentityAssetLockProofLockedTransactionMismatchError +// NOT NEEDED: IdentityAssetLockStateTransitionReplayError +// NOT NEEDED: IdentityAssetLockTransactionIsNotFoundError +// NOT NEEDED: IdentityAssetLockTransactionOutPointAlreadyConsumedError +// NOT NEEDED: IdentityAssetLockTransactionOutPointNotEnoughBalanceError +// NOT NEEDED: IdentityAssetLockTransactionOutputNotFoundError +// NOT NEEDED: IdentityCreateTransitionLatest +// NOT NEEDED: IdentityCreateTransitionV0Inner +// NOT NEEDED: IdentityCreditTransferToSelfError +// NOT NEEDED: IdentityCreditTransferTransitionLatest +// NOT NEEDED: IdentityCreditWithdrawalTransitionLatest +// NOT NEEDED: IdentityCreditWithdrawalTransitionV01 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV010 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV02 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV03 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV04 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV05 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV06 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV07 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV08 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV09 +// NOT NEEDED: IdentityDoesNotHaveEnoughTokenBalanceError +// NOT NEEDED: IdentityFacade +// NOT NEEDED: IdentityFactory +// NOT NEEDED: IdentityHasNotAgreedToPayRequiredTokenAmountError +// NOT NEEDED: IdentityInTokenConfigurationNotFoundError +// NOT NEEDED: IdentityInsufficientBalanceError +// NOT NEEDED: IdentityMemberOfGroupNotFoundError +// NOT NEEDED: IdentityNotFoundError +// NOT NEEDED: IdentityNotMemberOfGroupError +// NOT NEEDED: IdentityNotPresentError +// NOT NEEDED: IdentityPublicKeyAlreadyExistsForUniqueContractBoundsError +// NOT NEEDED: IdentityPublicKeyIsDisabledError +// NOT NEEDED: IdentityPublicKeyIsReadOnlyError +// NOT NEEDED: IdentityToFreezeDoesNotExistError +// NOT NEEDED: IdentityTokenAccountAlreadyFrozenError +// NOT NEEDED: IdentityTokenAccountFrozenError +// NOT NEEDED: IdentityTokenAccountNotFrozenError +// NOT NEEDED: IdentityTokenInfo +// NOT NEEDED: IdentityTokenInfoV0 +// NOT NEEDED: IdentityTryingToPayWithWrongTokenError +// NOT NEEDED: IncompatibleDataContractSchemaError +// NOT NEEDED: IncompatibleDocumentTypeSchemaError +// NOT NEEDED: IncompatibleJsonSchemaOperation +// NOT NEEDED: IncompatibleProtocolVersionError +// NOT NEEDED: IncompatibleRe2PatternError +// NOT NEEDED: IncompleteBuilder +// NOT NEEDED: InconsistentCompoundIndexDataError +// NOT NEEDED: Index +// NOT NEEDED: IndexConstPath +// NOT NEEDED: IndexLevel +// NOT NEEDED: IndexLevelTypeInfo +// NOT NEEDED: IndexName +// NOT NEEDED: IndexOrderDirection +// NOT NEEDED: IndexProperties +// NOT NEEDED: IndexProperty +// NOT NEEDED: IndexPropertyName +// NOT NEEDED: IndexType +// NOT NEEDED: Input +// NOT NEEDED: InputWeightPrediction +// NOT NEEDED: DUPLICATE_InstantLock +// NOT NEEDED: Instruction +// NOT NEEDED: InstructionIndices +// NOT NEEDED: Instructions +// NOT NEEDED: IntegerReplacementType +// NOT NEEDED: IntervalEvaluationExplanation +// NOT NEEDED: InvalidActionIdError +// NOT NEEDED: InvalidAssetLockProofCoreChainHeightError +// NOT NEEDED: InvalidAssetLockProofTransactionHeightError +// NOT NEEDED: InvalidAssetLockTransactionOutputReturnSizeError +// NOT NEEDED: InvalidCompoundIndexError +// NOT NEEDED: InvalidDataContractIdError +// NOT NEEDED: InvalidDataContractVersionError +// NOT NEEDED: InvalidDescriptionLengthError +// NOT NEEDED: InvalidDocumentRevisionError +// NOT NEEDED: InvalidDocumentTransitionActionError +// NOT NEEDED: InvalidDocumentTransitionIdError +// NOT NEEDED: DUPLICATE_InvalidDocumentTypeError +// NOT NEEDED: InvalidDocumentTypeNameError +// NOT NEEDED: InvalidDocumentTypeRequiredSecurityLevelError +// NOT NEEDED: InvalidGroupPositionError +// NOT NEEDED: InvalidIdentifierError +// NOT NEEDED: InvalidIdentityAssetLockProofChainLockValidationError +// NOT NEEDED: InvalidIdentityAssetLockTransactionError +// NOT NEEDED: InvalidIdentityAssetLockTransactionOutputError +// NOT NEEDED: InvalidIdentityCreditTransferAmountError +// NOT NEEDED: InvalidIdentityCreditWithdrawalTransitionAmountError +// NOT NEEDED: InvalidIdentityCreditWithdrawalTransitionCoreFeeError +// NOT NEEDED: InvalidIdentityCreditWithdrawalTransitionOutputScriptError +// NOT NEEDED: InvalidIdentityKeySignatureError +// NOT NEEDED: InvalidIdentityNonceError +// NOT NEEDED: InvalidIdentityPublicKeyDataError +// NOT NEEDED: InvalidIdentityPublicKeyIdError +// NOT NEEDED: InvalidIdentityPublicKeySecurityLevelError +// NOT NEEDED: DUPLICATE_InvalidIdentityPublicKeyTypeError +// NOT NEEDED: InvalidIdentityRevisionError +// NOT NEEDED: InvalidIdentityUpdateTransitionDisableKeysError +// NOT NEEDED: InvalidIdentityUpdateTransitionEmptyError +// NOT NEEDED: InvalidIndexPropertyTypeError +// NOT NEEDED: InvalidIndexedPropertyConstraintError +// NOT NEEDED: InvalidInstantAssetLockProofError +// NOT NEEDED: InvalidInstantAssetLockProofSignatureError +// NOT NEEDED: InvalidJsonSchemaRefError +// NOT NEEDED: InvalidKeywordCharacterError +// NOT NEEDED: InvalidKeywordLengthError +// NOT NEEDED: InvalidSignaturePublicKeyError +// NOT NEEDED: InvalidSignaturePublicKeyPurposeError +// NOT NEEDED: InvalidSignaturePublicKeySecurityLevelError +// NOT NEEDED: InvalidStateTransitionSignatureError +// NOT NEEDED: InvalidStateTransitionTypeError +// NOT NEEDED: InvalidTokenAmountError +// NOT NEEDED: InvalidTokenBaseSupplyError +// NOT NEEDED: InvalidTokenClaimNoCurrentRewards +// NOT NEEDED: InvalidTokenClaimPropertyMismatch +// NOT NEEDED: InvalidTokenClaimWrongClaimant +// NOT NEEDED: InvalidTokenConfigUpdateNoChangeError +// NOT NEEDED: InvalidTokenDistributionBlockIntervalTooShortError +// NOT NEEDED: InvalidTokenDistributionFunctionDivideByZeroError +// NOT NEEDED: InvalidTokenDistributionFunctionIncoherenceError +// NOT NEEDED: InvalidTokenDistributionFunctionInvalidParameterError +// NOT NEEDED: InvalidTokenDistributionFunctionInvalidParameterTupleError +// NOT NEEDED: InvalidTokenDistributionTimeIntervalNotMinuteAlignedError +// NOT NEEDED: InvalidTokenDistributionTimeIntervalTooShortError +// NOT NEEDED: InvalidTokenIdError +// NOT NEEDED: InvalidTokenLanguageCodeError +// NOT NEEDED: InvalidTokenNameCharacterError +// NOT NEEDED: InvalidTokenNameLengthError +// NOT NEEDED: InvalidTokenNoteTooBigError +// NOT NEEDED: InvalidTokenPositionError +// NOT NEEDED: InvalidTokenPositionStateError +// NOT NEEDED: InvalidVectorSizeError +// NOT NEEDED: Inventory +// NOT NEEDED: IoWrapper +// NOT NEEDED: IsIndexUnique +// NOT NEEDED: Iter +// NOT NEEDED: IterReader +// NOT NEEDED: JsonPath +// NOT NEEDED: JsonPathLiteral +// NOT NEEDED: JsonPathStep +// NOT NEEDED: JsonSchema +// NOT NEEDED: JsonSchemaCompilationError +// NOT NEEDED: DUPLICATE_JsonSchemaError +// NOT NEEDED: JsonSchemaErrorData +// NOT NEEDED: DUPLICATE_JsonSchemaValidator +// NOT NEEDED: JsonStateTransitionSerializationOptions +// NOT NEEDED: Key +// NOT NEEDED: KeyCount +// NOT NEEDED: KeyDerivationType +// NOT NEEDED: KeyRequest +// NOT NEEDED: KeySource +// NOT NEEDED: Keys +// NOT NEEDED: KnownCostItem +// NOT NEEDED: LLMQEntryVerificationSkipStatus +// NOT NEEDED: LLMQEntryVerificationStatus +// NOT NEEDED: LLMQModifierType +// NOT NEEDED: LLMQParams +// NOT NEEDED: LLMQQuarterReconstructionType +// NOT NEEDED: LLMQQuarterType +// NOT NEEDED: LLMQQuarterUsageType +// NOT NEEDED: LazyRegex +// NOT NEEDED: LeafNode +// NOT NEEDED: LeafNodes +// NOT NEEDED: LeafVersion +// NOT NEEDED: LegacySighash +// NOT NEEDED: DUPLICATE_LockTime +// NOT NEEDED: LockTimeUnit +// NOT NEEDED: LockedVotePollCounter +// NOT NEEDED: Lower +// NOT NEEDED: MNSkipListMode +// NOT NEEDED: MainGroupIsNotDefinedError +// NOT NEEDED: MapKeySerializer +// NOT NEEDED: MasterPublicKeyUpdateError +// NOT NEEDED: MasternodeIncorrectVoterIdentityIdError +// NOT NEEDED: MasternodeIncorrectVotingAddressError +// NOT NEEDED: MasternodeList +// NOT NEEDED: MasternodeListBuilder +// NOT NEEDED: MasternodeListEngine +// NOT NEEDED: MasternodeListEngineBTreeMapBlockContainer +// NOT NEEDED: MasternodeListEngineBlockContainer +// NOT NEEDED: MasternodeListEntry +// NOT NEEDED: MasternodeNotFoundError +// NOT NEEDED: MasternodeVoteAlreadyPresentError +// NOT NEEDED: MasternodeVoteTransitionLatest +// NOT NEEDED: MasternodeVotedTooManyTimesError +// NOT NEEDED: MaxDepthValidationResult +// NOT NEEDED: MaxDocumentsTransitionsExceededError +// NOT NEEDED: MaxIdentityPublicKeyLimitReachedError +// NOT NEEDED: MergeIdentityNonceResult +// NOT NEEDED: MerkleBlock +// NOT NEEDED: MerkleBlockError +// NOT NEEDED: MessageSignature +// NOT NEEDED: MessageSignatureError +// NOT NEEDED: MessageVerificationError +// NOT NEEDED: Metadata +// NOT NEEDED: MissingDataContractIdBasicError +// NOT NEEDED: MissingDefaultLocalizationError +// NOT NEEDED: MissingDocumentTransitionActionError +// NOT NEEDED: MissingDocumentTransitionTypeError +// NOT NEEDED: MissingDocumentTypeError +// NOT NEEDED: MissingIdentityPublicKeyIdsError +// NOT NEEDED: MissingMasterPublicKeyError +// NOT NEEDED: MissingPositionsInDocumentTypePropertiesError +// NOT NEEDED: MissingPublicKeyError +// NOT NEEDED: MissingStateTransitionTypeError +// NOT NEEDED: MissingTransferKeyError +// NOT NEEDED: MnListDiff +// NOT NEEDED: ModificationOfGroupActionMainParametersNotPermittedError +// NOT NEEDED: MoveOperation +// NOT NEEDED: NativeBlsModule +// NOT NEEDED: Network +// NOT NEEDED: NetworkChecked +// NOT NEEDED: NetworkMessage +// NOT NEEDED: NetworkUnchecked +// NOT NEEDED: NewAuthorizedActionTakerGroupDoesNotExistError +// NOT NEEDED: NewAuthorizedActionTakerIdentityDoesNotExistError +// NOT NEEDED: NewAuthorizedActionTakerMainGroupNotSetError +// NOT NEEDED: NewTokensDestinationIdentityDoesNotExistError +// NOT NEEDED: NewTokensDestinationIdentityOptionRequiredError +// NOT NEEDED: NoTransferKeyForCoreWithdrawalAvailableError +// NOT NEEDED: NodeInfo +// NOT NEEDED: NonConsensusError +// NOT NEEDED: NonContiguousContractGroupPositionsError +// NOT NEEDED: NonContiguousContractTokenPositionsError +// NOT NEEDED: DUPLICATE_NonStandardSighashType +// NOT NEEDED: NonceOutOfBoundsError +// NOT NEEDED: NotImplementedIdentityCreditWithdrawalTransitionPoolingError +// NOT NEEDED: OperationError +// NOT NEEDED: OperatorPublicKey +// NOT NEEDED: OrderBy +// NOT NEEDED: Output +// NOT NEEDED: OutputType +// NOT NEEDED: OverflowError +// NOT NEEDED: OwnedPair +// NOT NEEDED: Pair +// NOT NEEDED: Params +// NOT NEEDED: ParentDocumentOptions +// NOT NEEDED: ParseAmountError +// NOT NEEDED: ParseIntError +// NOT NEEDED: ParseNetworkError +// NOT NEEDED: ParseOutPointError +// NOT NEEDED: PartialIdentity +// NOT NEEDED: PartialMerkleTree +// NOT NEEDED: PartiallySignedTransaction +// NOT NEEDED: PastAssetLockStateTransitionHashes +// NOT NEEDED: Patch +// NOT NEEDED: PatchDiffer +// NOT NEEDED: PatchError +// NOT NEEDED: PatchErrorKind +// NOT NEEDED: PatchOperation +// NOT NEEDED: Payload +// NOT NEEDED: PlatformItemKey +// NOT NEEDED: PreProgrammedDistributionTimestampInPastError +// NOT NEEDED: PreferredKeyPurposeForSigningWithdrawal +// NOT NEEDED: PrefilledTransaction +// NOT NEEDED: PrefundedSpecializedBalanceIdentifier +// NOT NEEDED: PrefundedSpecializedBalanceInsufficientError +// NOT NEEDED: PrefundedSpecializedBalanceNotFoundError +// NOT NEEDED: Prevouts +// NOT NEEDED: PrivateKey +// NOT NEEDED: ProTxHash +// NOT NEEDED: PropertyPath +// NOT NEEDED: ProprietaryKey +// NOT NEEDED: ProprietaryType +// NOT NEEDED: ProtocolError +// NOT NEEDED: ProtocolValidationOperation +// NOT NEEDED: ProtocolVersion +// NOT NEEDED: ProtocolVersionParsingError +// NOT NEEDED: ProtocolVersionVoteCount +// NOT NEEDED: Psbt +// NOT NEEDED: PsbtHash +// NOT NEEDED: PsbtParseError +// NOT NEEDED: PsbtSighashType +// NOT NEEDED: PublicKey +// NOT NEEDED: PublicKeyIsDisabledError +// NOT NEEDED: PublicKeyMismatchError +// NOT NEEDED: DUPLICATE_PublicKeySecurityLevelNotMetError +// NOT NEEDED: PublicKeyValidationError +// NOT NEEDED: PurchaserIdentifier +// NOT NEEDED: PushBytes +// NOT NEEDED: PushBytesBuf +// NOT NEEDED: DUPLICATE_PushBytesError +// NOT NEEDED: PushDataLenLen +// NOT NEEDED: QRInfo +// NOT NEEDED: QualifiedMasternodeListEntry +// NOT NEEDED: QualifiedQuorumEntry +// NOT NEEDED: QuorumCLSigObject +// NOT NEEDED: QuorumCommitmentHash +// NOT NEEDED: QuorumEntryHash +// NOT NEEDED: QuorumModifierHash +// NOT NEEDED: QuorumOrderingHash +// NOT NEEDED: QuorumSigningRequestId +// NOT NEEDED: QuorumSigningSignId +// NOT NEEDED: QuorumSnapshot +// NOT NEEDED: QuorumValidationError +// NOT NEEDED: RandomDocumentTypeParameters +// NOT NEEDED: RawAssetLockProof +// NOT NEEDED: RawNetworkMessage +// NOT NEEDED: ReadBytesFromFiniteReaderOpts +// NOT NEEDED: RecipientIdentifier +// NOT NEEDED: RecipientIdentityDoesNotExistError +// NOT NEEDED: RedundantDocumentPaidForByTokenWithContractId +// NOT NEEDED: Reject +// NOT NEEDED: RejectReason +// NOT NEEDED: RemoveOperation +// NOT NEEDED: ReplaceOperation +// NOT NEEDED: ReplacementType +// NOT NEEDED: RequiredSigners +// NOT NEEDED: RequiredTokenPaymentInfoNotSetError +// NOT NEEDED: RewardDistributionMoment +// NOT NEEDED: RewardRatio +// NOT NEEDED: SMLEntry +// NOT NEEDED: SMLStore +// NOT NEEDED: Script +// NOT NEEDED: ScriptHash +// NOT NEEDED: ScriptLeaf +// NOT NEEDED: ScriptLeaves +// NOT NEEDED: ScriptMerkleProofMap +// NOT NEEDED: ScriptPath +// NOT NEEDED: SegwitCache +// NOT NEEDED: SegwitV0Sighash +// NOT NEEDED: SendCmpct +// NOT NEEDED: SeqIterator +// NOT NEEDED: SerdeParsingError +// NOT NEEDED: SerializeBytesAsHex +// NOT NEEDED: SerializeMap +// NOT NEEDED: SerializeStructVariant +// NOT NEEDED: SerializeTupleVariant +// NOT NEEDED: SerializeVec +// NOT NEEDED: SerializedObjectParsingError +// NOT NEEDED: SerializedSignature +// NOT NEEDED: Serializer +// NOT NEEDED: ServiceFlags +// NOT NEEDED: Sha256dHash +// NOT NEEDED: ShortId +// NOT NEEDED: ShouldInsertWithAllNull +// NOT NEEDED: SigHashCache +// NOT NEEDED: SigHashType +// NOT NEEDED: SighashCache +// NOT NEEDED: SighashComponents +// NOT NEEDED: DUPLICATE_SighashTypeParseError +// NOT NEEDED: SignError +// NOT NEEDED: SignableBytesHasher +// NOT NEEDED: DUPLICATE_Signature +// NOT NEEDED: SignatureError +// NOT NEEDED: SignatureShouldNotBePresentError +// NOT NEEDED: SignedAmount +// NOT NEEDED: SignedCredits +// NOT NEEDED: SignedCreditsPerEpoch +// NOT NEEDED: SignedTokenAmount +// NOT NEEDED: SigningAlgorithm +// NOT NEEDED: SigningErrors +// NOT NEEDED: SigningKeys +// NOT NEEDED: SimpleConsensusValidationResult +// NOT NEEDED: SimpleValidationResult +// NOT NEEDED: SimplifiedMNList +// NOT NEEDED: Sink +// NOT NEEDED: SmallVec +// NOT NEEDED: SmlError +// NOT NEEDED: SortKey +// NOT NEEDED: SpecialTransactionPayloadHash +// NOT NEEDED: SpecializedDocumentFactory +// NOT NEEDED: SpecializedDocumentFactoryV0 +// NOT NEEDED: SplitFeatureVersionOutcome +// NOT NEEDED: StartAtIncluded +// NOT NEEDED: StateError +// NOT NEEDED: StateTransitionCreationOptions +// NOT NEEDED: StateTransitionError +// NOT NEEDED: StateTransitionFactory +// NOT NEEDED: StateTransitionIsNotSignedError +// NOT NEEDED: StateTransitionMaxSizeExceededError +// NOT NEEDED: StateTransitionProofResult +// NOT NEEDED: StateTransitionSigningOptions +// NOT NEEDED: StateTransitionType +// NOT NEEDED: StatelessJsonSchemaLazyValidator +// NOT NEEDED: StorageAndProcessingPoolCredits +// NOT NEEDED: StoredAssetLockInfo +// NOT NEEDED: StringPropertySizes +// NOT NEEDED: SubValidator +// NOT NEEDED: SumTokenAmount +// NOT NEEDED: SystemPropertyIndexAlreadyPresentError +// NOT NEEDED: TapLeaf +// NOT NEEDED: TapSighashType +// NOT NEEDED: TapTree +// NOT NEEDED: TaprootBuilder +// NOT NEEDED: TaprootBuilderError +// NOT NEEDED: TaprootCache +// NOT NEEDED: TaprootError +// NOT NEEDED: TaprootMerkleBranch +// NOT NEEDED: TaprootSpendInfo +// NOT NEEDED: Target +// NOT NEEDED: TestConsensusError +// NOT NEEDED: DUPLICATE_TestData +// NOT NEEDED: TestOperation +// NOT NEEDED: DUPLICATE_Time +// NOT NEEDED: TimestampIncluded +// NOT NEEDED: TokenAlreadyPausedError +// NOT NEEDED: TokenAmountUnderMinimumSaleAmount +// NOT NEEDED: TokenConfigurationIdentityContext +// NOT NEEDED: TokenConfigurationPreset +// NOT NEEDED: TokenConfigurationPresetFeatures +// NOT NEEDED: TokenContractInfo +// NOT NEEDED: TokenContractInfoV0 +// NOT NEEDED: TokenCosts +// NOT NEEDED: TokenCostsV0 +// NOT NEEDED: TokenDirectPurchaseUserPriceTooLow +// NOT NEEDED: TokenDistributionInfo +// NOT NEEDED: TokenDistributionKey +// NOT NEEDED: TokenDistributionResolvedRecipient +// NOT NEEDED: TokenDistributionTypeWithResolvedRecipient +// NOT NEEDED: TokenDistributionWeight +// NOT NEEDED: TokenError +// NOT NEEDED: TokenEvent +// NOT NEEDED: TokenEventPersonalEncryptedNote +// NOT NEEDED: TokenEventPublicNote +// NOT NEEDED: TokenEventSharedEncryptedNote +// NOT NEEDED: TokenIsPausedError +// NOT NEEDED: TokenMintPastMaxSupplyError +// NOT NEEDED: TokenName +// NOT NEEDED: TokenNotForDirectSale +// NOT NEEDED: TokenNotPausedError +// NOT NEEDED: TokenNoteOnlyAllowedWhenProposerError +// NOT NEEDED: TokenPaymentByBurningOnlyAllowedOnInternalTokenError +// NOT NEEDED: TokenSettingMaxSupplyToLessThanCurrentSupplyError +// NOT NEEDED: TokenStatus +// NOT NEEDED: TokenStatusV0 +// NOT NEEDED: TokenTransferRecipientIdentityNotExistError +// NOT NEEDED: TokenTransferToOurselfError +// NOT NEEDED: TokenTransitionActionType +// NOT NEEDED: TooManyKeywordsError +// NOT NEEDED: TooManyMasterPublicKeyError +// NOT NEEDED: TotalCreditsBalance +// NOT NEEDED: TotalSingleTokenBalance +// NOT NEEDED: TotalTokensBalance +// NOT NEEDED: TradeMode +// NOT NEEDED: Transferable +// NOT NEEDED: TransitionFingerprint +// NOT NEEDED: TryFromError +// NOT NEEDED: TweakedKeyPair +// NOT NEEDED: TweakedPublicKey +// NOT NEEDED: TxIn +// NOT NEEDED: TxIndexOutOfRangeError +// NOT NEEDED: TxMerkleNode +// NOT NEEDED: Type +// NOT NEEDED: U256 +// NOT NEEDED: UintError +// NOT NEEDED: UnauthorizedTokenActionError +// NOT NEEDED: UndefinedIndexPropertyError +// NOT NEEDED: UniqueIndicesLimitReachedError +// NOT NEEDED: UnknownAssetLockProofTypeError +// NOT NEEDED: UnknownChainHash +// NOT NEEDED: UnknownDocumentActionTokenEffectError +// NOT NEEDED: UnknownDocumentCreationRestrictionModeError +// NOT NEEDED: UnknownGasFeesPaidByError +// NOT NEEDED: UnknownSecurityLevelError +// NOT NEEDED: UnknownStorageKeyRequirementsError +// NOT NEEDED: UnknownTradeModeError +// NOT NEEDED: UnknownTransferableTypeError +// NOT NEEDED: UnsupportedFeatureError +// NOT NEEDED: UnsupportedProtocolVersionError +// NOT NEEDED: UnsupportedVersionError +// NOT NEEDED: UntweakedKeyPair +// NOT NEEDED: UntweakedPublicKey +// NOT NEEDED: Upper +// NOT NEEDED: UpperWriter +// NOT NEEDED: DUPLICATE_UsedKeyMatrix +// NOT NEEDED: ValidationResult +// NOT NEEDED: Validator +// NOT NEEDED: ValidatorSet +// NOT NEEDED: ValidatorSetV0 +// NOT NEEDED: ValidatorV0 +// NOT NEEDED: ValueError +// NOT NEEDED: ValueMapDeserializer +// NOT NEEDED: VarInt +// NOT NEEDED: VerifyingChainLockSignaturesType +// NOT NEEDED: Version +// NOT NEEDED: VersionError +// NOT NEEDED: VersionMessage +// NOT NEEDED: Visitor +// NOT NEEDED: VotePollNotAvailableForVotingError +// NOT NEEDED: VotePollNotFoundError +// NOT NEEDED: WPubkeyHash +// NOT NEEDED: WScriptHash +// NOT NEEDED: Weight +// NOT NEEDED: With +// NOT NEEDED: WithdrawalOutputScriptNotAllowedWhenSigningWithOwnerKeyError +// NOT NEEDED: WithdrawalTransactionIndex +// NOT NEEDED: WithdrawalTransactionIndexAndBytes +// NOT NEEDED: Witness +// NOT NEEDED: WitnessCommitment +// NOT NEEDED: WitnessMerkleNode +// NOT NEEDED: WitnessProgram +// NOT NEEDED: WitnessVersion +// NOT NEEDED: Work +// NOT NEEDED: DUPLICATE_WrongPublicKeyPurposeError +// NOT NEEDED: Wtxid +// NOT NEEDED: XpubIdentifier +// NOT NEEDED: YesNoAbstainVoteChoice diff --git a/3-create-document.ts b/3-create-document.ts new file mode 100644 index 0000000..b5475c0 --- /dev/null +++ b/3-create-document.ts @@ -0,0 +1,210 @@ + +import DashKeys from "dashkeys"; +import * as Bincode from "./src/bincode.ts"; +import * as DashBincode from "./2.0.0/generated_bincode.js"; +import * as KeyUtils from "./src/key-utils.js"; +import { connectToNode } from "./src/rpc.ts" +import { NODE_ADDRESS } from "./src/constants.ts" +import { findExistingIdentity } from "./src/identity.ts" + +import { loadWallet } from "./src/cli.ts" +import { deriveAllCreateIdentityKeys } from "./src/asset_lock.ts" +import { toHex } from "./src/hex.js" +import { base58 } from "./src/util/base58.ts" + +export async function step3CreateDocument(walletPhrase: string, walletSalt: string, identityIndex: number, dataContractId: string, message: string) { + +const nodeRpc = connectToNode(NODE_ADDRESS); + +const walletKey = await loadWallet(walletPhrase, walletSalt); + +const dataContractIdBytes = base58.decode(dataContractId); + +const hdOpts = { version: "testnet" } as const; // TODO + +const { + regFundKey, + changeKey, // TODO next change key from wallet + assetKey, + + masterKey, + otherKey, +} = await deriveAllCreateIdentityKeys(hdOpts, walletKey, identityIndex); + +// console.log('masterKey hex', toHex(masterKey.publicKey)) +// console.log('otherKey hex', toHex(otherKey.publicKey)) + +// console.log('masterKey pkh', toHex(await DashKeys.pubkeyToPkh(masterKey.publicKey))) +// console.log('otherKey pkh', toHex(await DashKeys.pubkeyToPkh(otherKey.publicKey))) + +const pkh = await DashKeys.pubkeyToPkh(masterKey.publicKey) +const existingIdentity = await findExistingIdentity(nodeRpc, pkh) +if (!existingIdentity) { + console.log('Identity Not Yet Created!') + process.exit(1); +} + +const existingIdentityV0: DashBincode.IdentityV0 = Bincode.match(existingIdentity, { + V0: i => i[0] +}); + +const existingIdentityId = existingIdentityV0.id[0][0]; + +const identityContractNonceResponse = await nodeRpc.platform.getIdentityContractNonce({version: { + oneofKind: "v0", + v0: { + identityId: existingIdentityId, + contractId: dataContractIdBytes, + prove: false, + } +}}) +// console.log('identityContractNonceResponse', identityContractNonceResponse) +// console.log('identityContractNonceResponse', identityContractNonceResponse.response.version.v0.result) + +let current_identity_contract_nonce = 0n; +if (identityContractNonceResponse.response.version.oneofKind === 'v0') { + const v0 = identityContractNonceResponse.response.version.v0; + if (v0.result.oneofKind === 'identityContractNonce') { + current_identity_contract_nonce = BigInt(v0.result.identityContractNonce) + } else { + throw new Error("Cannot handle identityContractNonceResponse") + } +} else { + throw new Error("Cannot handle identityContractNonceResponse") +} +console.log('current_identity_contract_nonce', current_identity_contract_nonce) + +const owner_id = existingIdentityId; +const identity_contract_nonce = current_identity_contract_nonce + 1n; +const document_type_name = "note"; +const document_type_name_bytes = new TextEncoder().encode(document_type_name) +const entropy = crypto.getRandomValues(new Uint8Array(32)) +// generate the document id + +// TODO: This is a terribly stupid way of concatting these arrays +const buf = new Uint8Array([ + ...dataContractIdBytes, + ...owner_id, + ...document_type_name_bytes, + ...entropy, +]) +const document_id = await KeyUtils.doubleSha256(buf) + + + +const data: Map = new Map(); +data.set("message", DashBincode.Value.Text(message)) + + +const documentCreate = DashBincode.DocumentCreateTransitionV0({ + base: DashBincode.DocumentBaseTransition.V0( + DashBincode.DocumentBaseTransitionV0({ + id: DashBincode.Identifier(DashBincode.IdentifierBytes32(document_id)), + data_contract_id: DashBincode.Identifier(DashBincode.IdentifierBytes32(dataContractIdBytes)), + identity_contract_nonce, + document_type_name, + }) + ), + entropy, + data, +}) + +const documentsBatch = DashBincode.BatchTransitionV0({ + owner_id: DashBincode.Identifier(DashBincode.IdentifierBytes32(owner_id)), + transitions: [ + DashBincode.DocumentTransition.Create(DashBincode.DocumentCreateTransition.V0(documentCreate)), + // DashBincode.DocumentTransition.Replace(DashBincode.DocumentReplaceTransition.V0(DashBincode.DocumentReplaceTransitionV0({ + // base: DashBincode.DocumentBaseTransition.V0(DashBincode.DocumentBaseTransitionV0({ + // id: DashBincode.Identifier(DashBincode.IdentifierBytes32(document_id)), + // data_contract_id: DashBincode.Identifier(DashBincode.IdentifierBytes32(dataContractIdBytes)), + // identity_contract_nonce, + // document_type_name, + // })), + // revision: 1n, + // data, + // }))), + // DashBincode.DocumentTransition.Delete(DashBincode.DocumentDeleteTransition.V0(DashBincode.DocumentDeleteTransitionV0({ + // base: DashBincode.DocumentBaseTransition.V0(DashBincode.DocumentBaseTransitionV0({ + // id: DashBincode.Identifier(DashBincode.IdentifierBytes32(document_id)), + // data_contract_id: DashBincode.Identifier(DashBincode.IdentifierBytes32(dataContractIdBytes)), + // identity_contract_nonce, + // document_type_name, + // })) + // }))), + ], + user_fee_increase: 0, + signature_public_key_id: 1, + signature: DashBincode.BinaryData(new Uint8Array), // filled in later +}) + +const stateTransition = DashBincode.StateTransition.Batch( + DashBincode.BatchTransition.V0(documentsBatch)); + +{ + const signableBytes = new Uint8Array(Bincode.encode(DashBincode.StateTransition, stateTransition, {signable: true})); + + const signableHash = await KeyUtils.doubleSha256(signableBytes); + + const signatureBytes = await KeyUtils.magicSign({ + privKeyBytes: otherKey.privateKey!, + doubleSha256Bytes: signableHash, + }); + + documentsBatch.signature[0] = signatureBytes +} + +const signedBytes = new Uint8Array(Bincode.encode(DashBincode.StateTransition, stateTransition)); +const transitionHash = await KeyUtils.sha256(signedBytes); + +console.log("Broadcasting Batch Transition for Document Create...") +try { + const response = await nodeRpc.platform.broadcastStateTransition({ + stateTransition: signedBytes, + }) + console.log('response', response.status, response.response); + +} catch (e) { + console.error("Error: ", decodeURIComponent((e as any).message)) +} + +console.log("Document ID:" + base58.encode(document_id)) +console.log("https://testnet.platform-explorer.com/document/" + base58.encode(document_id)) +console.log(`https://testnet.platform-explorer.com/transaction/${toHex(transitionHash)}`); +} + +if (typeof process === 'object' && process.argv[1] === import.meta.filename) { + + import("dotenv").then(dotenv => { + dotenv.default.config({ path: ".env" }); + + let walletPhrase = process.env.DASH_WALLET_PHRASE!; + let walletSalt = process.env.DASH_WALLET_SALT ?? ""; + + function printUsage() { + console.error(""); + console.error("USAGE"); + console.error(` ${process.argv[0]} ${process.argv[1]} []`); + console.error(""); + console.error("EXAMPLE"); + console.error(` ${process.argv[0]} ${process.argv[1]} 0 JEJjgpGiLqeH8yaUeAwbCzuhTeL3xBMUAvyRCiGBXkEn "It's working!"`); + console.error(""); + } + + const identityIndex = parseInt(process.argv[2], 10); + if (isNaN(identityIndex)) { + printUsage(); + process.exit(1); + } + + const dataContractId = process.argv[3]; // "JEJjgpGiLqeH8yaUeAwbCzuhTeL3xBMUAvyRCiGBXkEn" + console.log('dataContractId', dataContractId, dataContractId.length); + const dataContractIdBytes = base58.decode(dataContractId); + if (dataContractIdBytes.length != 32) { + printUsage(); + process.exit(1); + } + + const message = process.argv[4] ?? "It's working!"; + step3CreateDocument(walletPhrase, walletSalt, identityIndex, dataContractId, message); + }); +} \ No newline at end of file diff --git a/built/DashPlatform.js/1-create-asset-lock.d.ts b/built/DashPlatform.js/1-create-asset-lock.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/built/DashPlatform.js/1-create-asset-lock.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/built/DashPlatform.js/1-create-asset-lock.js b/built/DashPlatform.js/1-create-asset-lock.js new file mode 100644 index 0000000..f2c1523 --- /dev/null +++ b/built/DashPlatform.js/1-create-asset-lock.js @@ -0,0 +1,63 @@ +import Fs from "node:fs/promises"; +import DashHd from "dashhd"; +import * as DashHdUtils from "./src/dashhd-utils.ts"; +import DashKeys from "dashkeys"; +import * as DashTx from "dashtx"; +import * as DashPlatform from "./src/dashplatform.js"; +import * as QRCode from "./src/_qr.js"; +import * as KeyUtils from "./src/key-utils.js"; +import { createIdentityFromAssetLock } from "./2-create-identity-transition.js"; +import { loadWallet } from "./src/cli.ts"; +import { deriveAllCreateIdentityKeys } from "./src/asset_lock.js"; +import { createPlatformAssetLock } from "./src/asset_lock.js"; +// let DapiGrpc = require("@dashevo/dapi-grpc"); +// let WasmDpp = require("@dashevo/wasm-dpp"); +// let Dpp = WasmDpp.DashPlatformProtocol; +//@ts-ignore - sssssh, yes Base58 does exist +// let b58 = DashKeys.Base58.create(); +async function main() { + const walletKey = await loadWallet(); + let identityIndex = parseInt(process.argv[2], 10); + if (isNaN(identityIndex)) { + console.error(""); + console.error("USAGE"); + console.error(` ${process.argv[0]} ${process.argv[1]} `); + console.error(""); + console.error("EXAMPLE"); + console.error(` ${process.argv[0]} ${process.argv[1]} 0`); + console.error(""); + process.exit(1); + } + let hdOpts = { version: "testnet" }; // TODO + let { regFundKey, topupKey, // TODO next change key from wallet + assetWif, assetInfo, assetKey, masterKey, otherKey, } = await deriveAllCreateIdentityKeys(hdOpts, walletKey, identityIndex); + console.log("Asset WIF", assetWif, "(would be ephemeral, non-hd)"); + console.log('regFundKey', await DashHd.toAddr(regFundKey.publicKey, { version: 'testnet' })); + console.log('topupKey', await DashHd.toAddr(topupKey.publicKey, { version: 'testnet' })); + console.log('assetKey', await DashHd.toAddr(assetKey.publicKey, { version: 'testnet' })); + console.log('masterKey', await DashHd.toAddr(masterKey.publicKey, { version: 'testnet' })); + console.log('otherKey', await DashHd.toAddr(otherKey.publicKey, { version: 'testnet' })); + console.log(); + let { identityIdHex, txidHex, assetProof } = await createPlatformAssetLock(hdOpts, regFundKey, topupKey, // TODO next change key from wallet + assetInfo); + console.log(); + console.log(`txidHex: `, txidHex); + console.log(`identityIdHex:`, identityIdHex); + console.log(`assetProof:`, assetProof); + await Fs.writeFile('ready-to-create-identity.json', JSON.stringify({ + assetKey, + masterKey, + otherKey, + identityIdHex, + txidHex, + assetProof, + }, (key, val) => { + if (val instanceof Uint8Array || val instanceof ArrayBuffer) { + return { '@Uint8Array hex': DashTx.utils.bytesToHex(new Uint8Array(val)) }; + } + return val; + }, 2)); + await createIdentityFromAssetLock(assetKey, masterKey, otherKey, identityIdHex, txidHex, assetProof); + // walletKey, coinType, identityIndex +} +main(); diff --git a/built/DashPlatform.js/1.8.1/generated_bincode.d.ts b/built/DashPlatform.js/1.8.1/generated_bincode.d.ts new file mode 100644 index 0000000..23275ce --- /dev/null +++ b/built/DashPlatform.js/1.8.1/generated_bincode.d.ts @@ -0,0 +1,30164 @@ +export const Hash: import("../src/bincode.js").BinCodeable>; +/** @type {*} */ +export const Value: any; +/** + * An Asset Unlock Base payload. This is the base payload of the Asset Unlock. In order to make + * it a full payload the request info should be added. + */ +export const AssetUnlockBasePayload: import("../src/bincode.js").BinCodeable<{ + version: number; + index: number | bigint; + fee: number | bigint; +}> & { + (data: { + version: number; + index: number | bigint; + fee: number | bigint; + }): { + version: number; + index: number | bigint; + fee: number | bigint; + } & { + readonly $$type: "AssetUnlockBasePayload"; + }; + fields: { + /** The payload protocol version, is currently expected to be 0. */ + version: import("../src/bincode.js").BinCodeable; + /** The index of the unlock transaction. It gets bumped on each transaction */ + index: import("../src/bincode.js").BinCodeable; + /** The fee used in Duffs (Satoshis) */ + fee: import("../src/bincode.js").BinCodeable; + }; +}; +/** + * A BLS Public key is 48 bytes in the scheme used for Dash Core + * attr since (1.48) , derive (PartialEq , Eq , Ord , PartialOrd , Hash) + */ +export const BLSPublicKey: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSPublicKey"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; +}; +/** + * A BLS Signature is 96 bytes in the scheme used for Dash Core + * attr since (1.48) , derive (PartialEq , Eq , Ord , PartialOrd , Hash) + */ +export const BLSSignature: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; +}; +export const BinaryData: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; +}; +/** A dash block hash. */ +export const BlockHash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BlockHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; +}; +export const Credits: import("../src/bincode.js").BinCodeable; +export const DefinitionName: import("../src/bincode.js").BinCodeable; +export const DocumentName: import("../src/bincode.js").BinCodeable; +export const Hash256: import("../src/bincode.js").BinCodeable>; +export const IdentifierBytes32: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; +}; +export const IdentityNonce: import("../src/bincode.js").BinCodeable; +/** A hash of all transaction inputs */ +export const InputsHash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "InputsHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; +}; +export const KeyID: import("../src/bincode.js").BinCodeable; +/** + * allow non_camel_case_types + * repr u8 + */ +export const KeyType: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "KeyType"; + }; + variants: { + /** default */ + readonly ECDSA_SECP256K1: []; + readonly BLS12_381: []; + readonly ECDSA_HASH160: []; + readonly BIP13_SCRIPT_HASH: []; + readonly EDDSA_25519_HASH160: []; + }; +} & { + ECDSA_SECP256K1: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "ECDSA_SECP256K1"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + BLS12_381: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "BLS12_381"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ECDSA_HASH160: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "ECDSA_HASH160"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + BIP13_SCRIPT_HASH: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "BIP13_SCRIPT_HASH"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + EDDSA_25519_HASH160: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "EDDSA_25519_HASH160"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; +}; +export const LLMQType: import("../src/bincode.js").BinCodeable & { + $$type: { + [ENUM]: "LLMQType"; + }; + variants: { + readonly LlmqtypeUnknown: []; + readonly Llmqtype50_60: []; + readonly Llmqtype400_60: []; + readonly Llmqtype400_85: []; + readonly Llmqtype100_67: []; + readonly Llmqtype60_75: []; + readonly Llmqtype25_67: []; + readonly LlmqtypeTest: never[]; + readonly LlmqtypeDevnet: never[]; + readonly LlmqtypeTestV17: never[]; + readonly LlmqtypeTestDIP0024: never[]; + readonly LlmqtypeTestInstantSend: never[]; + readonly LlmqtypeDevnetDIP0024: never[]; + readonly LlmqtypeTestnetPlatform: never[]; + readonly LlmqtypeDevnetPlatform: never[]; + }; +} & { + LlmqtypeUnknown: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeUnknown"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype50_60: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype50_60"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype400_60: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype400_60"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype400_85: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype400_85"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype100_67: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype100_67"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype60_75: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype60_75"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype25_67: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype25_67"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + LlmqtypeTest: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTest"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnet: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnet"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestV17: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestV17"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestDIP0024: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestDIP0024"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestInstantSend: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestInstantSend"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnetDIP0024: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnetDIP0024"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestnetPlatform: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestnetPlatform"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnetPlatform: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnetPlatform"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; +}; +/** + * Dash Additions + * + * The merkle root of the masternode list + * hash_newtype forward + */ +export const MerkleRootMasternodeList: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "MerkleRootMasternodeList"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; +}; +/** + * The merkle root of the quorums + * hash_newtype forward + */ +export const MerkleRootQuorums: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "MerkleRootQuorums"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; +}; +/** repr u8 */ +export const Pooling: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "Pooling"; + }; + variants: { + /** default */ + readonly Never: []; + readonly IfAvailable: []; + readonly Standard: []; + }; +} & { + Never: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "Never"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + IfAvailable: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "IfAvailable"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Standard: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "Standard"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; +}; +export const ProviderMasternodeType: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "ProviderMasternodeType"; + }; + variants: { + readonly Regular: []; + readonly HighPerformance: []; + }; +} & { + Regular: { + (): [] & { + [ENUM]: "ProviderMasternodeType"; + [VARIANT]: "Regular"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + HighPerformance: { + (): [] & { + [ENUM]: "ProviderMasternodeType"; + [VARIANT]: "HighPerformance"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; +}; +/** A hash of a public key. */ +export const PubkeyHash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "PubkeyHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; +}; +/** repr u8 */ +export const Purpose: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "Purpose"; + }; + variants: { + /** + * at least one authentication key must be registered for all security levels + * default + */ + readonly AUTHENTICATION: []; + /** this key cannot be used for signing documents */ + readonly ENCRYPTION: []; + /** this key cannot be used for signing documents */ + readonly DECRYPTION: []; + /** this key is used to sign credit transfer and withdrawal state transitions */ + readonly TRANSFER: []; + /** this key cannot be used for signing documents */ + readonly SYSTEM: []; + /** this key cannot be used for signing documents */ + readonly VOTING: []; + /** this key is used to prove ownership of a masternode or evonode */ + readonly OWNER: []; + }; +} & { + AUTHENTICATION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "AUTHENTICATION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ENCRYPTION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "ENCRYPTION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + DECRYPTION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "DECRYPTION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + TRANSFER: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "TRANSFER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + SYSTEM: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "SYSTEM"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + VOTING: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "VOTING"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + OWNER: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "OWNER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; +}; +export const QuorumHash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BlockHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; +}; +/** A hash of a quorum verification vector */ +export const QuorumVVecHash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "QuorumVVecHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; +}; +/** "Raw" instant lock for serialization */ +export const RawInstantLockProof: import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; +}> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; +}; +export const Revision: import("../src/bincode.js").BinCodeable; +/** + * An owned, growable script. + * + * `ScriptBuf` is the most common script type that has the ownership over the contents of the + * script. It has a close relationship with its borrowed counterpart, [`Script`]. + * + * Just as other similar types, this implements [`Deref`], so [deref coercions] apply. Also note + * that all the safety/validity restrictions that apply to [`Script`] apply to `ScriptBuf` as well. + * + * [deref coercions]: https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion + */ +export const ScriptBuf: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; +}; +/** repr u8 */ +export const SecurityLevel: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "SecurityLevel"; + }; + variants: { + readonly MASTER: []; + readonly CRITICAL: []; + /** default */ + readonly HIGH: []; + readonly MEDIUM: []; + }; +} & { + MASTER: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "MASTER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + CRITICAL: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "CRITICAL"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + HIGH: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "HIGH"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + MEDIUM: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "MEDIUM"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; +}; +/** + * The Storage Key requirements + * repr u8 + */ +export const StorageKeyRequirements: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "StorageKeyRequirements"; + }; + variants: { + readonly Unique: []; + readonly Multiple: []; + readonly MultipleReferenceToLatest: []; + }; +} & { + Unique: { + (): [] & { + [ENUM]: "StorageKeyRequirements"; + [VARIANT]: "Unique"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Multiple: { + (): [] & { + [ENUM]: "StorageKeyRequirements"; + [VARIANT]: "Multiple"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + MultipleReferenceToLatest: { + (): [] & { + [ENUM]: "StorageKeyRequirements"; + [VARIANT]: "MultipleReferenceToLatest"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; +}; +export const TimestampMillis: import("../src/bincode.js").BinCodeable; +/** + * The transaction type. Special transactions were introduced in DIP2. + * Compared to Bitcoin the version field is split into two 16 bit integers. + * The first part for the version and the second part for the transaction + * type. + * + * repr u16 + */ +export const TransactionType: import("../src/bincode.js").BinCodeable & { + $$type: { + [ENUM]: "TransactionType"; + }; + variants: { + /** A Classic transaction */ + readonly Classic: []; + /** A Masternode Registration Transaction */ + readonly ProviderRegistration: []; + /** A Masternode Update Service Transaction, used by the operator to signal changes to service */ + readonly ProviderUpdateService: []; + /** A Masternode Update Registrar Transaction, used by the owner to signal base changes */ + readonly ProviderUpdateRegistrar: []; + /** A Masternode Update Revocation Transaction, used by the operator to signal termination of service */ + readonly ProviderUpdateRevocation: []; + /** A Coinbase Transaction, contained as the first transaction in each block */ + readonly Coinbase: []; + /** A Quorum Commitment Transaction, used to save quorum information to the state */ + readonly QuorumCommitment: []; + /** An Asset Lock Transaction, used to transfer credits to Dash Platform, by locking them until withdrawals occur */ + readonly AssetLock: never[]; + /** An Asset Unlock Transaction, used to withdraw credits from Dash Platform, by unlocking them */ + readonly AssetUnlock: never[]; + }; +} & { + Classic: { + (): [] & { + [ENUM]: "TransactionType"; + [VARIANT]: "Classic"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ProviderRegistration: { + (): [] & { + [ENUM]: "TransactionType"; + [VARIANT]: "ProviderRegistration"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ProviderUpdateService: { + (): [] & { + [ENUM]: "TransactionType"; + [VARIANT]: "ProviderUpdateService"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ProviderUpdateRegistrar: { + (): [] & { + [ENUM]: "TransactionType"; + [VARIANT]: "ProviderUpdateRegistrar"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ProviderUpdateRevocation: { + (): [] & { + [ENUM]: "TransactionType"; + [VARIANT]: "ProviderUpdateRevocation"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Coinbase: { + (): [] & { + [ENUM]: "TransactionType"; + [VARIANT]: "Coinbase"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + QuorumCommitment: { + (): [] & { + [ENUM]: "TransactionType"; + [VARIANT]: "QuorumCommitment"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + AssetLock: { + (...data: unknown[]): unknown[] & { + [ENUM]: "TransactionType"; + [VARIANT]: "AssetLock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + AssetUnlock: { + (...data: unknown[]): unknown[] & { + [ENUM]: "TransactionType"; + [VARIANT]: "AssetUnlock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; +}; +/** A transaction output, which defines new coins to be created from old ones. */ +export const TxOut: import("../src/bincode.js").BinCodeable<{ + value: number | bigint; + script_pubkey: [Uint8Array]; +}> & { + (data: { + value: number | bigint; + script_pubkey: [Uint8Array]; + }): { + value: number | bigint; + script_pubkey: [Uint8Array]; + } & { + readonly $$type: "TxOut"; + }; + fields: { + /** The value of the output, in satoshis. */ + value: import("../src/bincode.js").BinCodeable; + /** The script which must be satisfied for the output to be spent. */ + script_pubkey: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; +}; +/** A dash transaction hash/transaction ID. */ +export const Txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; +}; +export const UserFeeIncrease: import("../src/bincode.js").BinCodeable; +export const ValueMap: import("../src/bincode.js").BinCodeable<[any, any][]>; +/** + * An Asset Lock payload. This is contained as the payload of an asset lock special transaction. + * The Asset Lock Special transaction and this payload is described in the Asset Lock DIP2X + * (todo:update this). + * An Asset Lock can fund multiple Identity registrations or top ups. + * The Asset Lock payload credit outputs field contains a vector of TxOuts. + * Each TxOut refers to a funding of an Identity. + */ +export const AssetLockPayload: import("../src/bincode.js").BinCodeable<{ + version: number; + credit_outputs: { + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]; +}> & { + (data: { + version: number; + credit_outputs: { + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]; + }): { + version: number; + credit_outputs: { + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]; + } & { + readonly $$type: "AssetLockPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + credit_outputs: import("../src/bincode.js").BinCodeable<{ + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]>; + }; +}; +/** + * An asset unlock request info + * This is the information about the signing quorum + * The request height should be the height at which the specified quorum is active on core. + */ +export const AssetUnlockRequestInfo: import("../src/bincode.js").BinCodeable<{ + request_height: number | bigint; + quorum_hash: [Uint8Array]; +}> & { + (data: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }): { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + } & { + readonly $$type: "AssetUnlockRequestInfo"; + }; + fields: { + /** + * The core request height of the transaction. This should match a period where the quorum_hash + * is still active + */ + request_height: import("../src/bincode.js").BinCodeable; + /** The quorum hash. This is the block hash when the quorum was created. */ + quorum_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BlockHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; +}; +/** + * A Coinbase payload. This is contained as the payload of a coinbase special transaction. + * The Coinbase payload is described in DIP4. + */ +export const CoinbasePayload: import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + height: number | bigint; + merkle_root_masternode_list: [Uint8Array]; + merkle_root_quorums: [Uint8Array]; + best_cl_height: number | bigint | undefined; + best_cl_signature: [Uint8Array] | undefined; + asset_locked_amount: number | bigint | undefined; +}> & { + (data: { + version: number | bigint; + height: number | bigint; + merkle_root_masternode_list: [Uint8Array]; + merkle_root_quorums: [Uint8Array]; + best_cl_height: number | bigint | undefined; + best_cl_signature: [Uint8Array] | undefined; + asset_locked_amount: number | bigint | undefined; + }): { + version: number | bigint; + height: number | bigint; + merkle_root_masternode_list: [Uint8Array]; + merkle_root_quorums: [Uint8Array]; + best_cl_height: number | bigint | undefined; + best_cl_signature: [Uint8Array] | undefined; + asset_locked_amount: number | bigint | undefined; + } & { + readonly $$type: "CoinbasePayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + height: import("../src/bincode.js").BinCodeable; + merkle_root_masternode_list: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "MerkleRootMasternodeList"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + merkle_root_quorums: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "MerkleRootQuorums"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + best_cl_height: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + best_cl_signature: ((data: [Uint8Array] | undefined) => [Uint8Array] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [Uint8Array] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [Uint8Array] | undefined; + }; + asset_locked_amount: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + }; +}; +export const DashcoreScript: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; +}; +export const DataContractConfigV0: import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; +}> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; +}; +export const Identifier: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; +}; +/** platform_serialize unversioned */ +export const IdentityCreditTransferTransitionV0: import("../src/bincode.js").BinCodeable<{ + identity_id: [[Uint8Array]]; + recipient_id: [[Uint8Array]]; + amount: number | bigint; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}> & { + (data: { + identity_id: [[Uint8Array]]; + recipient_id: [[Uint8Array]]; + amount: number | bigint; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_id: [[Uint8Array]]; + recipient_id: [[Uint8Array]]; + amount: number | bigint; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityCreditTransferTransitionV0"; + }; + fields: { + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + recipient_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + amount: import("../src/bincode.js").BinCodeable; + nonce: import("../src/bincode.js").BinCodeable; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; +}; +export const InstantAssetLockProof: import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; +}> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; +}; +/** A reference to a transaction output. */ +export const OutPoint: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; +}> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; +}; +/** + * A Provider Registration Payload used in a Provider Registration Special Transaction. + * This is used to register a Masternode on the network. + * The current version is 0. + * Interesting Fields: + * *Provider type refers to the type of Masternode. Currently only valid value is 0. + * *Provider mode refers to the mode of the Masternode. Currently only valid value is 0. + * *The collateral outpoint links to a transaction with a 1000 Dash unspent (at registration) + * outpoint. + * *The operator reward defines the ratio when divided by 10000 of the amount going to the operator. + * The max value for the operator reward is 10000. + * *The script payout is the script to which one wants to have the masternode pay out. + * *The inputs hash is used to guarantee the uniqueness of the payload sig. + */ +export const ProviderRegistrationPayload: import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + masternode_type: []; + masternode_mode: number | bigint; + collateral_outpoint: { + txid: [Uint8Array]; + vout: number | bigint; + }; + service_address: { + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]; + owner_key_hash: [Uint8Array]; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + operator_reward: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + signature: Uint8Array; + platform_node_id: [Uint8Array] | undefined; + platform_p2p_port: number | bigint | undefined; + platform_http_port: number | bigint | undefined; +}> & { + (data: { + version: number | bigint; + masternode_type: []; + masternode_mode: number | bigint; + collateral_outpoint: { + txid: [Uint8Array]; + vout: number | bigint; + }; + service_address: { + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]; + owner_key_hash: [Uint8Array]; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + operator_reward: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + signature: Uint8Array; + platform_node_id: [Uint8Array] | undefined; + platform_p2p_port: number | bigint | undefined; + platform_http_port: number | bigint | undefined; + }): { + version: number | bigint; + masternode_type: []; + masternode_mode: number | bigint; + collateral_outpoint: { + txid: [Uint8Array]; + vout: number | bigint; + }; + service_address: { + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]; + owner_key_hash: [Uint8Array]; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + operator_reward: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + signature: Uint8Array; + platform_node_id: [Uint8Array] | undefined; + platform_p2p_port: number | bigint | undefined; + platform_http_port: number | bigint | undefined; + } & { + readonly $$type: "ProviderRegistrationPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + masternode_type: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "ProviderMasternodeType"; + }; + variants: { + readonly Regular: []; + readonly HighPerformance: []; + }; + } & { + Regular: { + (): [] & { + [ENUM]: "ProviderMasternodeType"; + [VARIANT]: "Regular"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + HighPerformance: { + (): [] & { + [ENUM]: "ProviderMasternodeType"; + [VARIANT]: "HighPerformance"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + masternode_mode: import("../src/bincode.js").BinCodeable; + collateral_outpoint: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + service_address: import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]> & { + $$type: { + [ENUM]: "SocketAddr"; + }; + variants: { + V4: (import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + }> & { + (data: { + ip: { + octets: Uint8Array; + }; + port: number; + }): { + ip: { + octets: Uint8Array; + }; + port: number; + } & { + readonly $$type: "SocketAddrV4"; + }; + fields: { + ip: import("../src/bincode.js").BinCodeable<{ + octets: Uint8Array; + }> & { + (data: { + octets: Uint8Array; + }): { + octets: Uint8Array; + } & { + readonly $$type: "Ipv4Addr"; + }; + fields: { + octets: import("../src/bincode.js").BinCodeable>; + }; + }; + port: import("../src/bincode.js").BinCodeable; + }; + })[]; + V6: (import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }> & { + (data: { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }): { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + } & { + readonly $$type: "SocketAddrV6"; + }; + fields: { + ip: import("../src/bincode.js").BinCodeable<{ + octets: Uint8Array; + }> & { + (data: { + octets: Uint8Array; + }): { + octets: Uint8Array; + } & { + readonly $$type: "Ipv6Addr"; + }; + fields: { + octets: import("../src/bincode.js").BinCodeable>; + }; + }; + port: import("../src/bincode.js").BinCodeable; + flowinfo: import("../src/bincode.js").BinCodeable; + scope_id: import("../src/bincode.js").BinCodeable; + }; + })[]; + }; + } & { + V4: { + (...data: { + ip: { + octets: Uint8Array; + }; + port: number; + }[]): { + ip: { + octets: Uint8Array; + }; + port: number; + }[] & { + [ENUM]: "SocketAddr"; + [VARIANT]: "V4"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: (import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + }> & { + (data: { + ip: { + octets: Uint8Array; + }; + port: number; + }): { + ip: { + octets: Uint8Array; + }; + port: number; + } & { + readonly $$type: "SocketAddrV4"; + }; + fields: { + ip: import("../src/bincode.js").BinCodeable<{ + octets: Uint8Array; + }> & { + (data: { + octets: Uint8Array; + }): { + octets: Uint8Array; + } & { + readonly $$type: "Ipv4Addr"; + }; + fields: { + octets: import("../src/bincode.js").BinCodeable>; + }; + }; + port: import("../src/bincode.js").BinCodeable; + }; + })[]; + }; + V6: { + (...data: { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]): { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[] & { + [ENUM]: "SocketAddr"; + [VARIANT]: "V6"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: (import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }> & { + (data: { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }): { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + } & { + readonly $$type: "SocketAddrV6"; + }; + fields: { + ip: import("../src/bincode.js").BinCodeable<{ + octets: Uint8Array; + }> & { + (data: { + octets: Uint8Array; + }): { + octets: Uint8Array; + } & { + readonly $$type: "Ipv6Addr"; + }; + fields: { + octets: import("../src/bincode.js").BinCodeable>; + }; + }; + port: import("../src/bincode.js").BinCodeable; + flowinfo: import("../src/bincode.js").BinCodeable; + scope_id: import("../src/bincode.js").BinCodeable; + }; + })[]; + }; + }; + owner_key_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "PubkeyHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + operator_public_key: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSPublicKey"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + voting_key_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "PubkeyHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + operator_reward: import("../src/bincode.js").BinCodeable; + script_payout: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + inputs_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "InputsHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + signature: import("../src/bincode.js").BinCodeable>; + platform_node_id: ((data: [Uint8Array] | undefined) => [Uint8Array] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [Uint8Array] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [Uint8Array] | undefined; + }; + platform_p2p_port: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + platform_http_port: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + }; +}; +/** + * A Provider Update Registrar Payload used in a Provider Update Registrar Special Transaction. + * This is used to update the base aspects a Masternode on the network. + * It must be signed by the owner's key that was set at registration. + */ +export const ProviderUpdateRegistrarPayload: import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + provider_mode: number | bigint; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: Uint8Array; +}> & { + (data: { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + provider_mode: number | bigint; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: Uint8Array; + }): { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + provider_mode: number | bigint; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: Uint8Array; + } & { + readonly $$type: "ProviderUpdateRegistrarPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + pro_tx_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + provider_mode: import("../src/bincode.js").BinCodeable; + operator_public_key: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSPublicKey"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + voting_key_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "PubkeyHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + script_payout: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + inputs_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "InputsHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + payload_sig: import("../src/bincode.js").BinCodeable>; + }; +}; +/** + * A Provider Update Revocation Payload used in a Provider Update Revocation Special Transaction. + * This is used to signal and stop a Masternode from the operator. + * It must be signed by the operator's key that was set at registration or registrar update. + */ +export const ProviderUpdateRevocationPayload: import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + reason: number | bigint; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; +}> & { + (data: { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + reason: number | bigint; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + }): { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + reason: number | bigint; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + } & { + readonly $$type: "ProviderUpdateRevocationPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + pro_tx_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + reason: import("../src/bincode.js").BinCodeable; + inputs_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "InputsHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + payload_sig: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; +}; +/** + * A Provider Update Service Payload used in a Provider Update Service Special Transaction. + * This is used to update the operational aspects a Masternode on the network. + * It must be signed by the operator's key that was set either at registration or by the last + * registrar update of the masternode. + */ +export const ProviderUpdateServicePayload: import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + ip_address: number | bigint; + port: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; +}> & { + (data: { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + ip_address: number | bigint; + port: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + }): { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + ip_address: number | bigint; + port: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + } & { + readonly $$type: "ProviderUpdateServicePayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + pro_tx_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + ip_address: import("../src/bincode.js").BinCodeable; + port: import("../src/bincode.js").BinCodeable; + script_payout: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + inputs_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "InputsHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + payload_sig: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; +}; +/** + * A Quorum Finalization Commitment. It is described in the finalization section of DIP6: + * [dip-0006.md#6-finalization-phase](https://github.com/dashpay/dips/blob/master/dip-0006.md#6-finalization-phase) + */ +export const QuorumEntry: import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; +}> & { + (data: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }): { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + } & { + readonly $$type: "QuorumEntry"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + llmq_type: import("../src/bincode.js").BinCodeable & { + $$type: { + [ENUM]: "LLMQType"; + }; + variants: { + readonly LlmqtypeUnknown: []; + readonly Llmqtype50_60: []; + readonly Llmqtype400_60: []; + readonly Llmqtype400_85: []; + readonly Llmqtype100_67: []; + readonly Llmqtype60_75: []; + readonly Llmqtype25_67: []; + readonly LlmqtypeTest: never[]; + readonly LlmqtypeDevnet: never[]; + readonly LlmqtypeTestV17: never[]; + readonly LlmqtypeTestDIP0024: never[]; + readonly LlmqtypeTestInstantSend: never[]; + readonly LlmqtypeDevnetDIP0024: never[]; + readonly LlmqtypeTestnetPlatform: never[]; + readonly LlmqtypeDevnetPlatform: never[]; + }; + } & { + LlmqtypeUnknown: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeUnknown"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype50_60: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype50_60"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype400_60: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype400_60"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype400_85: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype400_85"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype100_67: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype100_67"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype60_75: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype60_75"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype25_67: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype25_67"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + LlmqtypeTest: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTest"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnet: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnet"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestV17: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestV17"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestDIP0024: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestDIP0024"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestInstantSend: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestInstantSend"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnetDIP0024: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnetDIP0024"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestnetPlatform: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestnetPlatform"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnetPlatform: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnetPlatform"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + }; + quorum_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BlockHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + quorum_index: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + signers: import("../src/bincode.js").BinCodeable; + valid_members: import("../src/bincode.js").BinCodeable; + quorum_public_key: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSPublicKey"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + quorum_vvec_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "QuorumVVecHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + threshold_sig: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + all_commitment_aggregated_signature: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; +}; +/** + * A representation of a dynamic value that can handled dynamically + * non_exhaustive + */ +export const REAL_Value: import("../src/bincode.js").BinCodeable<[] | [number] | [any[]] | [string] | [boolean] | [Uint8Array] | [number | bigint] | [string[]] | [[any, any][]]> & { + $$type: { + [ENUM]: "Value"; + }; + variants: { + /** A u128 integer */ + readonly U128: [import("../src/bincode.js").BinCodeable]; + /** A i128 integer */ + readonly I128: [import("../src/bincode.js").BinCodeable]; + /** A u64 integer */ + readonly U64: [import("../src/bincode.js").BinCodeable]; + /** A i64 integer */ + readonly I64: [import("../src/bincode.js").BinCodeable]; + /** A u32 integer */ + readonly U32: [import("../src/bincode.js").BinCodeable]; + /** A i32 integer */ + readonly I32: [import("../src/bincode.js").BinCodeable]; + /** A u16 integer */ + readonly U16: [import("../src/bincode.js").BinCodeable]; + /** A i16 integer */ + readonly I16: [import("../src/bincode.js").BinCodeable]; + /** A u8 integer */ + readonly U8: [import("../src/bincode.js").BinCodeable]; + /** A i8 integer */ + readonly I8: [import("../src/bincode.js").BinCodeable]; + /** Bytes */ + readonly Bytes: [import("../src/bincode.js").BinCodeable>]; + /** Bytes 20 */ + readonly Bytes20: [import("../src/bincode.js").BinCodeable>]; + /** Bytes 32 */ + readonly Bytes32: [import("../src/bincode.js").BinCodeable>]; + /** Bytes 36 : Useful for outpoints */ + readonly Bytes36: [import("../src/bincode.js").BinCodeable>]; + /** An enumeration of u8 */ + readonly EnumU8: [import("../src/bincode.js").BinCodeable>]; + /** An enumeration of strings */ + readonly EnumString: [import("../src/bincode.js").BinCodeable]; + /** + * Identifier + * The identifier is very similar to bytes, however it is serialized to Base58 when converted + * to a JSON Value + */ + readonly Identifier: [import("../src/bincode.js").BinCodeable>]; + /** A float */ + readonly Float: [import("../src/bincode.js").BinCodeable]; + /** A string */ + readonly Text: [import("../src/bincode.js").BinCodeable]; + /** A boolean */ + readonly Bool: [import("../src/bincode.js").BinCodeable]; + /** Null */ + readonly Null: []; + /** An array */ + readonly Array: [import("../src/bincode.js").BinCodeable]; + /** A map */ + readonly Map: [import("../src/bincode.js").BinCodeable<[any, any][]>]; + }; +} & { + Null: { + (): [] & { + [ENUM]: "Value"; + [VARIANT]: "Null"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Bool: { + (data_0: boolean): [boolean] & { + [ENUM]: "Value"; + [VARIANT]: "Bool"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + Bytes: { + (data_0: Uint8Array): [Uint8Array] & { + [ENUM]: "Value"; + [VARIANT]: "Bytes"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + Identifier: { + (data_0: Uint8Array): [Uint8Array] & { + [ENUM]: "Value"; + [VARIANT]: "Identifier"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + U128: { + (data_0: number | bigint): [number | bigint] & { + [ENUM]: "Value"; + [VARIANT]: "U128"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + I128: { + (data_0: number | bigint): [number | bigint] & { + [ENUM]: "Value"; + [VARIANT]: "I128"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + U64: { + (data_0: number | bigint): [number | bigint] & { + [ENUM]: "Value"; + [VARIANT]: "U64"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + I64: { + (data_0: number | bigint): [number | bigint] & { + [ENUM]: "Value"; + [VARIANT]: "I64"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + U32: { + (data_0: number | bigint): [number | bigint] & { + [ENUM]: "Value"; + [VARIANT]: "U32"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + I32: { + (data_0: number | bigint): [number | bigint] & { + [ENUM]: "Value"; + [VARIANT]: "I32"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + U16: { + (data_0: number | bigint): [number | bigint] & { + [ENUM]: "Value"; + [VARIANT]: "U16"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + I16: { + (data_0: number | bigint): [number | bigint] & { + [ENUM]: "Value"; + [VARIANT]: "I16"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + U8: { + (data_0: number): [number] & { + [ENUM]: "Value"; + [VARIANT]: "U8"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + I8: { + (data_0: number): [number] & { + [ENUM]: "Value"; + [VARIANT]: "I8"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + Bytes20: { + (data_0: Uint8Array): [Uint8Array] & { + [ENUM]: "Value"; + [VARIANT]: "Bytes20"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + Bytes32: { + (data_0: Uint8Array): [Uint8Array] & { + [ENUM]: "Value"; + [VARIANT]: "Bytes32"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + Bytes36: { + (data_0: Uint8Array): [Uint8Array] & { + [ENUM]: "Value"; + [VARIANT]: "Bytes36"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + EnumU8: { + (data_0: Uint8Array): [Uint8Array] & { + [ENUM]: "Value"; + [VARIANT]: "EnumU8"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + EnumString: { + (data_0: string[]): [string[]] & { + [ENUM]: "Value"; + [VARIANT]: "EnumString"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + Float: { + (data_0: number): [number] & { + [ENUM]: "Value"; + [VARIANT]: "Float"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + Text: { + (data_0: string): [string] & { + [ENUM]: "Value"; + [VARIANT]: "Text"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + Array: { + (data_0: any[]): [any[]] & { + [ENUM]: "Value"; + [VARIANT]: "Array"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable]; + }; + Map: { + (data_0: [any, any][]): [[any, any][]] & { + [ENUM]: "Value"; + [VARIANT]: "Map"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[any, any][]>]; + }; +}; +/** + * A resource votes is a votes determining what we should do with a contested resource. + * For example Alice and Bob both want the username "Malaka" + * Some would vote for Alice to get it by putting in her Identifier. + * Some would vote for Bob to get it by putting in Bob's Identifier. + * Let's say someone voted, but is now not quite sure of their votes, they can abstain. + * Lock is there to signal that the shared resource should be given to no one. + * In this case Malaka might have a bad connotation in Greek, hence some might votes to Lock + * the name. + */ +export const ResourceVoteChoice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; +} & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; +}; +/** + * A Credit Withdrawal payload. This is contained as the payload of a credit withdrawal special + * transaction. + * The Credit Withdrawal Special transaction and this payload is described in the Asset Lock DIP2X + * (todo:update this). + * The Credit Withdrawal Payload is signed by a quorum. + * + * Transaction using it have no inputs. Hence the proof of validity lies solely on the BLS signature. + */ +export const AssetUnlockPayload: import("../src/bincode.js").BinCodeable<{ + base: { + version: number; + index: number | bigint; + fee: number | bigint; + }; + request_info: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }; + quorum_sig: [Uint8Array]; +}> & { + (data: { + base: { + version: number; + index: number | bigint; + fee: number | bigint; + }; + request_info: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }; + quorum_sig: [Uint8Array]; + }): { + base: { + version: number; + index: number | bigint; + fee: number | bigint; + }; + request_info: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }; + quorum_sig: [Uint8Array]; + } & { + readonly $$type: "AssetUnlockPayload"; + }; + fields: { + /** + * The base information about the asset unlock. This base information is the information that + * should be put into a queue. + */ + base: import("../src/bincode.js").BinCodeable<{ + version: number; + index: number | bigint; + fee: number | bigint; + }> & { + (data: { + version: number; + index: number | bigint; + fee: number | bigint; + }): { + version: number; + index: number | bigint; + fee: number | bigint; + } & { + readonly $$type: "AssetUnlockBasePayload"; + }; + fields: { + /** The payload protocol version, is currently expected to be 0. */ + version: import("../src/bincode.js").BinCodeable; + /** The index of the unlock transaction. It gets bumped on each transaction */ + index: import("../src/bincode.js").BinCodeable; + /** The fee used in Duffs (Satoshis) */ + fee: import("../src/bincode.js").BinCodeable; + }; + }; + /** + * The request information. This should be added to the unlock transaction as it is being sent + * to be signed. + */ + request_info: import("../src/bincode.js").BinCodeable<{ + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }> & { + (data: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }): { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + } & { + readonly $$type: "AssetUnlockRequestInfo"; + }; + fields: { + /** + * The core request height of the transaction. This should match a period where the quorum_hash + * is still active + */ + request_height: import("../src/bincode.js").BinCodeable; + /** The quorum hash. This is the block hash when the quorum was created. */ + quorum_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BlockHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; + }; + /** The threshold signature. This should be returned by the consensus engine. */ + quorum_sig: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; +}; +/** + * Instant Asset Lock Proof is a part of Identity Create and Identity Topup + * transitions. It is a proof that specific output of dash is locked in credits + * pull and the transitions can mint credits and populate identity's balance. + * To prove that the output is locked, a height where transaction was chain locked is provided. + */ +export const ChainAssetLockProof: import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; +}> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; +}; +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const ContestedDocumentResourceVotePoll: import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; +}> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; +}; +/** + * A contract bounds is the bounds that the key has influence on. + * For authentication keys the bounds mean that the keys can only be used to sign + * within the specified contract. + * For encryption decryption this tells clients to only use these keys for specific + * contracts. + * + * repr u8 + */ +export const ContractBounds: import("../src/bincode.js").BinCodeable<{ + readonly id: [[Uint8Array]]; +} | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; +}> & { + $$type: { + [ENUM]: "ContractBounds"; + }; + variants: { + /** this key can only be used within a specific contract */ + readonly SingleContract: { + readonly id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + /** this key can only be used within a specific contract and for a specific document type */ + readonly SingleContractDocumentType: { + readonly id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + readonly document_type_name: import("../src/bincode.js").BinCodeable; + }; + }; +} & { + SingleContract: { + (data: { + readonly id: [[Uint8Array]]; + }): { + readonly id: [[Uint8Array]]; + } & { + [ENUM]: "ContractBounds"; + [VARIANT]: "SingleContract"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: { + readonly id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }; + SingleContractDocumentType: { + (data: { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }): { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + } & { + [ENUM]: "ContractBounds"; + [VARIANT]: "SingleContractDocumentType"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: { + readonly id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + readonly document_type_name: import("../src/bincode.js").BinCodeable; + }; + }; +}; +export const CoreScript: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "CoreScript"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; +}; +export const DataContractConfig: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; +}]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; +} & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; +}; +export const DataContractInSerializationFormatV0: import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; +}> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; +}; +export const DocumentBaseTransitionV0: import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; +}> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; +}; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_credit_transfer_state_transition" + */ +export const IdentityCreditTransferTransition: import("../src/bincode.js").BinCodeable<[{ + identity_id: [[Uint8Array]]; + recipient_id: [[Uint8Array]]; + amount: number | bigint; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}]> & { + $$type: { + [ENUM]: "IdentityCreditTransferTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + identity_id: [[Uint8Array]]; + recipient_id: [[Uint8Array]]; + amount: number | bigint; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + identity_id: [[Uint8Array]]; + recipient_id: [[Uint8Array]]; + amount: number | bigint; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_id: [[Uint8Array]]; + recipient_id: [[Uint8Array]]; + amount: number | bigint; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityCreditTransferTransitionV0"; + }; + fields: { + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + recipient_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + amount: import("../src/bincode.js").BinCodeable; + nonce: import("../src/bincode.js").BinCodeable; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +} & { + V0: { + (data_0: { + identity_id: [[Uint8Array]]; + recipient_id: [[Uint8Array]]; + amount: number | bigint; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): [{ + identity_id: [[Uint8Array]]; + recipient_id: [[Uint8Array]]; + amount: number | bigint; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }] & { + [ENUM]: "IdentityCreditTransferTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + identity_id: [[Uint8Array]]; + recipient_id: [[Uint8Array]]; + amount: number | bigint; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + identity_id: [[Uint8Array]]; + recipient_id: [[Uint8Array]]; + amount: number | bigint; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_id: [[Uint8Array]]; + recipient_id: [[Uint8Array]]; + amount: number | bigint; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityCreditTransferTransitionV0"; + }; + fields: { + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + recipient_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + amount: import("../src/bincode.js").BinCodeable; + nonce: import("../src/bincode.js").BinCodeable; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +}; +export const IdentityCreditWithdrawalTransitionV0: import("../src/bincode.js").BinCodeable<{ + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]]; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}> & { + (data: { + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]]; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]]; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityCreditWithdrawalTransitionV0"; + }; + fields: { + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + amount: import("../src/bincode.js").BinCodeable; + core_fee_per_byte: import("../src/bincode.js").BinCodeable; + pooling: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "Pooling"; + }; + variants: { + /** default */ + readonly Never: []; + readonly IfAvailable: []; + readonly Standard: []; + }; + } & { + Never: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "Never"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + IfAvailable: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "IfAvailable"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Standard: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "Standard"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + output_script: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "CoreScript"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + nonce: import("../src/bincode.js").BinCodeable; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; +}; +export const IdentityCreditWithdrawalTransitionV1: import("../src/bincode.js").BinCodeable<{ + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]] | undefined; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}> & { + (data: { + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]] | undefined; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]] | undefined; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityCreditWithdrawalTransitionV1"; + }; + fields: { + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + amount: import("../src/bincode.js").BinCodeable; + core_fee_per_byte: import("../src/bincode.js").BinCodeable; + pooling: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "Pooling"; + }; + variants: { + /** default */ + readonly Never: []; + readonly IfAvailable: []; + readonly Standard: []; + }; + } & { + Never: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "Never"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + IfAvailable: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "IfAvailable"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Standard: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "Standard"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + /** If the send to output script is None, then we send the withdrawal to the address set by core */ + output_script: ((data: [[Uint8Array]] | undefined) => [[Uint8Array]] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [[Uint8Array]] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [[Uint8Array]] | undefined; + }; + nonce: import("../src/bincode.js").BinCodeable; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; +}; +export const IdentityPublicKeyInCreationV0: import("../src/bincode.js").BinCodeable<{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; +}> & { + (data: { + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }): { + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityPublicKeyInCreationV0"; + }; + fields: { + id: import("../src/bincode.js").BinCodeable; + key_type: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "KeyType"; + }; + variants: { + /** default */ + readonly ECDSA_SECP256K1: []; + readonly BLS12_381: []; + readonly ECDSA_HASH160: []; + readonly BIP13_SCRIPT_HASH: []; + readonly EDDSA_25519_HASH160: []; + }; + } & { + ECDSA_SECP256K1: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "ECDSA_SECP256K1"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + BLS12_381: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "BLS12_381"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ECDSA_HASH160: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "ECDSA_HASH160"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + BIP13_SCRIPT_HASH: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "BIP13_SCRIPT_HASH"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + EDDSA_25519_HASH160: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "EDDSA_25519_HASH160"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + purpose: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "Purpose"; + }; + variants: { + /** + * at least one authentication key must be registered for all security levels + * default + */ + readonly AUTHENTICATION: []; + /** this key cannot be used for signing documents */ + readonly ENCRYPTION: []; + /** this key cannot be used for signing documents */ + readonly DECRYPTION: []; + /** this key is used to sign credit transfer and withdrawal state transitions */ + readonly TRANSFER: []; + /** this key cannot be used for signing documents */ + readonly SYSTEM: []; + /** this key cannot be used for signing documents */ + readonly VOTING: []; + /** this key is used to prove ownership of a masternode or evonode */ + readonly OWNER: []; + }; + } & { + AUTHENTICATION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "AUTHENTICATION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ENCRYPTION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "ENCRYPTION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + DECRYPTION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "DECRYPTION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + TRANSFER: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "TRANSFER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + SYSTEM: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "SYSTEM"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + VOTING: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "VOTING"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + OWNER: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "OWNER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + security_level: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "SecurityLevel"; + }; + variants: { + readonly MASTER: []; + readonly CRITICAL: []; + /** default */ + readonly HIGH: []; + readonly MEDIUM: []; + }; + } & { + MASTER: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "MASTER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + CRITICAL: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "CRITICAL"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + HIGH: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "HIGH"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + MEDIUM: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "MEDIUM"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + contract_bounds: ((data: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined) => ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + }; + read_only: import("../src/bincode.js").BinCodeable; + data: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The signature is needed for ECDSA_SECP256K1 Key type and BLS12_381 Key type */ + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; +}; +export const IdentityPublicKeyV0: import("../src/bincode.js").BinCodeable<{ + id: number | bigint; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + key_type: []; + read_only: boolean; + data: [Uint8Array]; + disabled_at: number | bigint | undefined; +}> & { + (data: { + id: number | bigint; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + key_type: []; + read_only: boolean; + data: [Uint8Array]; + disabled_at: number | bigint | undefined; + }): { + id: number | bigint; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + key_type: []; + read_only: boolean; + data: [Uint8Array]; + disabled_at: number | bigint | undefined; + } & { + readonly $$type: "IdentityPublicKeyV0"; + }; + fields: { + id: import("../src/bincode.js").BinCodeable; + purpose: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "Purpose"; + }; + variants: { + /** + * at least one authentication key must be registered for all security levels + * default + */ + readonly AUTHENTICATION: []; + /** this key cannot be used for signing documents */ + readonly ENCRYPTION: []; + /** this key cannot be used for signing documents */ + readonly DECRYPTION: []; + /** this key is used to sign credit transfer and withdrawal state transitions */ + readonly TRANSFER: []; + /** this key cannot be used for signing documents */ + readonly SYSTEM: []; + /** this key cannot be used for signing documents */ + readonly VOTING: []; + /** this key is used to prove ownership of a masternode or evonode */ + readonly OWNER: []; + }; + } & { + AUTHENTICATION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "AUTHENTICATION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ENCRYPTION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "ENCRYPTION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + DECRYPTION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "DECRYPTION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + TRANSFER: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "TRANSFER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + SYSTEM: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "SYSTEM"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + VOTING: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "VOTING"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + OWNER: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "OWNER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + security_level: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "SecurityLevel"; + }; + variants: { + readonly MASTER: []; + readonly CRITICAL: []; + /** default */ + readonly HIGH: []; + readonly MEDIUM: []; + }; + } & { + MASTER: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "MASTER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + CRITICAL: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "CRITICAL"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + HIGH: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "HIGH"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + MEDIUM: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "MEDIUM"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + contract_bounds: ((data: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined) => ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + }; + key_type: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "KeyType"; + }; + variants: { + /** default */ + readonly ECDSA_SECP256K1: []; + readonly BLS12_381: []; + readonly ECDSA_HASH160: []; + readonly BIP13_SCRIPT_HASH: []; + readonly EDDSA_25519_HASH160: []; + }; + } & { + ECDSA_SECP256K1: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "ECDSA_SECP256K1"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + BLS12_381: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "BLS12_381"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ECDSA_HASH160: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "ECDSA_HASH160"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + BIP13_SCRIPT_HASH: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "BIP13_SCRIPT_HASH"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + EDDSA_25519_HASH160: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "EDDSA_25519_HASH160"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + read_only: import("../src/bincode.js").BinCodeable; + data: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + disabled_at: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + }; +}; +/** + * A Quorum Commitment Payload used in a Quorum Commitment Special Transaction. + * This is used in the mining phase as described in DIP 6: + * [dip-0006.md#7-mining-phase](https://github.com/dashpay/dips/blob/master/dip-0006.md#7-mining-phase). + * + * Miners take the best final commitment for a DKG session and mine it into a block. + */ +export const QuorumCommitmentPayload: import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + height: number | bigint; + finalization_commitment: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }; +}> & { + (data: { + version: number | bigint; + height: number | bigint; + finalization_commitment: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }; + }): { + version: number | bigint; + height: number | bigint; + finalization_commitment: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }; + } & { + readonly $$type: "QuorumCommitmentPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + height: import("../src/bincode.js").BinCodeable; + finalization_commitment: import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }> & { + (data: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }): { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + } & { + readonly $$type: "QuorumEntry"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + llmq_type: import("../src/bincode.js").BinCodeable & { + $$type: { + [ENUM]: "LLMQType"; + }; + variants: { + readonly LlmqtypeUnknown: []; + readonly Llmqtype50_60: []; + readonly Llmqtype400_60: []; + readonly Llmqtype400_85: []; + readonly Llmqtype100_67: []; + readonly Llmqtype60_75: []; + readonly Llmqtype25_67: []; + readonly LlmqtypeTest: never[]; + readonly LlmqtypeDevnet: never[]; + readonly LlmqtypeTestV17: never[]; + readonly LlmqtypeTestDIP0024: never[]; + readonly LlmqtypeTestInstantSend: never[]; + readonly LlmqtypeDevnetDIP0024: never[]; + readonly LlmqtypeTestnetPlatform: never[]; + readonly LlmqtypeDevnetPlatform: never[]; + }; + } & { + LlmqtypeUnknown: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeUnknown"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype50_60: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype50_60"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype400_60: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype400_60"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype400_85: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype400_85"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype100_67: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype100_67"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype60_75: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype60_75"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype25_67: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype25_67"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + LlmqtypeTest: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTest"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnet: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnet"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestV17: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestV17"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestDIP0024: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestDIP0024"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestInstantSend: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestInstantSend"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnetDIP0024: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnetDIP0024"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestnetPlatform: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestnetPlatform"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnetPlatform: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnetPlatform"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + }; + quorum_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BlockHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + quorum_index: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + signers: import("../src/bincode.js").BinCodeable; + valid_members: import("../src/bincode.js").BinCodeable; + quorum_public_key: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSPublicKey"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + quorum_vvec_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "QuorumVVecHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + threshold_sig: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + all_commitment_aggregated_signature: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; + }; + }; +}; +/** + * An enum wrapper around various special transaction payloads. + * Special transactions are defined in DIP 2. + */ +export const TransactionPayload: import("../src/bincode.js").BinCodeable<[{ + version: number | bigint; + masternode_type: []; + masternode_mode: number | bigint; + collateral_outpoint: { + txid: [Uint8Array]; + vout: number | bigint; + }; + service_address: { + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]; + owner_key_hash: [Uint8Array]; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + operator_reward: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + signature: Uint8Array; + platform_node_id: [Uint8Array] | undefined; + platform_p2p_port: number | bigint | undefined; + platform_http_port: number | bigint | undefined; +}] | [{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + ip_address: number | bigint; + port: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; +}] | [{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + provider_mode: number | bigint; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: Uint8Array; +}] | [{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + reason: number | bigint; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; +}] | [{ + version: number | bigint; + height: number | bigint; + merkle_root_masternode_list: [Uint8Array]; + merkle_root_quorums: [Uint8Array]; + best_cl_height: number | bigint | undefined; + best_cl_signature: [Uint8Array] | undefined; + asset_locked_amount: number | bigint | undefined; +}] | [{ + version: number | bigint; + height: number | bigint; + finalization_commitment: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }; +}] | [{ + version: number; + credit_outputs: { + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]; +}] | [{ + base: { + version: number; + index: number | bigint; + fee: number | bigint; + }; + request_info: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }; + quorum_sig: [Uint8Array]; +}]> & { + $$type: { + [ENUM]: "TransactionPayload"; + }; + variants: { + /** A wrapper for a Masternode Registration payload */ + readonly ProviderRegistrationPayloadType: [import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + masternode_type: []; + masternode_mode: number | bigint; + collateral_outpoint: { + txid: [Uint8Array]; + vout: number | bigint; + }; + service_address: { + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]; + owner_key_hash: [Uint8Array]; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + operator_reward: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + signature: Uint8Array; + platform_node_id: [Uint8Array] | undefined; + platform_p2p_port: number | bigint | undefined; + platform_http_port: number | bigint | undefined; + }> & { + (data: { + version: number | bigint; + masternode_type: []; + masternode_mode: number | bigint; + collateral_outpoint: { + txid: [Uint8Array]; + vout: number | bigint; + }; + service_address: { + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]; + owner_key_hash: [Uint8Array]; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + operator_reward: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + signature: Uint8Array; + platform_node_id: [Uint8Array] | undefined; + platform_p2p_port: number | bigint | undefined; + platform_http_port: number | bigint | undefined; + }): { + version: number | bigint; + masternode_type: []; + masternode_mode: number | bigint; + collateral_outpoint: { + txid: [Uint8Array]; + vout: number | bigint; + }; + service_address: { + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]; + owner_key_hash: [Uint8Array]; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + operator_reward: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + signature: Uint8Array; + platform_node_id: [Uint8Array] | undefined; + platform_p2p_port: number | bigint | undefined; + platform_http_port: number | bigint | undefined; + } & { + readonly $$type: "ProviderRegistrationPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + masternode_type: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "ProviderMasternodeType"; + }; + variants: { + readonly Regular: []; + readonly HighPerformance: []; + }; + } & { + Regular: { + (): [] & { + [ENUM]: "ProviderMasternodeType"; + [VARIANT]: "Regular"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + HighPerformance: { + (): [] & { + [ENUM]: "ProviderMasternodeType"; + [VARIANT]: "HighPerformance"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + masternode_mode: import("../src/bincode.js").BinCodeable; + collateral_outpoint: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + service_address: import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]> & { + $$type: { + [ENUM]: "SocketAddr"; + }; + variants: { + V4: (import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + }> & { + (data: { + ip: { + octets: Uint8Array; + }; + port: number; + }): { + ip: { + octets: Uint8Array; + }; + port: number; + } & { + readonly $$type: "SocketAddrV4"; + }; + fields: { + ip: import("../src/bincode.js").BinCodeable<{ + octets: Uint8Array; + }> & { + (data: { + octets: Uint8Array; + }): { + octets: Uint8Array; + } & { + readonly $$type: "Ipv4Addr"; + }; + fields: { + octets: import("../src/bincode.js").BinCodeable>; + }; + }; + port: import("../src/bincode.js").BinCodeable; + }; + })[]; + V6: (import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }> & { + (data: { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }): { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + } & { + readonly $$type: "SocketAddrV6"; + }; + fields: { + ip: import("../src/bincode.js").BinCodeable<{ + octets: Uint8Array; + }> & { + (data: { + octets: Uint8Array; + }): { + octets: Uint8Array; + } & { + readonly $$type: "Ipv6Addr"; + }; + fields: { + octets: import("../src/bincode.js").BinCodeable>; + }; + }; + port: import("../src/bincode.js").BinCodeable; + flowinfo: import("../src/bincode.js").BinCodeable; + scope_id: import("../src/bincode.js").BinCodeable; + }; + })[]; + }; + } & { + V4: { + (...data: { + ip: { + octets: Uint8Array; + }; + port: number; + }[]): { + ip: { + octets: Uint8Array; + }; + port: number; + }[] & { + [ENUM]: "SocketAddr"; + [VARIANT]: "V4"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: (import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + }> & { + (data: { + ip: { + octets: Uint8Array; + }; + port: number; + }): { + ip: { + octets: Uint8Array; + }; + port: number; + } & { + readonly $$type: "SocketAddrV4"; + }; + fields: { + ip: import("../src/bincode.js").BinCodeable<{ + octets: Uint8Array; + }> & { + (data: { + octets: Uint8Array; + }): { + octets: Uint8Array; + } & { + readonly $$type: "Ipv4Addr"; + }; + fields: { + octets: import("../src/bincode.js").BinCodeable>; + }; + }; + port: import("../src/bincode.js").BinCodeable; + }; + })[]; + }; + V6: { + (...data: { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]): { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[] & { + [ENUM]: "SocketAddr"; + [VARIANT]: "V6"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: (import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }> & { + (data: { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }): { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + } & { + readonly $$type: "SocketAddrV6"; + }; + fields: { + ip: import("../src/bincode.js").BinCodeable<{ + octets: Uint8Array; + }> & { + (data: { + octets: Uint8Array; + }): { + octets: Uint8Array; + } & { + readonly $$type: "Ipv6Addr"; + }; + fields: { + octets: import("../src/bincode.js").BinCodeable>; + }; + }; + port: import("../src/bincode.js").BinCodeable; + flowinfo: import("../src/bincode.js").BinCodeable; + scope_id: import("../src/bincode.js").BinCodeable; + }; + })[]; + }; + }; + owner_key_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "PubkeyHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + operator_public_key: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSPublicKey"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + voting_key_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "PubkeyHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + operator_reward: import("../src/bincode.js").BinCodeable; + script_payout: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + inputs_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "InputsHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + signature: import("../src/bincode.js").BinCodeable>; + platform_node_id: ((data: [Uint8Array] | undefined) => [Uint8Array] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [Uint8Array] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [Uint8Array] | undefined; + }; + platform_p2p_port: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + platform_http_port: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + }; + }]; + /** A wrapper for a Masternode Update Service payload */ + readonly ProviderUpdateServicePayloadType: [import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + ip_address: number | bigint; + port: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + }> & { + (data: { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + ip_address: number | bigint; + port: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + }): { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + ip_address: number | bigint; + port: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + } & { + readonly $$type: "ProviderUpdateServicePayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + pro_tx_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + ip_address: import("../src/bincode.js").BinCodeable; + port: import("../src/bincode.js").BinCodeable; + script_payout: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + inputs_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "InputsHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + payload_sig: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; + }]; + /** A wrapper for a Masternode Update Registrar payload */ + readonly ProviderUpdateRegistrarPayloadType: [import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + provider_mode: number | bigint; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: Uint8Array; + }> & { + (data: { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + provider_mode: number | bigint; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: Uint8Array; + }): { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + provider_mode: number | bigint; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: Uint8Array; + } & { + readonly $$type: "ProviderUpdateRegistrarPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + pro_tx_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + provider_mode: import("../src/bincode.js").BinCodeable; + operator_public_key: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSPublicKey"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + voting_key_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "PubkeyHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + script_payout: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + inputs_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "InputsHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + payload_sig: import("../src/bincode.js").BinCodeable>; + }; + }]; + /** A wrapper for a Masternode Update Revocation payload */ + readonly ProviderUpdateRevocationPayloadType: [import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + reason: number | bigint; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + }> & { + (data: { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + reason: number | bigint; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + }): { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + reason: number | bigint; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + } & { + readonly $$type: "ProviderUpdateRevocationPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + pro_tx_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + reason: import("../src/bincode.js").BinCodeable; + inputs_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "InputsHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + payload_sig: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; + }]; + /** A wrapper for a Coinbase payload */ + readonly CoinbasePayloadType: [import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + height: number | bigint; + merkle_root_masternode_list: [Uint8Array]; + merkle_root_quorums: [Uint8Array]; + best_cl_height: number | bigint | undefined; + best_cl_signature: [Uint8Array] | undefined; + asset_locked_amount: number | bigint | undefined; + }> & { + (data: { + version: number | bigint; + height: number | bigint; + merkle_root_masternode_list: [Uint8Array]; + merkle_root_quorums: [Uint8Array]; + best_cl_height: number | bigint | undefined; + best_cl_signature: [Uint8Array] | undefined; + asset_locked_amount: number | bigint | undefined; + }): { + version: number | bigint; + height: number | bigint; + merkle_root_masternode_list: [Uint8Array]; + merkle_root_quorums: [Uint8Array]; + best_cl_height: number | bigint | undefined; + best_cl_signature: [Uint8Array] | undefined; + asset_locked_amount: number | bigint | undefined; + } & { + readonly $$type: "CoinbasePayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + height: import("../src/bincode.js").BinCodeable; + merkle_root_masternode_list: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "MerkleRootMasternodeList"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + merkle_root_quorums: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "MerkleRootQuorums"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + best_cl_height: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + best_cl_signature: ((data: [Uint8Array] | undefined) => [Uint8Array] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [Uint8Array] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [Uint8Array] | undefined; + }; + asset_locked_amount: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + }; + }]; + /** A wrapper for a Quorum Commitment payload */ + readonly QuorumCommitmentPayloadType: [import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + height: number | bigint; + finalization_commitment: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }; + }> & { + (data: { + version: number | bigint; + height: number | bigint; + finalization_commitment: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }; + }): { + version: number | bigint; + height: number | bigint; + finalization_commitment: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }; + } & { + readonly $$type: "QuorumCommitmentPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + height: import("../src/bincode.js").BinCodeable; + finalization_commitment: import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }> & { + (data: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }): { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + } & { + readonly $$type: "QuorumEntry"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + llmq_type: import("../src/bincode.js").BinCodeable & { + $$type: { + [ENUM]: "LLMQType"; + }; + variants: { + readonly LlmqtypeUnknown: []; + readonly Llmqtype50_60: []; + readonly Llmqtype400_60: []; + readonly Llmqtype400_85: []; + readonly Llmqtype100_67: []; + readonly Llmqtype60_75: []; + readonly Llmqtype25_67: []; + readonly LlmqtypeTest: never[]; + readonly LlmqtypeDevnet: never[]; + readonly LlmqtypeTestV17: never[]; + readonly LlmqtypeTestDIP0024: never[]; + readonly LlmqtypeTestInstantSend: never[]; + readonly LlmqtypeDevnetDIP0024: never[]; + readonly LlmqtypeTestnetPlatform: never[]; + readonly LlmqtypeDevnetPlatform: never[]; + }; + } & { + LlmqtypeUnknown: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeUnknown"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype50_60: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype50_60"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype400_60: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype400_60"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype400_85: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype400_85"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype100_67: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype100_67"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype60_75: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype60_75"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype25_67: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype25_67"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + LlmqtypeTest: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTest"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnet: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnet"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestV17: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestV17"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestDIP0024: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestDIP0024"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestInstantSend: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestInstantSend"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnetDIP0024: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnetDIP0024"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestnetPlatform: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestnetPlatform"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnetPlatform: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnetPlatform"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + }; + quorum_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BlockHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + quorum_index: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + signers: import("../src/bincode.js").BinCodeable; + valid_members: import("../src/bincode.js").BinCodeable; + quorum_public_key: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSPublicKey"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + quorum_vvec_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "QuorumVVecHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + threshold_sig: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + all_commitment_aggregated_signature: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; + }; + }; + }]; + /** A wrapper for an Asset Lock payload */ + readonly AssetLockPayloadType: [import("../src/bincode.js").BinCodeable<{ + version: number; + credit_outputs: { + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]; + }> & { + (data: { + version: number; + credit_outputs: { + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]; + }): { + version: number; + credit_outputs: { + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]; + } & { + readonly $$type: "AssetLockPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + credit_outputs: import("../src/bincode.js").BinCodeable<{ + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]>; + }; + }]; + /** A wrapper for an Asset Unlock payload */ + readonly AssetUnlockPayloadType: [import("../src/bincode.js").BinCodeable<{ + base: { + version: number; + index: number | bigint; + fee: number | bigint; + }; + request_info: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }; + quorum_sig: [Uint8Array]; + }> & { + (data: { + base: { + version: number; + index: number | bigint; + fee: number | bigint; + }; + request_info: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }; + quorum_sig: [Uint8Array]; + }): { + base: { + version: number; + index: number | bigint; + fee: number | bigint; + }; + request_info: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }; + quorum_sig: [Uint8Array]; + } & { + readonly $$type: "AssetUnlockPayload"; + }; + fields: { + /** + * The base information about the asset unlock. This base information is the information that + * should be put into a queue. + */ + base: import("../src/bincode.js").BinCodeable<{ + version: number; + index: number | bigint; + fee: number | bigint; + }> & { + (data: { + version: number; + index: number | bigint; + fee: number | bigint; + }): { + version: number; + index: number | bigint; + fee: number | bigint; + } & { + readonly $$type: "AssetUnlockBasePayload"; + }; + fields: { + /** The payload protocol version, is currently expected to be 0. */ + version: import("../src/bincode.js").BinCodeable; + /** The index of the unlock transaction. It gets bumped on each transaction */ + index: import("../src/bincode.js").BinCodeable; + /** The fee used in Duffs (Satoshis) */ + fee: import("../src/bincode.js").BinCodeable; + }; + }; + /** + * The request information. This should be added to the unlock transaction as it is being sent + * to be signed. + */ + request_info: import("../src/bincode.js").BinCodeable<{ + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }> & { + (data: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }): { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + } & { + readonly $$type: "AssetUnlockRequestInfo"; + }; + fields: { + /** + * The core request height of the transaction. This should match a period where the quorum_hash + * is still active + */ + request_height: import("../src/bincode.js").BinCodeable; + /** The quorum hash. This is the block hash when the quorum was created. */ + quorum_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BlockHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; + }; + /** The threshold signature. This should be returned by the consensus engine. */ + quorum_sig: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; + }]; + }; +} & { + ProviderRegistrationPayloadType: { + (data_0: { + version: number | bigint; + masternode_type: []; + masternode_mode: number | bigint; + collateral_outpoint: { + txid: [Uint8Array]; + vout: number | bigint; + }; + service_address: { + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]; + owner_key_hash: [Uint8Array]; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + operator_reward: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + signature: Uint8Array; + platform_node_id: [Uint8Array] | undefined; + platform_p2p_port: number | bigint | undefined; + platform_http_port: number | bigint | undefined; + }): [{ + version: number | bigint; + masternode_type: []; + masternode_mode: number | bigint; + collateral_outpoint: { + txid: [Uint8Array]; + vout: number | bigint; + }; + service_address: { + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]; + owner_key_hash: [Uint8Array]; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + operator_reward: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + signature: Uint8Array; + platform_node_id: [Uint8Array] | undefined; + platform_p2p_port: number | bigint | undefined; + platform_http_port: number | bigint | undefined; + }] & { + [ENUM]: "TransactionPayload"; + [VARIANT]: "ProviderRegistrationPayloadType"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + masternode_type: []; + masternode_mode: number | bigint; + collateral_outpoint: { + txid: [Uint8Array]; + vout: number | bigint; + }; + service_address: { + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]; + owner_key_hash: [Uint8Array]; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + operator_reward: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + signature: Uint8Array; + platform_node_id: [Uint8Array] | undefined; + platform_p2p_port: number | bigint | undefined; + platform_http_port: number | bigint | undefined; + }> & { + (data: { + version: number | bigint; + masternode_type: []; + masternode_mode: number | bigint; + collateral_outpoint: { + txid: [Uint8Array]; + vout: number | bigint; + }; + service_address: { + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]; + owner_key_hash: [Uint8Array]; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + operator_reward: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + signature: Uint8Array; + platform_node_id: [Uint8Array] | undefined; + platform_p2p_port: number | bigint | undefined; + platform_http_port: number | bigint | undefined; + }): { + version: number | bigint; + masternode_type: []; + masternode_mode: number | bigint; + collateral_outpoint: { + txid: [Uint8Array]; + vout: number | bigint; + }; + service_address: { + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]; + owner_key_hash: [Uint8Array]; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + operator_reward: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + signature: Uint8Array; + platform_node_id: [Uint8Array] | undefined; + platform_p2p_port: number | bigint | undefined; + platform_http_port: number | bigint | undefined; + } & { + readonly $$type: "ProviderRegistrationPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + masternode_type: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "ProviderMasternodeType"; + }; + variants: { + readonly Regular: []; + readonly HighPerformance: []; + }; + } & { + Regular: { + (): [] & { + [ENUM]: "ProviderMasternodeType"; + [VARIANT]: "Regular"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + HighPerformance: { + (): [] & { + [ENUM]: "ProviderMasternodeType"; + [VARIANT]: "HighPerformance"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + masternode_mode: import("../src/bincode.js").BinCodeable; + collateral_outpoint: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + service_address: import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + }[] | { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]> & { + $$type: { + [ENUM]: "SocketAddr"; + }; + variants: { + V4: (import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + }> & { + (data: { + ip: { + octets: Uint8Array; + }; + port: number; + }): { + ip: { + octets: Uint8Array; + }; + port: number; + } & { + readonly $$type: "SocketAddrV4"; + }; + fields: { + ip: import("../src/bincode.js").BinCodeable<{ + octets: Uint8Array; + }> & { + (data: { + octets: Uint8Array; + }): { + octets: Uint8Array; + } & { + readonly $$type: "Ipv4Addr"; + }; + fields: { + octets: import("../src/bincode.js").BinCodeable>; + }; + }; + port: import("../src/bincode.js").BinCodeable; + }; + })[]; + V6: (import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }> & { + (data: { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }): { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + } & { + readonly $$type: "SocketAddrV6"; + }; + fields: { + ip: import("../src/bincode.js").BinCodeable<{ + octets: Uint8Array; + }> & { + (data: { + octets: Uint8Array; + }): { + octets: Uint8Array; + } & { + readonly $$type: "Ipv6Addr"; + }; + fields: { + octets: import("../src/bincode.js").BinCodeable>; + }; + }; + port: import("../src/bincode.js").BinCodeable; + flowinfo: import("../src/bincode.js").BinCodeable; + scope_id: import("../src/bincode.js").BinCodeable; + }; + })[]; + }; + } & { + V4: { + (...data: { + ip: { + octets: Uint8Array; + }; + port: number; + }[]): { + ip: { + octets: Uint8Array; + }; + port: number; + }[] & { + [ENUM]: "SocketAddr"; + [VARIANT]: "V4"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: (import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + }> & { + (data: { + ip: { + octets: Uint8Array; + }; + port: number; + }): { + ip: { + octets: Uint8Array; + }; + port: number; + } & { + readonly $$type: "SocketAddrV4"; + }; + fields: { + ip: import("../src/bincode.js").BinCodeable<{ + octets: Uint8Array; + }> & { + (data: { + octets: Uint8Array; + }): { + octets: Uint8Array; + } & { + readonly $$type: "Ipv4Addr"; + }; + fields: { + octets: import("../src/bincode.js").BinCodeable>; + }; + }; + port: import("../src/bincode.js").BinCodeable; + }; + })[]; + }; + V6: { + (...data: { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[]): { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }[] & { + [ENUM]: "SocketAddr"; + [VARIANT]: "V6"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: (import("../src/bincode.js").BinCodeable<{ + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }> & { + (data: { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + }): { + ip: { + octets: Uint8Array; + }; + port: number; + flowinfo: number; + scope_id: number; + } & { + readonly $$type: "SocketAddrV6"; + }; + fields: { + ip: import("../src/bincode.js").BinCodeable<{ + octets: Uint8Array; + }> & { + (data: { + octets: Uint8Array; + }): { + octets: Uint8Array; + } & { + readonly $$type: "Ipv6Addr"; + }; + fields: { + octets: import("../src/bincode.js").BinCodeable>; + }; + }; + port: import("../src/bincode.js").BinCodeable; + flowinfo: import("../src/bincode.js").BinCodeable; + scope_id: import("../src/bincode.js").BinCodeable; + }; + })[]; + }; + }; + owner_key_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "PubkeyHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + operator_public_key: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSPublicKey"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + voting_key_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "PubkeyHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + operator_reward: import("../src/bincode.js").BinCodeable; + script_payout: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + inputs_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "InputsHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + signature: import("../src/bincode.js").BinCodeable>; + platform_node_id: ((data: [Uint8Array] | undefined) => [Uint8Array] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [Uint8Array] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [Uint8Array] | undefined; + }; + platform_p2p_port: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + platform_http_port: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + }; + }]; + }; + ProviderUpdateServicePayloadType: { + (data_0: { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + ip_address: number | bigint; + port: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + }): [{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + ip_address: number | bigint; + port: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + }] & { + [ENUM]: "TransactionPayload"; + [VARIANT]: "ProviderUpdateServicePayloadType"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + ip_address: number | bigint; + port: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + }> & { + (data: { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + ip_address: number | bigint; + port: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + }): { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + ip_address: number | bigint; + port: number | bigint; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + } & { + readonly $$type: "ProviderUpdateServicePayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + pro_tx_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + ip_address: import("../src/bincode.js").BinCodeable; + port: import("../src/bincode.js").BinCodeable; + script_payout: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + inputs_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "InputsHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + payload_sig: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; + }]; + }; + ProviderUpdateRegistrarPayloadType: { + (data_0: { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + provider_mode: number | bigint; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: Uint8Array; + }): [{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + provider_mode: number | bigint; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: Uint8Array; + }] & { + [ENUM]: "TransactionPayload"; + [VARIANT]: "ProviderUpdateRegistrarPayloadType"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + provider_mode: number | bigint; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: Uint8Array; + }> & { + (data: { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + provider_mode: number | bigint; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: Uint8Array; + }): { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + provider_mode: number | bigint; + operator_public_key: [Uint8Array]; + voting_key_hash: [Uint8Array]; + script_payout: [Uint8Array]; + inputs_hash: [Uint8Array]; + payload_sig: Uint8Array; + } & { + readonly $$type: "ProviderUpdateRegistrarPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + pro_tx_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + provider_mode: import("../src/bincode.js").BinCodeable; + operator_public_key: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSPublicKey"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + voting_key_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "PubkeyHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + script_payout: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + inputs_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "InputsHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + payload_sig: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + ProviderUpdateRevocationPayloadType: { + (data_0: { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + reason: number | bigint; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + }): [{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + reason: number | bigint; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + }] & { + [ENUM]: "TransactionPayload"; + [VARIANT]: "ProviderUpdateRevocationPayloadType"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + pro_tx_hash: [Uint8Array]; + reason: number | bigint; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + }> & { + (data: { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + reason: number | bigint; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + }): { + version: number | bigint; + pro_tx_hash: [Uint8Array]; + reason: number | bigint; + inputs_hash: [Uint8Array]; + payload_sig: [Uint8Array]; + } & { + readonly $$type: "ProviderUpdateRevocationPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + pro_tx_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + reason: import("../src/bincode.js").BinCodeable; + inputs_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "InputsHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + payload_sig: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; + }]; + }; + CoinbasePayloadType: { + (data_0: { + version: number | bigint; + height: number | bigint; + merkle_root_masternode_list: [Uint8Array]; + merkle_root_quorums: [Uint8Array]; + best_cl_height: number | bigint | undefined; + best_cl_signature: [Uint8Array] | undefined; + asset_locked_amount: number | bigint | undefined; + }): [{ + version: number | bigint; + height: number | bigint; + merkle_root_masternode_list: [Uint8Array]; + merkle_root_quorums: [Uint8Array]; + best_cl_height: number | bigint | undefined; + best_cl_signature: [Uint8Array] | undefined; + asset_locked_amount: number | bigint | undefined; + }] & { + [ENUM]: "TransactionPayload"; + [VARIANT]: "CoinbasePayloadType"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + height: number | bigint; + merkle_root_masternode_list: [Uint8Array]; + merkle_root_quorums: [Uint8Array]; + best_cl_height: number | bigint | undefined; + best_cl_signature: [Uint8Array] | undefined; + asset_locked_amount: number | bigint | undefined; + }> & { + (data: { + version: number | bigint; + height: number | bigint; + merkle_root_masternode_list: [Uint8Array]; + merkle_root_quorums: [Uint8Array]; + best_cl_height: number | bigint | undefined; + best_cl_signature: [Uint8Array] | undefined; + asset_locked_amount: number | bigint | undefined; + }): { + version: number | bigint; + height: number | bigint; + merkle_root_masternode_list: [Uint8Array]; + merkle_root_quorums: [Uint8Array]; + best_cl_height: number | bigint | undefined; + best_cl_signature: [Uint8Array] | undefined; + asset_locked_amount: number | bigint | undefined; + } & { + readonly $$type: "CoinbasePayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + height: import("../src/bincode.js").BinCodeable; + merkle_root_masternode_list: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "MerkleRootMasternodeList"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + merkle_root_quorums: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "MerkleRootQuorums"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + best_cl_height: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + best_cl_signature: ((data: [Uint8Array] | undefined) => [Uint8Array] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [Uint8Array] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [Uint8Array] | undefined; + }; + asset_locked_amount: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + }; + }]; + }; + QuorumCommitmentPayloadType: { + (data_0: { + version: number | bigint; + height: number | bigint; + finalization_commitment: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }; + }): [{ + version: number | bigint; + height: number | bigint; + finalization_commitment: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }; + }] & { + [ENUM]: "TransactionPayload"; + [VARIANT]: "QuorumCommitmentPayloadType"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + height: number | bigint; + finalization_commitment: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }; + }> & { + (data: { + version: number | bigint; + height: number | bigint; + finalization_commitment: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }; + }): { + version: number | bigint; + height: number | bigint; + finalization_commitment: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }; + } & { + readonly $$type: "QuorumCommitmentPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + height: import("../src/bincode.js").BinCodeable; + finalization_commitment: import("../src/bincode.js").BinCodeable<{ + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }> & { + (data: { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + }): { + version: number | bigint; + llmq_type: unknown[] | []; + quorum_hash: [Uint8Array]; + quorum_index: number | bigint | undefined; + signers: boolean[]; + valid_members: boolean[]; + quorum_public_key: [Uint8Array]; + quorum_vvec_hash: [Uint8Array]; + threshold_sig: [Uint8Array]; + all_commitment_aggregated_signature: [Uint8Array]; + } & { + readonly $$type: "QuorumEntry"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + llmq_type: import("../src/bincode.js").BinCodeable & { + $$type: { + [ENUM]: "LLMQType"; + }; + variants: { + readonly LlmqtypeUnknown: []; + readonly Llmqtype50_60: []; + readonly Llmqtype400_60: []; + readonly Llmqtype400_85: []; + readonly Llmqtype100_67: []; + readonly Llmqtype60_75: []; + readonly Llmqtype25_67: []; + readonly LlmqtypeTest: never[]; + readonly LlmqtypeDevnet: never[]; + readonly LlmqtypeTestV17: never[]; + readonly LlmqtypeTestDIP0024: never[]; + readonly LlmqtypeTestInstantSend: never[]; + readonly LlmqtypeDevnetDIP0024: never[]; + readonly LlmqtypeTestnetPlatform: never[]; + readonly LlmqtypeDevnetPlatform: never[]; + }; + } & { + LlmqtypeUnknown: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeUnknown"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype50_60: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype50_60"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype400_60: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype400_60"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype400_85: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype400_85"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype100_67: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype100_67"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype60_75: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype60_75"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Llmqtype25_67: { + (): [] & { + [ENUM]: "LLMQType"; + [VARIANT]: "Llmqtype25_67"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + LlmqtypeTest: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTest"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnet: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnet"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestV17: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestV17"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestDIP0024: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestDIP0024"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestInstantSend: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestInstantSend"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnetDIP0024: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnetDIP0024"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeTestnetPlatform: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeTestnetPlatform"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + LlmqtypeDevnetPlatform: { + (...data: unknown[]): unknown[] & { + [ENUM]: "LLMQType"; + [VARIANT]: "LlmqtypeDevnetPlatform"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: never[]; + }; + }; + quorum_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BlockHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + quorum_index: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + signers: import("../src/bincode.js").BinCodeable; + valid_members: import("../src/bincode.js").BinCodeable; + quorum_public_key: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSPublicKey"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + quorum_vvec_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "QuorumVVecHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + threshold_sig: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + all_commitment_aggregated_signature: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; + }; + }; + }]; + }; + AssetLockPayloadType: { + (data_0: { + version: number; + credit_outputs: { + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]; + }): [{ + version: number; + credit_outputs: { + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]; + }] & { + [ENUM]: "TransactionPayload"; + [VARIANT]: "AssetLockPayloadType"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + version: number; + credit_outputs: { + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]; + }> & { + (data: { + version: number; + credit_outputs: { + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]; + }): { + version: number; + credit_outputs: { + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]; + } & { + readonly $$type: "AssetLockPayload"; + }; + fields: { + version: import("../src/bincode.js").BinCodeable; + credit_outputs: import("../src/bincode.js").BinCodeable<{ + value: number | bigint; + script_pubkey: [Uint8Array]; + }[]>; + }; + }]; + }; + AssetUnlockPayloadType: { + (data_0: { + base: { + version: number; + index: number | bigint; + fee: number | bigint; + }; + request_info: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }; + quorum_sig: [Uint8Array]; + }): [{ + base: { + version: number; + index: number | bigint; + fee: number | bigint; + }; + request_info: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }; + quorum_sig: [Uint8Array]; + }] & { + [ENUM]: "TransactionPayload"; + [VARIANT]: "AssetUnlockPayloadType"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: { + version: number; + index: number | bigint; + fee: number | bigint; + }; + request_info: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }; + quorum_sig: [Uint8Array]; + }> & { + (data: { + base: { + version: number; + index: number | bigint; + fee: number | bigint; + }; + request_info: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }; + quorum_sig: [Uint8Array]; + }): { + base: { + version: number; + index: number | bigint; + fee: number | bigint; + }; + request_info: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }; + quorum_sig: [Uint8Array]; + } & { + readonly $$type: "AssetUnlockPayload"; + }; + fields: { + /** + * The base information about the asset unlock. This base information is the information that + * should be put into a queue. + */ + base: import("../src/bincode.js").BinCodeable<{ + version: number; + index: number | bigint; + fee: number | bigint; + }> & { + (data: { + version: number; + index: number | bigint; + fee: number | bigint; + }): { + version: number; + index: number | bigint; + fee: number | bigint; + } & { + readonly $$type: "AssetUnlockBasePayload"; + }; + fields: { + /** The payload protocol version, is currently expected to be 0. */ + version: import("../src/bincode.js").BinCodeable; + /** The index of the unlock transaction. It gets bumped on each transaction */ + index: import("../src/bincode.js").BinCodeable; + /** The fee used in Duffs (Satoshis) */ + fee: import("../src/bincode.js").BinCodeable; + }; + }; + /** + * The request information. This should be added to the unlock transaction as it is being sent + * to be signed. + */ + request_info: import("../src/bincode.js").BinCodeable<{ + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }> & { + (data: { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + }): { + request_height: number | bigint; + quorum_hash: [Uint8Array]; + } & { + readonly $$type: "AssetUnlockRequestInfo"; + }; + fields: { + /** + * The core request height of the transaction. This should match a period where the quorum_hash + * is still active + */ + request_height: import("../src/bincode.js").BinCodeable; + /** The quorum hash. This is the block hash when the quorum was created. */ + quorum_hash: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BlockHash"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; + }; + /** The threshold signature. This should be returned by the consensus engine. */ + quorum_sig: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BLSSignature"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + }; + }]; + }; +}; +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const VotePoll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; +}]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; +} & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; +}; +export const AssetLockProof: import("../src/bincode.js").BinCodeable<[{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; +}] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; +}]> & { + $$type: { + [ENUM]: "AssetLockProof"; + }; + variants: { + readonly Instant: [import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; + }]; + readonly Chain: [import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; + }]; + }; +} & { + Instant: { + (data_0: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] & { + [ENUM]: "AssetLockProof"; + [VARIANT]: "Instant"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + Chain: { + (data_0: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }] & { + [ENUM]: "AssetLockProof"; + [VARIANT]: "Chain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; + }]; + }; +}; +export const DataContractInSerializationFormat: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; +}]> & { + $$type: { + [ENUM]: "DataContractInSerializationFormat"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; +} & { + V0: { + (data_0: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }] & { + [ENUM]: "DataContractInSerializationFormat"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; +}; +export const DataContractUpdateTransitionV0: import("../src/bincode.js").BinCodeable<{ + identity_contract_nonce: number | bigint; + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}> & { + (data: { + identity_contract_nonce: number | bigint; + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_contract_nonce: number | bigint; + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "DataContractUpdateTransitionV0"; + }; + fields: { + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + data_contract: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]> & { + $$type: { + [ENUM]: "DataContractInSerializationFormat"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }] & { + [ENUM]: "DataContractInSerializationFormat"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + }; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; +}; +export const DocumentBaseTransition: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; +}]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; +} & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; +}; +export const DocumentCreateTransitionV0: import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; +}> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + } & { + readonly $$type: "DocumentCreateTransitionV0"; + }; + fields: { + /** Document Base Transition */ + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + /** Entropy used to create a Document ID. */ + entropy: import("../src/bincode.js").BinCodeable>; + data: import("../src/bincode.js").BinCodeable>; + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance: ((data: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined) => [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }; + }; +}; +export const DocumentDeleteTransitionV0: import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; +}> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + } & { + readonly $$type: "DocumentDeleteTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + }; +}; +export const DocumentPurchaseTransitionV0: import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; +}> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + } & { + readonly $$type: "DocumentPurchaseTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + price: import("../src/bincode.js").BinCodeable; + }; +}; +export const DocumentReplaceTransitionV0: import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; +}> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + } & { + readonly $$type: "DocumentReplaceTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + data: import("../src/bincode.js").BinCodeable>; + }; +}; +export const DocumentTransferTransitionV0: import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; +}> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentTransferTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + recipient_owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; +}; +export const DocumentUpdatePriceTransitionV0: import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; +}> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + } & { + readonly $$type: "DocumentUpdatePriceTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + price: import("../src/bincode.js").BinCodeable; + }; +}; +/** + * platform_serialize unversioned + * platform_version_path "dpp.state_transition_serialization_versions.identity_credit_withdrawal_state_transition" + */ +export const IdentityCreditWithdrawalTransition: import("../src/bincode.js").BinCodeable<[{ + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]]; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}] | [{ + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]] | undefined; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}]> & { + $$type: { + [ENUM]: "IdentityCreditWithdrawalTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]]; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]]; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]]; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityCreditWithdrawalTransitionV0"; + }; + fields: { + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + amount: import("../src/bincode.js").BinCodeable; + core_fee_per_byte: import("../src/bincode.js").BinCodeable; + pooling: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "Pooling"; + }; + variants: { + /** default */ + readonly Never: []; + readonly IfAvailable: []; + readonly Standard: []; + }; + } & { + Never: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "Never"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + IfAvailable: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "IfAvailable"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Standard: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "Standard"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + output_script: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "CoreScript"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + nonce: import("../src/bincode.js").BinCodeable; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + readonly V1: [import("../src/bincode.js").BinCodeable<{ + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]] | undefined; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]] | undefined; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]] | undefined; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityCreditWithdrawalTransitionV1"; + }; + fields: { + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + amount: import("../src/bincode.js").BinCodeable; + core_fee_per_byte: import("../src/bincode.js").BinCodeable; + pooling: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "Pooling"; + }; + variants: { + /** default */ + readonly Never: []; + readonly IfAvailable: []; + readonly Standard: []; + }; + } & { + Never: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "Never"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + IfAvailable: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "IfAvailable"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Standard: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "Standard"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + /** If the send to output script is None, then we send the withdrawal to the address set by core */ + output_script: ((data: [[Uint8Array]] | undefined) => [[Uint8Array]] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [[Uint8Array]] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [[Uint8Array]] | undefined; + }; + nonce: import("../src/bincode.js").BinCodeable; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +} & { + V0: { + (data_0: { + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]]; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): [{ + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]]; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }] & { + [ENUM]: "IdentityCreditWithdrawalTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]]; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]]; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]]; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityCreditWithdrawalTransitionV0"; + }; + fields: { + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + amount: import("../src/bincode.js").BinCodeable; + core_fee_per_byte: import("../src/bincode.js").BinCodeable; + pooling: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "Pooling"; + }; + variants: { + /** default */ + readonly Never: []; + readonly IfAvailable: []; + readonly Standard: []; + }; + } & { + Never: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "Never"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + IfAvailable: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "IfAvailable"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Standard: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "Standard"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + output_script: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "CoreScript"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "ScriptBuf"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + nonce: import("../src/bincode.js").BinCodeable; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; + V1: { + (data_0: { + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]] | undefined; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): [{ + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]] | undefined; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }] & { + [ENUM]: "IdentityCreditWithdrawalTransition"; + [VARIANT]: "V1"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]] | undefined; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]] | undefined; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_id: [[Uint8Array]]; + amount: number | bigint; + core_fee_per_byte: number | bigint; + pooling: []; + output_script: [[Uint8Array]] | undefined; + nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityCreditWithdrawalTransitionV1"; + }; + fields: { + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + amount: import("../src/bincode.js").BinCodeable; + core_fee_per_byte: import("../src/bincode.js").BinCodeable; + pooling: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "Pooling"; + }; + variants: { + /** default */ + readonly Never: []; + readonly IfAvailable: []; + readonly Standard: []; + }; + } & { + Never: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "Never"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + IfAvailable: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "IfAvailable"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Standard: { + (): [] & { + [ENUM]: "Pooling"; + [VARIANT]: "Standard"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + /** If the send to output script is None, then we send the withdrawal to the address set by core */ + output_script: ((data: [[Uint8Array]] | undefined) => [[Uint8Array]] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [[Uint8Array]] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [[Uint8Array]] | undefined; + }; + nonce: import("../src/bincode.js").BinCodeable; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +}; +/** platform_serialize limit = 2000 , unversioned */ +export const IdentityPublicKey: import("../src/bincode.js").BinCodeable<[{ + id: number | bigint; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + key_type: []; + read_only: boolean; + data: [Uint8Array]; + disabled_at: number | bigint | undefined; +}]> & { + $$type: { + [ENUM]: "IdentityPublicKey"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: number | bigint; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + key_type: []; + read_only: boolean; + data: [Uint8Array]; + disabled_at: number | bigint | undefined; + }> & { + (data: { + id: number | bigint; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + key_type: []; + read_only: boolean; + data: [Uint8Array]; + disabled_at: number | bigint | undefined; + }): { + id: number | bigint; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + key_type: []; + read_only: boolean; + data: [Uint8Array]; + disabled_at: number | bigint | undefined; + } & { + readonly $$type: "IdentityPublicKeyV0"; + }; + fields: { + id: import("../src/bincode.js").BinCodeable; + purpose: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "Purpose"; + }; + variants: { + /** + * at least one authentication key must be registered for all security levels + * default + */ + readonly AUTHENTICATION: []; + /** this key cannot be used for signing documents */ + readonly ENCRYPTION: []; + /** this key cannot be used for signing documents */ + readonly DECRYPTION: []; + /** this key is used to sign credit transfer and withdrawal state transitions */ + readonly TRANSFER: []; + /** this key cannot be used for signing documents */ + readonly SYSTEM: []; + /** this key cannot be used for signing documents */ + readonly VOTING: []; + /** this key is used to prove ownership of a masternode or evonode */ + readonly OWNER: []; + }; + } & { + AUTHENTICATION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "AUTHENTICATION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ENCRYPTION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "ENCRYPTION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + DECRYPTION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "DECRYPTION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + TRANSFER: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "TRANSFER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + SYSTEM: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "SYSTEM"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + VOTING: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "VOTING"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + OWNER: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "OWNER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + security_level: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "SecurityLevel"; + }; + variants: { + readonly MASTER: []; + readonly CRITICAL: []; + /** default */ + readonly HIGH: []; + readonly MEDIUM: []; + }; + } & { + MASTER: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "MASTER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + CRITICAL: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "CRITICAL"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + HIGH: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "HIGH"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + MEDIUM: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "MEDIUM"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + contract_bounds: ((data: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined) => ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + }; + key_type: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "KeyType"; + }; + variants: { + /** default */ + readonly ECDSA_SECP256K1: []; + readonly BLS12_381: []; + readonly ECDSA_HASH160: []; + readonly BIP13_SCRIPT_HASH: []; + readonly EDDSA_25519_HASH160: []; + }; + } & { + ECDSA_SECP256K1: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "ECDSA_SECP256K1"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + BLS12_381: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "BLS12_381"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ECDSA_HASH160: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "ECDSA_HASH160"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + BIP13_SCRIPT_HASH: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "BIP13_SCRIPT_HASH"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + EDDSA_25519_HASH160: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "EDDSA_25519_HASH160"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + read_only: import("../src/bincode.js").BinCodeable; + data: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + disabled_at: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + }; + }]; + }; +} & { + V0: { + (data_0: { + id: number | bigint; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + key_type: []; + read_only: boolean; + data: [Uint8Array]; + disabled_at: number | bigint | undefined; + }): [{ + id: number | bigint; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + key_type: []; + read_only: boolean; + data: [Uint8Array]; + disabled_at: number | bigint | undefined; + }] & { + [ENUM]: "IdentityPublicKey"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: number | bigint; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + key_type: []; + read_only: boolean; + data: [Uint8Array]; + disabled_at: number | bigint | undefined; + }> & { + (data: { + id: number | bigint; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + key_type: []; + read_only: boolean; + data: [Uint8Array]; + disabled_at: number | bigint | undefined; + }): { + id: number | bigint; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + key_type: []; + read_only: boolean; + data: [Uint8Array]; + disabled_at: number | bigint | undefined; + } & { + readonly $$type: "IdentityPublicKeyV0"; + }; + fields: { + id: import("../src/bincode.js").BinCodeable; + purpose: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "Purpose"; + }; + variants: { + /** + * at least one authentication key must be registered for all security levels + * default + */ + readonly AUTHENTICATION: []; + /** this key cannot be used for signing documents */ + readonly ENCRYPTION: []; + /** this key cannot be used for signing documents */ + readonly DECRYPTION: []; + /** this key is used to sign credit transfer and withdrawal state transitions */ + readonly TRANSFER: []; + /** this key cannot be used for signing documents */ + readonly SYSTEM: []; + /** this key cannot be used for signing documents */ + readonly VOTING: []; + /** this key is used to prove ownership of a masternode or evonode */ + readonly OWNER: []; + }; + } & { + AUTHENTICATION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "AUTHENTICATION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ENCRYPTION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "ENCRYPTION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + DECRYPTION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "DECRYPTION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + TRANSFER: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "TRANSFER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + SYSTEM: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "SYSTEM"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + VOTING: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "VOTING"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + OWNER: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "OWNER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + security_level: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "SecurityLevel"; + }; + variants: { + readonly MASTER: []; + readonly CRITICAL: []; + /** default */ + readonly HIGH: []; + readonly MEDIUM: []; + }; + } & { + MASTER: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "MASTER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + CRITICAL: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "CRITICAL"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + HIGH: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "HIGH"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + MEDIUM: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "MEDIUM"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + contract_bounds: ((data: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined) => ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + }; + key_type: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "KeyType"; + }; + variants: { + /** default */ + readonly ECDSA_SECP256K1: []; + readonly BLS12_381: []; + readonly ECDSA_HASH160: []; + readonly BIP13_SCRIPT_HASH: []; + readonly EDDSA_25519_HASH160: []; + }; + } & { + ECDSA_SECP256K1: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "ECDSA_SECP256K1"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + BLS12_381: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "BLS12_381"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ECDSA_HASH160: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "ECDSA_HASH160"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + BIP13_SCRIPT_HASH: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "BIP13_SCRIPT_HASH"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + EDDSA_25519_HASH160: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "EDDSA_25519_HASH160"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + read_only: import("../src/bincode.js").BinCodeable; + data: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + disabled_at: ((data: number | bigint | undefined) => number | bigint | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: number | bigint | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): number | bigint | undefined; + }; + }; + }]; + }; +}; +export const IdentityPublicKeyInCreation: import("../src/bincode.js").BinCodeable<[{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; +}]> & { + $$type: { + [ENUM]: "IdentityPublicKeyInCreation"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }> & { + (data: { + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }): { + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityPublicKeyInCreationV0"; + }; + fields: { + id: import("../src/bincode.js").BinCodeable; + key_type: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "KeyType"; + }; + variants: { + /** default */ + readonly ECDSA_SECP256K1: []; + readonly BLS12_381: []; + readonly ECDSA_HASH160: []; + readonly BIP13_SCRIPT_HASH: []; + readonly EDDSA_25519_HASH160: []; + }; + } & { + ECDSA_SECP256K1: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "ECDSA_SECP256K1"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + BLS12_381: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "BLS12_381"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ECDSA_HASH160: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "ECDSA_HASH160"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + BIP13_SCRIPT_HASH: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "BIP13_SCRIPT_HASH"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + EDDSA_25519_HASH160: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "EDDSA_25519_HASH160"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + purpose: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "Purpose"; + }; + variants: { + /** + * at least one authentication key must be registered for all security levels + * default + */ + readonly AUTHENTICATION: []; + /** this key cannot be used for signing documents */ + readonly ENCRYPTION: []; + /** this key cannot be used for signing documents */ + readonly DECRYPTION: []; + /** this key is used to sign credit transfer and withdrawal state transitions */ + readonly TRANSFER: []; + /** this key cannot be used for signing documents */ + readonly SYSTEM: []; + /** this key cannot be used for signing documents */ + readonly VOTING: []; + /** this key is used to prove ownership of a masternode or evonode */ + readonly OWNER: []; + }; + } & { + AUTHENTICATION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "AUTHENTICATION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ENCRYPTION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "ENCRYPTION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + DECRYPTION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "DECRYPTION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + TRANSFER: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "TRANSFER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + SYSTEM: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "SYSTEM"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + VOTING: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "VOTING"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + OWNER: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "OWNER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + security_level: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "SecurityLevel"; + }; + variants: { + readonly MASTER: []; + readonly CRITICAL: []; + /** default */ + readonly HIGH: []; + readonly MEDIUM: []; + }; + } & { + MASTER: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "MASTER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + CRITICAL: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "CRITICAL"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + HIGH: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "HIGH"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + MEDIUM: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "MEDIUM"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + contract_bounds: ((data: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined) => ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + }; + read_only: import("../src/bincode.js").BinCodeable; + data: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The signature is needed for ECDSA_SECP256K1 Key type and BLS12_381 Key type */ + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +} & { + V0: { + (data_0: { + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }): [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }] & { + [ENUM]: "IdentityPublicKeyInCreation"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }> & { + (data: { + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }): { + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityPublicKeyInCreationV0"; + }; + fields: { + id: import("../src/bincode.js").BinCodeable; + key_type: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "KeyType"; + }; + variants: { + /** default */ + readonly ECDSA_SECP256K1: []; + readonly BLS12_381: []; + readonly ECDSA_HASH160: []; + readonly BIP13_SCRIPT_HASH: []; + readonly EDDSA_25519_HASH160: []; + }; + } & { + ECDSA_SECP256K1: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "ECDSA_SECP256K1"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + BLS12_381: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "BLS12_381"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ECDSA_HASH160: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "ECDSA_HASH160"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + BIP13_SCRIPT_HASH: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "BIP13_SCRIPT_HASH"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + EDDSA_25519_HASH160: { + (): [] & { + [ENUM]: "KeyType"; + [VARIANT]: "EDDSA_25519_HASH160"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + purpose: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "Purpose"; + }; + variants: { + /** + * at least one authentication key must be registered for all security levels + * default + */ + readonly AUTHENTICATION: []; + /** this key cannot be used for signing documents */ + readonly ENCRYPTION: []; + /** this key cannot be used for signing documents */ + readonly DECRYPTION: []; + /** this key is used to sign credit transfer and withdrawal state transitions */ + readonly TRANSFER: []; + /** this key cannot be used for signing documents */ + readonly SYSTEM: []; + /** this key cannot be used for signing documents */ + readonly VOTING: []; + /** this key is used to prove ownership of a masternode or evonode */ + readonly OWNER: []; + }; + } & { + AUTHENTICATION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "AUTHENTICATION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + ENCRYPTION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "ENCRYPTION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + DECRYPTION: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "DECRYPTION"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + TRANSFER: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "TRANSFER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + SYSTEM: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "SYSTEM"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + VOTING: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "VOTING"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + OWNER: { + (): [] & { + [ENUM]: "Purpose"; + [VARIANT]: "OWNER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + security_level: import("../src/bincode.js").BinCodeable<[]> & { + $$type: { + [ENUM]: "SecurityLevel"; + }; + variants: { + readonly MASTER: []; + readonly CRITICAL: []; + /** default */ + readonly HIGH: []; + readonly MEDIUM: []; + }; + } & { + MASTER: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "MASTER"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + CRITICAL: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "CRITICAL"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + HIGH: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "HIGH"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + MEDIUM: { + (): [] & { + [ENUM]: "SecurityLevel"; + [VARIANT]: "MEDIUM"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + contract_bounds: ((data: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined) => ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + }; + read_only: import("../src/bincode.js").BinCodeable; + data: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The signature is needed for ECDSA_SECP256K1 Key type and BLS12_381 Key type */ + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +}; +export const IdentityTopUpTransitionV0: import("../src/bincode.js").BinCodeable<{ + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + identity_id: [[Uint8Array]]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; +}> & { + (data: { + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + identity_id: [[Uint8Array]]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + }): { + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + identity_id: [[Uint8Array]]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityTopUpTransitionV0"; + }; + fields: { + asset_lock_proof: import("../src/bincode.js").BinCodeable<[{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]> & { + $$type: { + [ENUM]: "AssetLockProof"; + }; + variants: { + readonly Instant: [import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; + }]; + readonly Chain: [import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; + }]; + }; + } & { + Instant: { + (data_0: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] & { + [ENUM]: "AssetLockProof"; + [VARIANT]: "Instant"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + Chain: { + (data_0: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }] & { + [ENUM]: "AssetLockProof"; + [VARIANT]: "Chain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; + }]; + }; + }; + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; +}; +export const IdentityUpdateTransitionV0: import("../src/bincode.js").BinCodeable<{ + identity_id: [[Uint8Array]]; + revision: number | bigint; + nonce: number | bigint; + add_public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + disable_public_keys: (number | bigint)[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}> & { + (data: { + identity_id: [[Uint8Array]]; + revision: number | bigint; + nonce: number | bigint; + add_public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + disable_public_keys: (number | bigint)[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_id: [[Uint8Array]]; + revision: number | bigint; + nonce: number | bigint; + add_public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + disable_public_keys: (number | bigint)[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityUpdateTransitionV0"; + }; + fields: { + /** Unique identifier of the identity to be updated */ + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** The revision of the identity after update */ + revision: import("../src/bincode.js").BinCodeable; + /** Identity nonce for this transition to prevent replay attacks */ + nonce: import("../src/bincode.js").BinCodeable; + /** + * Public Keys to add to the Identity + * we want to skip serialization of transitions, as we does it manually in `to_object()` and `to_json()` + */ + add_public_keys: import("../src/bincode.js").BinCodeable<[{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]>; + /** Identity Public Keys ID's to disable for the Identity */ + disable_public_keys: import("../src/bincode.js").BinCodeable<(number | bigint)[]>; + /** The fee multiplier */ + user_fee_increase: import("../src/bincode.js").BinCodeable; + /** The ID of the public key used to sing the State Transition */ + signature_public_key_id: import("../src/bincode.js").BinCodeable; + /** Cryptographic signature of the State Transition */ + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; +}; +/** platform_serialize unversioned */ +export const ResourceVoteV0: import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; +}> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; +}; +/** DataContractCreateTransitionV0 has the same encoding structure */ +export const DataContractCreateTransitionV0: import("../src/bincode.js").BinCodeable<{ + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + identity_nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}> & { + (data: { + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + identity_nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + identity_nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "DataContractCreateTransitionV0"; + }; + fields: { + data_contract: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]> & { + $$type: { + [ENUM]: "DataContractInSerializationFormat"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }] & { + [ENUM]: "DataContractInSerializationFormat"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + }; + identity_nonce: import("../src/bincode.js").BinCodeable; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; +}; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_update_state_transition" + */ +export const DataContractUpdateTransition: import("../src/bincode.js").BinCodeable<[{ + identity_contract_nonce: number | bigint; + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}]> & { + $$type: { + [ENUM]: "DataContractUpdateTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + identity_contract_nonce: number | bigint; + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + identity_contract_nonce: number | bigint; + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_contract_nonce: number | bigint; + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "DataContractUpdateTransitionV0"; + }; + fields: { + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + data_contract: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]> & { + $$type: { + [ENUM]: "DataContractInSerializationFormat"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }] & { + [ENUM]: "DataContractInSerializationFormat"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + }; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +} & { + V0: { + (data_0: { + identity_contract_nonce: number | bigint; + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): [{ + identity_contract_nonce: number | bigint; + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }] & { + [ENUM]: "DataContractUpdateTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + identity_contract_nonce: number | bigint; + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + identity_contract_nonce: number | bigint; + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_contract_nonce: number | bigint; + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "DataContractUpdateTransitionV0"; + }; + fields: { + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + data_contract: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]> & { + $$type: { + [ENUM]: "DataContractInSerializationFormat"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }] & { + [ENUM]: "DataContractInSerializationFormat"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + }; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +}; +export const DocumentCreateTransition: import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; +}]> & { + $$type: { + [ENUM]: "DocumentCreateTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + } & { + readonly $$type: "DocumentCreateTransitionV0"; + }; + fields: { + /** Document Base Transition */ + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + /** Entropy used to create a Document ID. */ + entropy: import("../src/bincode.js").BinCodeable>; + data: import("../src/bincode.js").BinCodeable>; + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance: ((data: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined) => [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }; + }; + }]; + }; +} & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }] & { + [ENUM]: "DocumentCreateTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + } & { + readonly $$type: "DocumentCreateTransitionV0"; + }; + fields: { + /** Document Base Transition */ + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + /** Entropy used to create a Document ID. */ + entropy: import("../src/bincode.js").BinCodeable>; + data: import("../src/bincode.js").BinCodeable>; + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance: ((data: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined) => [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }; + }; + }]; + }; +}; +export const DocumentDeleteTransition: import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; +}]> & { + $$type: { + [ENUM]: "DocumentDeleteTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + } & { + readonly $$type: "DocumentDeleteTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + }; + }]; + }; +} & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }] & { + [ENUM]: "DocumentDeleteTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + } & { + readonly $$type: "DocumentDeleteTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + }; + }]; + }; +}; +export const DocumentPurchaseTransition: import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; +}]> & { + $$type: { + [ENUM]: "DocumentPurchaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + } & { + readonly $$type: "DocumentPurchaseTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + price: import("../src/bincode.js").BinCodeable; + }; + }]; + }; +} & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }] & { + [ENUM]: "DocumentPurchaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + } & { + readonly $$type: "DocumentPurchaseTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + price: import("../src/bincode.js").BinCodeable; + }; + }]; + }; +}; +export const DocumentReplaceTransition: import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; +}]> & { + $$type: { + [ENUM]: "DocumentReplaceTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + } & { + readonly $$type: "DocumentReplaceTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + data: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; +} & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }] & { + [ENUM]: "DocumentReplaceTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + } & { + readonly $$type: "DocumentReplaceTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + data: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; +}; +export const DocumentTransferTransition: import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; +}]> & { + $$type: { + [ENUM]: "DocumentTransferTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentTransferTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + recipient_owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; +} & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentTransferTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentTransferTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + recipient_owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; +}; +export const DocumentUpdatePriceTransition: import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; +}]> & { + $$type: { + [ENUM]: "DocumentUpdatePriceTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + } & { + readonly $$type: "DocumentUpdatePriceTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + price: import("../src/bincode.js").BinCodeable; + }; + }]; + }; +} & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }] & { + [ENUM]: "DocumentUpdatePriceTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + } & { + readonly $$type: "DocumentUpdatePriceTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + price: import("../src/bincode.js").BinCodeable; + }; + }]; + }; +}; +export const IdentityCreateTransitionV0: import("../src/bincode.js").BinCodeable<{ + public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + identity_id: [[Uint8Array]] | undefined; +}> & { + (data: { + public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + identity_id: [[Uint8Array]] | undefined; + }): { + public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + identity_id: [[Uint8Array]] | undefined; + } & { + readonly $$type: "IdentityCreateTransitionV0"; + }; + fields: { + public_keys: import("../src/bincode.js").BinCodeable<[{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]>; + asset_lock_proof: import("../src/bincode.js").BinCodeable<[{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]> & { + $$type: { + [ENUM]: "AssetLockProof"; + }; + variants: { + readonly Instant: [import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; + }]; + readonly Chain: [import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; + }]; + }; + } & { + Instant: { + (data_0: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] & { + [ENUM]: "AssetLockProof"; + [VARIANT]: "Instant"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + Chain: { + (data_0: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }] & { + [ENUM]: "AssetLockProof"; + [VARIANT]: "Chain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; + }]; + }; + }; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]] | undefined>; + }; +}; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_top_up_state_transition" + */ +export const IdentityTopUpTransition: import("../src/bincode.js").BinCodeable<[{ + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + identity_id: [[Uint8Array]]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; +}]> & { + $$type: { + [ENUM]: "IdentityTopUpTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + identity_id: [[Uint8Array]]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + }> & { + (data: { + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + identity_id: [[Uint8Array]]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + }): { + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + identity_id: [[Uint8Array]]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityTopUpTransitionV0"; + }; + fields: { + asset_lock_proof: import("../src/bincode.js").BinCodeable<[{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]> & { + $$type: { + [ENUM]: "AssetLockProof"; + }; + variants: { + readonly Instant: [import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; + }]; + readonly Chain: [import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; + }]; + }; + } & { + Instant: { + (data_0: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] & { + [ENUM]: "AssetLockProof"; + [VARIANT]: "Instant"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + Chain: { + (data_0: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }] & { + [ENUM]: "AssetLockProof"; + [VARIANT]: "Chain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; + }]; + }; + }; + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +} & { + V0: { + (data_0: { + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + identity_id: [[Uint8Array]]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + }): [{ + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + identity_id: [[Uint8Array]]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + }] & { + [ENUM]: "IdentityTopUpTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + identity_id: [[Uint8Array]]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + }> & { + (data: { + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + identity_id: [[Uint8Array]]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + }): { + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + identity_id: [[Uint8Array]]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityTopUpTransitionV0"; + }; + fields: { + asset_lock_proof: import("../src/bincode.js").BinCodeable<[{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]> & { + $$type: { + [ENUM]: "AssetLockProof"; + }; + variants: { + readonly Instant: [import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; + }]; + readonly Chain: [import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; + }]; + }; + } & { + Instant: { + (data_0: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] & { + [ENUM]: "AssetLockProof"; + [VARIANT]: "Instant"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + Chain: { + (data_0: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }] & { + [ENUM]: "AssetLockProof"; + [VARIANT]: "Chain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; + }]; + }; + }; + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +}; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_update_state_transition" + */ +export const IdentityUpdateTransition: import("../src/bincode.js").BinCodeable<[{ + identity_id: [[Uint8Array]]; + revision: number | bigint; + nonce: number | bigint; + add_public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + disable_public_keys: (number | bigint)[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}]> & { + $$type: { + [ENUM]: "IdentityUpdateTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + identity_id: [[Uint8Array]]; + revision: number | bigint; + nonce: number | bigint; + add_public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + disable_public_keys: (number | bigint)[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + identity_id: [[Uint8Array]]; + revision: number | bigint; + nonce: number | bigint; + add_public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + disable_public_keys: (number | bigint)[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_id: [[Uint8Array]]; + revision: number | bigint; + nonce: number | bigint; + add_public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + disable_public_keys: (number | bigint)[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityUpdateTransitionV0"; + }; + fields: { + /** Unique identifier of the identity to be updated */ + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** The revision of the identity after update */ + revision: import("../src/bincode.js").BinCodeable; + /** Identity nonce for this transition to prevent replay attacks */ + nonce: import("../src/bincode.js").BinCodeable; + /** + * Public Keys to add to the Identity + * we want to skip serialization of transitions, as we does it manually in `to_object()` and `to_json()` + */ + add_public_keys: import("../src/bincode.js").BinCodeable<[{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]>; + /** Identity Public Keys ID's to disable for the Identity */ + disable_public_keys: import("../src/bincode.js").BinCodeable<(number | bigint)[]>; + /** The fee multiplier */ + user_fee_increase: import("../src/bincode.js").BinCodeable; + /** The ID of the public key used to sing the State Transition */ + signature_public_key_id: import("../src/bincode.js").BinCodeable; + /** Cryptographic signature of the State Transition */ + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +} & { + V0: { + (data_0: { + identity_id: [[Uint8Array]]; + revision: number | bigint; + nonce: number | bigint; + add_public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + disable_public_keys: (number | bigint)[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): [{ + identity_id: [[Uint8Array]]; + revision: number | bigint; + nonce: number | bigint; + add_public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + disable_public_keys: (number | bigint)[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }] & { + [ENUM]: "IdentityUpdateTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + identity_id: [[Uint8Array]]; + revision: number | bigint; + nonce: number | bigint; + add_public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + disable_public_keys: (number | bigint)[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + identity_id: [[Uint8Array]]; + revision: number | bigint; + nonce: number | bigint; + add_public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + disable_public_keys: (number | bigint)[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + identity_id: [[Uint8Array]]; + revision: number | bigint; + nonce: number | bigint; + add_public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + disable_public_keys: (number | bigint)[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "IdentityUpdateTransitionV0"; + }; + fields: { + /** Unique identifier of the identity to be updated */ + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** The revision of the identity after update */ + revision: import("../src/bincode.js").BinCodeable; + /** Identity nonce for this transition to prevent replay attacks */ + nonce: import("../src/bincode.js").BinCodeable; + /** + * Public Keys to add to the Identity + * we want to skip serialization of transitions, as we does it manually in `to_object()` and `to_json()` + */ + add_public_keys: import("../src/bincode.js").BinCodeable<[{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]>; + /** Identity Public Keys ID's to disable for the Identity */ + disable_public_keys: import("../src/bincode.js").BinCodeable<(number | bigint)[]>; + /** The fee multiplier */ + user_fee_increase: import("../src/bincode.js").BinCodeable; + /** The ID of the public key used to sing the State Transition */ + signature_public_key_id: import("../src/bincode.js").BinCodeable; + /** Cryptographic signature of the State Transition */ + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +}; +/** platform_serialize limit = 15000 , unversioned */ +export const ResourceVote: import("../src/bincode.js").BinCodeable<[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; +}]> & { + $$type: { + [ENUM]: "ResourceVote"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; +} & { + V0: { + (data_0: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): [{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }] & { + [ENUM]: "ResourceVote"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; +}; +/** platform_serialize limit = 15000 , unversioned */ +export const Vote: import("../src/bincode.js").BinCodeable<[[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; +}]]> & { + $$type: { + [ENUM]: "Vote"; + }; + variants: { + readonly ResourceVote: [import("../src/bincode.js").BinCodeable<[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]> & { + $$type: { + [ENUM]: "ResourceVote"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): [{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }] & { + [ENUM]: "ResourceVote"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + }]; + }; +} & { + ResourceVote: { + (data_0: [{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]): [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]] & { + [ENUM]: "Vote"; + [VARIANT]: "ResourceVote"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]> & { + $$type: { + [ENUM]: "ResourceVote"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): [{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }] & { + [ENUM]: "ResourceVote"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + }]; + }; +}; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_create_state_transition" + */ +export const DataContractCreateTransition: import("../src/bincode.js").BinCodeable<[{ + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + identity_nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}]> & { + $$type: { + [ENUM]: "DataContractCreateTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + identity_nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + identity_nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + identity_nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "DataContractCreateTransitionV0"; + }; + fields: { + data_contract: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]> & { + $$type: { + [ENUM]: "DataContractInSerializationFormat"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }] & { + [ENUM]: "DataContractInSerializationFormat"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + }; + identity_nonce: import("../src/bincode.js").BinCodeable; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +} & { + V0: { + (data_0: { + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + identity_nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): [{ + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + identity_nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }] & { + [ENUM]: "DataContractCreateTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + identity_nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + identity_nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + data_contract: [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]; + identity_nonce: number | bigint; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "DataContractCreateTransitionV0"; + }; + fields: { + data_contract: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }]> & { + $$type: { + [ENUM]: "DataContractInSerializationFormat"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): [{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }] & { + [ENUM]: "DataContractInSerializationFormat"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }> & { + (data: { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + }): { + id: [[Uint8Array]]; + config: [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]; + version: number | bigint; + owner_id: [[Uint8Array]]; + schema_defs: Map | undefined; + document_schemas: Map; + } & { + readonly $$type: "DataContractInSerializationFormatV0"; + }; + fields: { + /** A unique identifier for the data contract. */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Internal configuration for the contract. */ + config: import("../src/bincode.js").BinCodeable<[{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }]> & { + $$type: { + [ENUM]: "DataContractConfig"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): [{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }] & { + [ENUM]: "DataContractConfig"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }> & { + (data: { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + }): { + can_be_deleted: boolean; + readonly: boolean; + keeps_history: boolean; + documents_keep_history_contract_default: boolean; + documents_mutable_contract_default: boolean; + documents_can_be_deleted_contract_default: boolean; + requires_identity_encryption_bounded_key: [] | undefined; + requires_identity_decryption_bounded_key: [] | undefined; + } & { + readonly $$type: "DataContractConfigV0"; + }; + fields: { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: import("../src/bincode.js").BinCodeable; + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: import("../src/bincode.js").BinCodeable; + /** Does the contract keep history when the contract itself changes */ + keeps_history: import("../src/bincode.js").BinCodeable; + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: import("../src/bincode.js").BinCodeable; + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: import("../src/bincode.js").BinCodeable; + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: ((data: [] | undefined) => [] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [] | undefined; + }; + }; + }]; + }; + }; + /** The version of this data contract. */ + version: import("../src/bincode.js").BinCodeable; + /** The identifier of the contract owner. */ + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: ((data: Map | undefined) => Map | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: Map | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): Map | undefined; + }; + /** Document JSON Schemas per type */ + document_schemas: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + }; + identity_nonce: import("../src/bincode.js").BinCodeable; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +}; +export const DocumentTransition: import("../src/bincode.js").BinCodeable<[[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; +}]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; +}]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; +}]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; +}]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; +}]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; +}]]> & { + $$type: { + [ENUM]: "DocumentTransition"; + }; + variants: { + readonly Create: [import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]> & { + $$type: { + [ENUM]: "DocumentCreateTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + } & { + readonly $$type: "DocumentCreateTransitionV0"; + }; + fields: { + /** Document Base Transition */ + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + /** Entropy used to create a Document ID. */ + entropy: import("../src/bincode.js").BinCodeable>; + data: import("../src/bincode.js").BinCodeable>; + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance: ((data: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined) => [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }] & { + [ENUM]: "DocumentCreateTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + } & { + readonly $$type: "DocumentCreateTransitionV0"; + }; + fields: { + /** Document Base Transition */ + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + /** Entropy used to create a Document ID. */ + entropy: import("../src/bincode.js").BinCodeable>; + data: import("../src/bincode.js").BinCodeable>; + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance: ((data: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined) => [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }; + }; + }]; + }; + }]; + readonly Replace: [import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]> & { + $$type: { + [ENUM]: "DocumentReplaceTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + } & { + readonly $$type: "DocumentReplaceTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + data: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + } & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }] & { + [ENUM]: "DocumentReplaceTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + } & { + readonly $$type: "DocumentReplaceTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + data: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + }]; + readonly Delete: [import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]> & { + $$type: { + [ENUM]: "DocumentDeleteTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + } & { + readonly $$type: "DocumentDeleteTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }] & { + [ENUM]: "DocumentDeleteTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + } & { + readonly $$type: "DocumentDeleteTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + }; + }]; + }; + }]; + readonly Transfer: [import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentTransferTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentTransferTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + recipient_owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentTransferTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentTransferTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + recipient_owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }]; + readonly UpdatePrice: [import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]> & { + $$type: { + [ENUM]: "DocumentUpdatePriceTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + } & { + readonly $$type: "DocumentUpdatePriceTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + price: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }] & { + [ENUM]: "DocumentUpdatePriceTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + } & { + readonly $$type: "DocumentUpdatePriceTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + price: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }]; + readonly Purchase: [import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]> & { + $$type: { + [ENUM]: "DocumentPurchaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + } & { + readonly $$type: "DocumentPurchaseTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + price: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }] & { + [ENUM]: "DocumentPurchaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + } & { + readonly $$type: "DocumentPurchaseTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + price: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }]; + }; +} & { + Create: { + (data_0: [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]): [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] & { + [ENUM]: "DocumentTransition"; + [VARIANT]: "Create"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]> & { + $$type: { + [ENUM]: "DocumentCreateTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + } & { + readonly $$type: "DocumentCreateTransitionV0"; + }; + fields: { + /** Document Base Transition */ + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + /** Entropy used to create a Document ID. */ + entropy: import("../src/bincode.js").BinCodeable>; + data: import("../src/bincode.js").BinCodeable>; + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance: ((data: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined) => [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }] & { + [ENUM]: "DocumentCreateTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + } & { + readonly $$type: "DocumentCreateTransitionV0"; + }; + fields: { + /** Document Base Transition */ + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + /** Entropy used to create a Document ID. */ + entropy: import("../src/bincode.js").BinCodeable>; + data: import("../src/bincode.js").BinCodeable>; + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance: ((data: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined) => [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined) & { + isValid(data: unknown): boolean; + encode(bc: import("../src/bincode.js").BinCode, data: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | null | undefined): void; + decode(bc: import("../src/bincode.js").BinCode): [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }; + }; + }]; + }; + }]; + }; + Replace: { + (data_0: [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]): [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] & { + [ENUM]: "DocumentTransition"; + [VARIANT]: "Replace"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]> & { + $$type: { + [ENUM]: "DocumentReplaceTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + } & { + readonly $$type: "DocumentReplaceTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + data: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + } & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }] & { + [ENUM]: "DocumentReplaceTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + } & { + readonly $$type: "DocumentReplaceTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + data: import("../src/bincode.js").BinCodeable>; + }; + }]; + }; + }]; + }; + Delete: { + (data_0: [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]): [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] & { + [ENUM]: "DocumentTransition"; + [VARIANT]: "Delete"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]> & { + $$type: { + [ENUM]: "DocumentDeleteTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + } & { + readonly $$type: "DocumentDeleteTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }] & { + [ENUM]: "DocumentDeleteTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + } & { + readonly $$type: "DocumentDeleteTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + }; + }]; + }; + }]; + }; + Transfer: { + (data_0: [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]): [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] & { + [ENUM]: "DocumentTransition"; + [VARIANT]: "Transfer"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentTransferTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentTransferTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + recipient_owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentTransferTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentTransferTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + recipient_owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }]; + }; + UpdatePrice: { + (data_0: [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]): [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] & { + [ENUM]: "DocumentTransition"; + [VARIANT]: "UpdatePrice"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]> & { + $$type: { + [ENUM]: "DocumentUpdatePriceTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + } & { + readonly $$type: "DocumentUpdatePriceTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + price: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }] & { + [ENUM]: "DocumentUpdatePriceTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + } & { + readonly $$type: "DocumentUpdatePriceTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + price: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }]; + }; + Purchase: { + (data_0: [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]): [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] & { + [ENUM]: "DocumentTransition"; + [VARIANT]: "Purchase"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]> & { + $$type: { + [ENUM]: "DocumentPurchaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + } & { + readonly $$type: "DocumentPurchaseTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + price: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + V0: { + (data_0: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): [{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }] & { + [ENUM]: "DocumentPurchaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }> & { + (data: { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }): { + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + } & { + readonly $$type: "DocumentPurchaseTransitionV0"; + }; + fields: { + base: import("../src/bincode.js").BinCodeable<[{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]> & { + $$type: { + [ENUM]: "DocumentBaseTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }] & { + [ENUM]: "DocumentBaseTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }> & { + (data: { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }): { + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + } & { + readonly $$type: "DocumentBaseTransitionV0"; + }; + fields: { + /** The document ID */ + id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + identity_contract_nonce: import("../src/bincode.js").BinCodeable; + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: import("../src/bincode.js").BinCodeable; + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + }; + }]; + }; + }; + revision: import("../src/bincode.js").BinCodeable; + price: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }]; + }; +}; +export const DocumentsBatchTransitionV0: import("../src/bincode.js").BinCodeable<{ + owner_id: [[Uint8Array]]; + transitions: ([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}> & { + (data: { + owner_id: [[Uint8Array]]; + transitions: ([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + owner_id: [[Uint8Array]]; + transitions: ([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "DocumentsBatchTransitionV0"; + }; + fields: { + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + transitions: import("../src/bincode.js").BinCodeable<([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]>; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; +}; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_create_state_transition" + */ +export const IdentityCreateTransition: import("../src/bincode.js").BinCodeable<[{ + public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + identity_id: [[Uint8Array]] | undefined; +}]> & { + $$type: { + [ENUM]: "IdentityCreateTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + identity_id: [[Uint8Array]] | undefined; + }> & { + (data: { + public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + identity_id: [[Uint8Array]] | undefined; + }): { + public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + identity_id: [[Uint8Array]] | undefined; + } & { + readonly $$type: "IdentityCreateTransitionV0"; + }; + fields: { + public_keys: import("../src/bincode.js").BinCodeable<[{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]>; + asset_lock_proof: import("../src/bincode.js").BinCodeable<[{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]> & { + $$type: { + [ENUM]: "AssetLockProof"; + }; + variants: { + readonly Instant: [import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; + }]; + readonly Chain: [import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; + }]; + }; + } & { + Instant: { + (data_0: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] & { + [ENUM]: "AssetLockProof"; + [VARIANT]: "Instant"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + Chain: { + (data_0: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }] & { + [ENUM]: "AssetLockProof"; + [VARIANT]: "Chain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; + }]; + }; + }; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]] | undefined>; + }; + }]; + }; +} & { + V0: { + (data_0: { + public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + identity_id: [[Uint8Array]] | undefined; + }): [{ + public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + identity_id: [[Uint8Array]] | undefined; + }] & { + [ENUM]: "IdentityCreateTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + identity_id: [[Uint8Array]] | undefined; + }> & { + (data: { + public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + identity_id: [[Uint8Array]] | undefined; + }): { + public_keys: [{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]; + asset_lock_proof: [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]; + user_fee_increase: number | bigint; + signature: [Uint8Array] | undefined; + identity_id: [[Uint8Array]] | undefined; + } & { + readonly $$type: "IdentityCreateTransitionV0"; + }; + fields: { + public_keys: import("../src/bincode.js").BinCodeable<[{ + id: number | bigint; + key_type: []; + purpose: []; + security_level: []; + contract_bounds: ({ + readonly id: [[Uint8Array]]; + } | { + readonly id: [[Uint8Array]]; + readonly document_type_name: string; + }) | undefined; + read_only: boolean; + data: [Uint8Array]; + signature: [Uint8Array] | undefined; + }][]>; + asset_lock_proof: import("../src/bincode.js").BinCodeable<[{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] | [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }]> & { + $$type: { + [ENUM]: "AssetLockProof"; + }; + variants: { + readonly Instant: [import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; + }]; + readonly Chain: [import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; + }]; + }; + } & { + Instant: { + (data_0: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): [{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }] & { + [ENUM]: "AssetLockProof"; + [VARIANT]: "Instant"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }> & { + (data: { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + }): { + instant_lock: [Uint8Array]; + transaction: [Uint8Array]; + output_index: number | bigint; + } & { + readonly $$type: "RawInstantLockProof"; + }; + fields: { + instant_lock: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + transaction: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "BinaryData"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + output_index: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + Chain: { + (data_0: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): [{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }] & { + [ENUM]: "AssetLockProof"; + [VARIANT]: "Chain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }> & { + (data: { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + }): { + core_chain_locked_height: number | bigint; + out_point: { + txid: [Uint8Array]; + vout: number | bigint; + }; + } & { + readonly $$type: "ChainAssetLockProof"; + }; + fields: { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: import("../src/bincode.js").BinCodeable; + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: import("../src/bincode.js").BinCodeable<{ + txid: [Uint8Array]; + vout: number | bigint; + }> & { + (data: { + txid: [Uint8Array]; + vout: number | bigint; + }): { + txid: [Uint8Array]; + vout: number | bigint; + } & { + readonly $$type: "OutPoint"; + }; + fields: { + /** The referenced transaction's txid. */ + txid: import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "Txid"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }; + /** The index of the referenced output in its transaction's vout. */ + vout: import("../src/bincode.js").BinCodeable; + }; + }; + }; + }]; + }; + }; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]] | undefined>; + }; + }]; + }; +}; +/** platform_serialize unversioned */ +export const MasternodeVoteTransitionV0: import("../src/bincode.js").BinCodeable<{ + pro_tx_hash: [[Uint8Array]]; + voter_identity_id: [[Uint8Array]]; + vote: [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]; + nonce: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}> & { + (data: { + pro_tx_hash: [[Uint8Array]]; + voter_identity_id: [[Uint8Array]]; + vote: [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]; + nonce: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + pro_tx_hash: [[Uint8Array]]; + voter_identity_id: [[Uint8Array]]; + vote: [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]; + nonce: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "MasternodeVoteTransitionV0"; + }; + fields: { + pro_tx_hash: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + voter_identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + vote: import("../src/bincode.js").BinCodeable<[[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]> & { + $$type: { + [ENUM]: "Vote"; + }; + variants: { + readonly ResourceVote: [import("../src/bincode.js").BinCodeable<[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]> & { + $$type: { + [ENUM]: "ResourceVote"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): [{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }] & { + [ENUM]: "ResourceVote"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + }]; + }; + } & { + ResourceVote: { + (data_0: [{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]): [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]] & { + [ENUM]: "Vote"; + [VARIANT]: "ResourceVote"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]> & { + $$type: { + [ENUM]: "ResourceVote"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): [{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }] & { + [ENUM]: "ResourceVote"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + }]; + }; + }; + nonce: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; +}; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.documents_batch_state_transition" + */ +export const DocumentsBatchTransition: import("../src/bincode.js").BinCodeable<[{ + owner_id: [[Uint8Array]]; + transitions: ([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}]> & { + $$type: { + [ENUM]: "DocumentsBatchTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + owner_id: [[Uint8Array]]; + transitions: ([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + owner_id: [[Uint8Array]]; + transitions: ([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + owner_id: [[Uint8Array]]; + transitions: ([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "DocumentsBatchTransitionV0"; + }; + fields: { + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + transitions: import("../src/bincode.js").BinCodeable<([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]>; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +} & { + V0: { + (data_0: { + owner_id: [[Uint8Array]]; + transitions: ([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): [{ + owner_id: [[Uint8Array]]; + transitions: ([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }] & { + [ENUM]: "DocumentsBatchTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + owner_id: [[Uint8Array]]; + transitions: ([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + owner_id: [[Uint8Array]]; + transitions: ([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + owner_id: [[Uint8Array]]; + transitions: ([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]; + user_fee_increase: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "DocumentsBatchTransitionV0"; + }; + fields: { + owner_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + transitions: import("../src/bincode.js").BinCodeable<([[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + entropy: Uint8Array; + data: Map; + prefunded_voting_balance: [import("../src/bincode.js").BinCodeable, import("../src/bincode.js").BinCodeable] | undefined; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + data: Map; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + recipient_owner_id: [[Uint8Array]]; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]] | [[{ + base: [{ + id: [[Uint8Array]]; + identity_contract_nonce: number | bigint; + document_type_name: string; + data_contract_id: [[Uint8Array]]; + }]; + revision: number | bigint; + price: number | bigint; + }]])[]>; + user_fee_increase: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +}; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.masternode_vote_state_transition" + */ +export const MasternodeVoteTransition: import("../src/bincode.js").BinCodeable<[{ + pro_tx_hash: [[Uint8Array]]; + voter_identity_id: [[Uint8Array]]; + vote: [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]; + nonce: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; +}]> & { + $$type: { + [ENUM]: "MasternodeVoteTransition"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + pro_tx_hash: [[Uint8Array]]; + voter_identity_id: [[Uint8Array]]; + vote: [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]; + nonce: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + pro_tx_hash: [[Uint8Array]]; + voter_identity_id: [[Uint8Array]]; + vote: [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]; + nonce: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + pro_tx_hash: [[Uint8Array]]; + voter_identity_id: [[Uint8Array]]; + vote: [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]; + nonce: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "MasternodeVoteTransitionV0"; + }; + fields: { + pro_tx_hash: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + voter_identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + vote: import("../src/bincode.js").BinCodeable<[[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]> & { + $$type: { + [ENUM]: "Vote"; + }; + variants: { + readonly ResourceVote: [import("../src/bincode.js").BinCodeable<[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]> & { + $$type: { + [ENUM]: "ResourceVote"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): [{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }] & { + [ENUM]: "ResourceVote"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + }]; + }; + } & { + ResourceVote: { + (data_0: [{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]): [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]] & { + [ENUM]: "Vote"; + [VARIANT]: "ResourceVote"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]> & { + $$type: { + [ENUM]: "ResourceVote"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): [{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }] & { + [ENUM]: "ResourceVote"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + }]; + }; + }; + nonce: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable<[Uint8Array] | undefined>; + }; + }]; + }; +} & { + V0: { + (data_0: { + pro_tx_hash: [[Uint8Array]]; + voter_identity_id: [[Uint8Array]]; + vote: [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]; + nonce: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): [{ + pro_tx_hash: [[Uint8Array]]; + voter_identity_id: [[Uint8Array]]; + vote: [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]; + nonce: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }] & { + [ENUM]: "MasternodeVoteTransition"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + pro_tx_hash: [[Uint8Array]]; + voter_identity_id: [[Uint8Array]]; + vote: [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]; + nonce: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }> & { + (data: { + pro_tx_hash: [[Uint8Array]]; + voter_identity_id: [[Uint8Array]]; + vote: [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]; + nonce: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + }): { + pro_tx_hash: [[Uint8Array]]; + voter_identity_id: [[Uint8Array]]; + vote: [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]; + nonce: number | bigint; + signature_public_key_id: number | bigint | undefined; + signature: [Uint8Array] | undefined; + } & { + readonly $$type: "MasternodeVoteTransitionV0"; + }; + fields: { + pro_tx_hash: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + voter_identity_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + vote: import("../src/bincode.js").BinCodeable<[[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]]> & { + $$type: { + [ENUM]: "Vote"; + }; + variants: { + readonly ResourceVote: [import("../src/bincode.js").BinCodeable<[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]> & { + $$type: { + [ENUM]: "ResourceVote"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): [{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }] & { + [ENUM]: "ResourceVote"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + }]; + }; + } & { + ResourceVote: { + (data_0: [{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]): [[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]] & { + [ENUM]: "Vote"; + [VARIANT]: "ResourceVote"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }]> & { + $$type: { + [ENUM]: "ResourceVote"; + }; + variants: { + readonly V0: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable<[] | [[[Uint8Array]]]> & { + $$type: { + [ENUM]: "ResourceVoteChoice"; + }; + variants: { + readonly TowardsIdentity: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + /** default */ + readonly Abstain: []; + readonly Lock: []; + }; + } & { + TowardsIdentity: { + (data_0: [[Uint8Array]]): [[[Uint8Array]]] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "TowardsIdentity"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }]; + }; + Abstain: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Abstain"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + Lock: { + (): [] & { + [ENUM]: "ResourceVoteChoice"; + [VARIANT]: "Lock"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: []; + }; + }; + }; + }]; + }; + } & { + V0: { + (data_0: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): [{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }] & { + [ENUM]: "ResourceVote"; + [VARIANT]: "V0"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }> & { + (data: { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + }): { + vote_poll: [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]; + resource_vote_choice: [] | [[[Uint8Array]]]; + } & { + readonly $$type: "ResourceVoteV0"; + }; + fields: { + vote_poll: import("../src/bincode.js").BinCodeable<[{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }]> & { + $$type: { + [ENUM]: "VotePoll"; + }; + variants: { + readonly ContestedDocumentResourceVotePoll: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [import("../src/bincode.js").BinCodeable<[Uint8Array]> & { + (data_0: Uint8Array): [Uint8Array] & { + readonly $$type: "IdentifierBytes32"; + }; + fields: [import("../src/bincode.js").BinCodeable>]; + }]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + } & { + ContestedDocumentResourceVotePoll: { + (data_0: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): [{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }] & { + [ENUM]: "VotePoll"; + [VARIANT]: "ContestedDocumentResourceVotePoll"; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: [import("../src/bincode.js").BinCodeable<{ + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }> & { + (data: { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + }): { + contract_id: [[Uint8Array]]; + document_type_name: string; + index_name: string; + index_values: any[]; + } & { + readonly $$type: "ContestedDocumentResourceVotePoll"; + }; + fields: { + contract_id: import("../src/bincode.js").BinCodeable<[[Uint8Array]]> & { + (data_0: [Uint8Array]): [[Uint8Array]] & { + readonly $$type: "Identifier"; + }; + fields: [/*elided*/ any]; + }; + document_type_name: import("../src/bincode.js").BinCodeable; + index_name: import("../src/bincode.js").BinCodeable; + index_values: import("../src/bincode.js").BinCodeable; + }; + }]; + }; + }; + resource_vote_choice: import("../src/bincode.js").BinCodeable & /*... 1 more elided ...*/ any & { + /*elided*/ + }; + }; + }]; + }; + }]; + }; + }; + nonce: import("../src/bincode.js").BinCodeable; + signature_public_key_id: import("../src/bincode.js").BinCodeable; + signature: import("../src/bincode.js").BinCodeable; + }; + }]; + }; +}; +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const StateTransition: import("../src/bincode.js").BinCodeable & /*... 1 more elided ...*/ any & { + /*elided*/ +}; +import { ENUM } from "../src/bincode.js"; +import { VARIANT } from "../src/bincode.js"; +import { DISCRIMINANT } from "../src/bincode.js"; diff --git a/built/DashPlatform.js/1.8.1/generated_bincode.js b/built/DashPlatform.js/1.8.1/generated_bincode.js new file mode 100644 index 0000000..3b16146 --- /dev/null +++ b/built/DashPlatform.js/1.8.1/generated_bincode.js @@ -0,0 +1,1543 @@ +import { Bool, Bytes, Enum, VariantDiscriminant, FixedBytes, Lazy, Struct, StructTuple, Int128, Int16, Int32, Int64, Int8, Uint128, Uint16, Uint32, Uint64, Uint8, Float64, VarInt, VarUint, Vec, Tuple, Map, Option, String, Nothing, Range, NotSignable, SocketAddr, DISCRIMINANT, VARIANT, ENUM, } from "../src/bincode.js"; +import { Transaction } from "../src/bincode_types.js"; +export const Hash = Bytes; //FixedBytes(32) +/** @type {*} */ +export const Value = Lazy("Value", () => REAL_Value); +// !ENCODE +/** + * An Asset Unlock Base payload. This is the base payload of the Asset Unlock. In order to make + * it a full payload the request info should be added. + */ +export const AssetUnlockBasePayload = Struct("AssetUnlockBasePayload", { + /** The payload protocol version, is currently expected to be 0. */ + version: Uint8, + /** The index of the unlock transaction. It gets bumped on each transaction */ + index: VarUint, + /** The fee used in Duffs (Satoshis) */ + fee: VarUint, +}); +// !ENCODE +/** + * A BLS Public key is 48 bytes in the scheme used for Dash Core + * attr since (1.48) , derive (PartialEq , Eq , Ord , PartialOrd , Hash) + */ +export const BLSPublicKey = StructTuple("BLSPublicKey", FixedBytes(48)); +// !ENCODE +/** + * A BLS Signature is 96 bytes in the scheme used for Dash Core + * attr since (1.48) , derive (PartialEq , Eq , Ord , PartialOrd , Hash) + */ +export const BLSSignature = StructTuple("BLSSignature", FixedBytes(96)); +export const BinaryData = StructTuple("BinaryData", Bytes); +// !ENCODE +/** A dash block hash. */ +export const BlockHash = StructTuple("BlockHash", Hash); +export const Credits = VarUint; +export const DefinitionName = String; +export const DocumentName = String; +export const Hash256 = FixedBytes(32); +export const IdentifierBytes32 = StructTuple("IdentifierBytes32", FixedBytes(32)); +export const IdentityNonce = VarUint; +// !ENCODE +/** A hash of all transaction inputs */ +export const InputsHash = StructTuple("InputsHash", Hash); +export const KeyID = VarUint; +/** + * allow non_camel_case_types + * repr u8 + */ +export const KeyType = Enum("KeyType", /** @type {const} */ ({ + /** default */ + ECDSA_SECP256K1: [], + BLS12_381: [], + ECDSA_HASH160: [], + BIP13_SCRIPT_HASH: [], + EDDSA_25519_HASH160: [], +})); +// !ENCODE +export const LLMQType = Enum("LLMQType", /** @type {const} */ ({ + LlmqtypeUnknown: [], + Llmqtype50_60: [], + Llmqtype400_60: [], + Llmqtype400_85: [], + Llmqtype100_67: [], + Llmqtype60_75: [], + Llmqtype25_67: [], + LlmqtypeTest: VariantDiscriminant([], 100), + LlmqtypeDevnet: VariantDiscriminant([], 101), + LlmqtypeTestV17: VariantDiscriminant([], 102), + LlmqtypeTestDIP0024: VariantDiscriminant([], 103), + LlmqtypeTestInstantSend: VariantDiscriminant([], 104), + LlmqtypeDevnetDIP0024: VariantDiscriminant([], 105), + LlmqtypeTestnetPlatform: VariantDiscriminant([], 106), + LlmqtypeDevnetPlatform: VariantDiscriminant([], 107), +})); +// !ENCODE +/** + * Dash Additions + * + * The merkle root of the masternode list + * hash_newtype forward + */ +export const MerkleRootMasternodeList = StructTuple("MerkleRootMasternodeList", Hash); +// !ENCODE +/** + * The merkle root of the quorums + * hash_newtype forward + */ +export const MerkleRootQuorums = StructTuple("MerkleRootQuorums", Hash); +/** repr u8 */ +export const Pooling = Enum("Pooling", /** @type {const} */ ({ + /** default */ + Never: [], + IfAvailable: [], + Standard: [], +})); +// !ENCODE +export const ProviderMasternodeType = Enum("ProviderMasternodeType", /** @type {const} */ ({ + Regular: [], + HighPerformance: [], +})); +// !ENCODE +/** A hash of a public key. */ +export const PubkeyHash = StructTuple("PubkeyHash", Hash); +/** repr u8 */ +export const Purpose = Enum("Purpose", /** @type {const} */ ({ + /** + * at least one authentication key must be registered for all security levels + * default + */ + AUTHENTICATION: [], + /** this key cannot be used for signing documents */ + ENCRYPTION: [], + /** this key cannot be used for signing documents */ + DECRYPTION: [], + /** this key is used to sign credit transfer and withdrawal state transitions */ + TRANSFER: [], + /** this key cannot be used for signing documents */ + SYSTEM: [], + /** this key cannot be used for signing documents */ + VOTING: [], + /** this key is used to prove ownership of a masternode or evonode */ + OWNER: [], +})); +export const QuorumHash = BlockHash; +// !ENCODE +/** A hash of a quorum verification vector */ +export const QuorumVVecHash = StructTuple("QuorumVVecHash", Hash); +// !ENCODE +/** "Raw" instant lock for serialization */ +export const RawInstantLockProof = Struct("RawInstantLockProof", { + instant_lock: BinaryData, + transaction: BinaryData, + output_index: VarUint, +}); +export const Revision = VarUint; +// !ENCODE +/** + * An owned, growable script. + * + * `ScriptBuf` is the most common script type that has the ownership over the contents of the + * script. It has a close relationship with its borrowed counterpart, [`Script`]. + * + * Just as other similar types, this implements [`Deref`], so [deref coercions] apply. Also note + * that all the safety/validity restrictions that apply to [`Script`] apply to `ScriptBuf` as well. + * + * [deref coercions]: https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion + */ +export const ScriptBuf = StructTuple("ScriptBuf", Bytes); +/** repr u8 */ +export const SecurityLevel = Enum("SecurityLevel", /** @type {const} */ ({ + MASTER: [], + CRITICAL: [], + /** default */ + HIGH: [], + MEDIUM: [], +})); +/** + * The Storage Key requirements + * repr u8 + */ +export const StorageKeyRequirements = Enum("StorageKeyRequirements", /** @type {const} */ ({ + Unique: [], + Multiple: [], + MultipleReferenceToLatest: [], +})); +export const TimestampMillis = VarUint; +// !ENCODE +/** + * The transaction type. Special transactions were introduced in DIP2. + * Compared to Bitcoin the version field is split into two 16 bit integers. + * The first part for the version and the second part for the transaction + * type. + * + * repr u16 + */ +export const TransactionType = Enum("TransactionType", /** @type {const} */ ({ + /** A Classic transaction */ + Classic: [], + /** A Masternode Registration Transaction */ + ProviderRegistration: [], + /** A Masternode Update Service Transaction, used by the operator to signal changes to service */ + ProviderUpdateService: [], + /** A Masternode Update Registrar Transaction, used by the owner to signal base changes */ + ProviderUpdateRegistrar: [], + /** A Masternode Update Revocation Transaction, used by the operator to signal termination of service */ + ProviderUpdateRevocation: [], + /** A Coinbase Transaction, contained as the first transaction in each block */ + Coinbase: [], + /** A Quorum Commitment Transaction, used to save quorum information to the state */ + QuorumCommitment: [], + /** An Asset Lock Transaction, used to transfer credits to Dash Platform, by locking them until withdrawals occur */ + AssetLock: VariantDiscriminant([], 8), + /** An Asset Unlock Transaction, used to withdraw credits from Dash Platform, by unlocking them */ + AssetUnlock: VariantDiscriminant([], 9), +})); +// !ENCODE +/** A transaction output, which defines new coins to be created from old ones. */ +export const TxOut = Struct("TxOut", { + /** The value of the output, in satoshis. */ + value: VarUint, + /** The script which must be satisfied for the output to be spent. */ + script_pubkey: ScriptBuf, +}); +// !ENCODE +/** A dash transaction hash/transaction ID. */ +export const Txid = StructTuple("Txid", Hash); +export const UserFeeIncrease = VarUint; +export const ValueMap = Vec(Tuple(Value, Value)); +// !ENCODE +/** + * An Asset Lock payload. This is contained as the payload of an asset lock special transaction. + * The Asset Lock Special transaction and this payload is described in the Asset Lock DIP2X + * (todo:update this). + * An Asset Lock can fund multiple Identity registrations or top ups. + * The Asset Lock payload credit outputs field contains a vector of TxOuts. + * Each TxOut refers to a funding of an Identity. + */ +export const AssetLockPayload = Struct("AssetLockPayload", { + version: Uint8, + credit_outputs: Vec(TxOut), +}); +// !ENCODE +/** + * An asset unlock request info + * This is the information about the signing quorum + * The request height should be the height at which the specified quorum is active on core. + */ +export const AssetUnlockRequestInfo = Struct("AssetUnlockRequestInfo", { + /** + * The core request height of the transaction. This should match a period where the quorum_hash + * is still active + */ + request_height: VarUint, + /** The quorum hash. This is the block hash when the quorum was created. */ + quorum_hash: QuorumHash, +}); +// !ENCODE +/** + * A Coinbase payload. This is contained as the payload of a coinbase special transaction. + * The Coinbase payload is described in DIP4. + */ +export const CoinbasePayload = Struct("CoinbasePayload", { + version: VarUint, + height: VarUint, + merkle_root_masternode_list: MerkleRootMasternodeList, + merkle_root_quorums: MerkleRootQuorums, + best_cl_height: Option(VarUint), + best_cl_signature: Option(BLSSignature), + asset_locked_amount: Option(VarUint), +}); +export const DashcoreScript = ScriptBuf; +export const DataContractConfigV0 = Struct("DataContractConfigV0", { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: Bool, + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: Bool, + /** Does the contract keep history when the contract itself changes */ + keeps_history: Bool, + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: Bool, + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: Bool, + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: Bool, + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: Option(StorageKeyRequirements), + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: Option(StorageKeyRequirements), +}); +export const Identifier = StructTuple("Identifier", IdentifierBytes32); +/** platform_serialize unversioned */ +export const IdentityCreditTransferTransitionV0 = Struct("IdentityCreditTransferTransitionV0", { + identity_id: Identifier, + recipient_id: Identifier, + amount: VarUint, + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +export const InstantAssetLockProof = RawInstantLockProof; +// !ENCODE +/** A reference to a transaction output. */ +export const OutPoint = Struct("OutPoint", { + /** The referenced transaction's txid. */ + txid: Txid, + /** The index of the referenced output in its transaction's vout. */ + vout: VarUint, +}); +// !ENCODE +/** + * A Provider Registration Payload used in a Provider Registration Special Transaction. + * This is used to register a Masternode on the network. + * The current version is 0. + * Interesting Fields: + * *Provider type refers to the type of Masternode. Currently only valid value is 0. + * *Provider mode refers to the mode of the Masternode. Currently only valid value is 0. + * *The collateral outpoint links to a transaction with a 1000 Dash unspent (at registration) + * outpoint. + * *The operator reward defines the ratio when divided by 10000 of the amount going to the operator. + * The max value for the operator reward is 10000. + * *The script payout is the script to which one wants to have the masternode pay out. + * *The inputs hash is used to guarantee the uniqueness of the payload sig. + */ +export const ProviderRegistrationPayload = Struct("ProviderRegistrationPayload", { + version: VarUint, + masternode_type: ProviderMasternodeType, + masternode_mode: VarUint, + collateral_outpoint: OutPoint, + service_address: SocketAddr, + owner_key_hash: PubkeyHash, + operator_public_key: BLSPublicKey, + voting_key_hash: PubkeyHash, + operator_reward: VarUint, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + signature: Bytes, + platform_node_id: Option(PubkeyHash), + platform_p2p_port: Option(VarUint), + platform_http_port: Option(VarUint), +}); +// !ENCODE +/** + * A Provider Update Registrar Payload used in a Provider Update Registrar Special Transaction. + * This is used to update the base aspects a Masternode on the network. + * It must be signed by the owner's key that was set at registration. + */ +export const ProviderUpdateRegistrarPayload = Struct("ProviderUpdateRegistrarPayload", { + version: VarUint, + pro_tx_hash: Txid, + provider_mode: VarUint, + operator_public_key: BLSPublicKey, + voting_key_hash: PubkeyHash, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + payload_sig: Bytes, +}); +// !ENCODE +/** + * A Provider Update Revocation Payload used in a Provider Update Revocation Special Transaction. + * This is used to signal and stop a Masternode from the operator. + * It must be signed by the operator's key that was set at registration or registrar update. + */ +export const ProviderUpdateRevocationPayload = Struct("ProviderUpdateRevocationPayload", { + version: VarUint, + pro_tx_hash: Txid, + reason: VarUint, + inputs_hash: InputsHash, + payload_sig: BLSSignature, +}); +// !ENCODE +/** + * A Provider Update Service Payload used in a Provider Update Service Special Transaction. + * This is used to update the operational aspects a Masternode on the network. + * It must be signed by the operator's key that was set either at registration or by the last + * registrar update of the masternode. + */ +export const ProviderUpdateServicePayload = Struct("ProviderUpdateServicePayload", { + version: VarUint, + pro_tx_hash: Txid, + ip_address: VarUint, + port: VarUint, + script_payout: ScriptBuf, + inputs_hash: InputsHash, + payload_sig: BLSSignature, +}); +// !ENCODE +/** + * A Quorum Finalization Commitment. It is described in the finalization section of DIP6: + * [dip-0006.md#6-finalization-phase](https://github.com/dashpay/dips/blob/master/dip-0006.md#6-finalization-phase) + */ +export const QuorumEntry = Struct("QuorumEntry", { + version: VarUint, + llmq_type: LLMQType, + quorum_hash: QuorumHash, + quorum_index: Option(VarInt), + signers: Vec(Bool), + valid_members: Vec(Bool), + quorum_public_key: BLSPublicKey, + quorum_vvec_hash: QuorumVVecHash, + threshold_sig: BLSSignature, + all_commitment_aggregated_signature: BLSSignature, +}); +/** + * A representation of a dynamic value that can handled dynamically + * non_exhaustive + */ +export const REAL_Value = Enum("Value", /** @type {const} */ ({ + /** A u128 integer */ + U128: [VarUint], + /** A i128 integer */ + I128: [VarInt], + /** A u64 integer */ + U64: [VarUint], + /** A i64 integer */ + I64: [VarInt], + /** A u32 integer */ + U32: [VarUint], + /** A i32 integer */ + I32: [VarInt], + /** A u16 integer */ + U16: [VarUint], + /** A i16 integer */ + I16: [VarInt], + /** A u8 integer */ + U8: [Uint8], + /** A i8 integer */ + I8: [Int8], + /** Bytes */ + Bytes: [Bytes], + /** Bytes 20 */ + Bytes20: [FixedBytes(20)], + /** Bytes 32 */ + Bytes32: [FixedBytes(32)], + /** Bytes 36 : Useful for outpoints */ + Bytes36: [FixedBytes(36)], + /** An enumeration of u8 */ + EnumU8: [Bytes], + /** An enumeration of strings */ + EnumString: [Vec(String)], + /** + * Identifier + * The identifier is very similar to bytes, however it is serialized to Base58 when converted + * to a JSON Value + */ + Identifier: [Hash256], + /** A float */ + Float: [Float64], + /** A string */ + Text: [String], + /** A boolean */ + Bool: [Bool], + /** Null */ + Null: [], + /** An array */ + Array: [Vec(Value)], + /** A map */ + Map: [ValueMap], +})); +/** + * A resource votes is a votes determining what we should do with a contested resource. + * For example Alice and Bob both want the username "Malaka" + * Some would vote for Alice to get it by putting in her Identifier. + * Some would vote for Bob to get it by putting in Bob's Identifier. + * Let's say someone voted, but is now not quite sure of their votes, they can abstain. + * Lock is there to signal that the shared resource should be given to no one. + * In this case Malaka might have a bad connotation in Greek, hence some might votes to Lock + * the name. + */ +export const ResourceVoteChoice = Enum("ResourceVoteChoice", /** @type {const} */ ({ + TowardsIdentity: [Identifier], + /** default */ + Abstain: [], + Lock: [], +})); +// !ENCODE +/** + * A Credit Withdrawal payload. This is contained as the payload of a credit withdrawal special + * transaction. + * The Credit Withdrawal Special transaction and this payload is described in the Asset Lock DIP2X + * (todo:update this). + * The Credit Withdrawal Payload is signed by a quorum. + * + * Transaction using it have no inputs. Hence the proof of validity lies solely on the BLS signature. + */ +export const AssetUnlockPayload = Struct("AssetUnlockPayload", { + /** + * The base information about the asset unlock. This base information is the information that + * should be put into a queue. + */ + base: AssetUnlockBasePayload, + /** + * The request information. This should be added to the unlock transaction as it is being sent + * to be signed. + */ + request_info: AssetUnlockRequestInfo, + /** The threshold signature. This should be returned by the consensus engine. */ + quorum_sig: BLSSignature, +}); +// !ENCODE +/** + * Instant Asset Lock Proof is a part of Identity Create and Identity Topup + * transitions. It is a proof that specific output of dash is locked in credits + * pull and the transitions can mint credits and populate identity's balance. + * To prove that the output is locked, a height where transaction was chain locked is provided. + */ +export const ChainAssetLockProof = Struct("ChainAssetLockProof", { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: VarUint, + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: OutPoint, +}); +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const ContestedDocumentResourceVotePoll = Struct("ContestedDocumentResourceVotePoll", { + contract_id: Identifier, + document_type_name: String, + index_name: String, + index_values: Vec(Value), +}); +/** + * A contract bounds is the bounds that the key has influence on. + * For authentication keys the bounds mean that the keys can only be used to sign + * within the specified contract. + * For encryption decryption this tells clients to only use these keys for specific + * contracts. + * + * repr u8 + */ +export const ContractBounds = Enum("ContractBounds", /** @type {const} */ ({ + /** this key can only be used within a specific contract */ + SingleContract: { + id: Identifier, + }, + /** this key can only be used within a specific contract and for a specific document type */ + SingleContractDocumentType: { + id: Identifier, + document_type_name: String, + }, +})); +// !ENCODE +export const CoreScript = StructTuple("CoreScript", DashcoreScript); +export const DataContractConfig = Enum("DataContractConfig", /** @type {const} */ ({ + V0: [DataContractConfigV0], +})); +export const DataContractInSerializationFormatV0 = Struct("DataContractInSerializationFormatV0", { + /** A unique identifier for the data contract. */ + id: Identifier, + /** Internal configuration for the contract. */ + config: DataContractConfig, + /** The version of this data contract. */ + version: VarUint, + /** The identifier of the contract owner. */ + owner_id: Identifier, + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: Option(Map(DefinitionName, Value)), + /** Document JSON Schemas per type */ + document_schemas: Map(DocumentName, Value), +}); +export const DocumentBaseTransitionV0 = Struct("DocumentBaseTransitionV0", { + /** The document ID */ + id: Identifier, + identity_contract_nonce: IdentityNonce, + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: String, + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier, +}); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_credit_transfer_state_transition" + */ +export const IdentityCreditTransferTransition = Enum("IdentityCreditTransferTransition", /** @type {const} */ ({ + V0: [IdentityCreditTransferTransitionV0], +})); +export const IdentityCreditWithdrawalTransitionV0 = Struct("IdentityCreditWithdrawalTransitionV0", { + identity_id: Identifier, + amount: VarUint, + core_fee_per_byte: VarUint, + pooling: Pooling, + output_script: CoreScript, + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +export const IdentityCreditWithdrawalTransitionV1 = Struct("IdentityCreditWithdrawalTransitionV1", { + identity_id: Identifier, + amount: VarUint, + core_fee_per_byte: VarUint, + pooling: Pooling, + /** If the send to output script is None, then we send the withdrawal to the address set by core */ + output_script: Option(CoreScript), + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +export const IdentityPublicKeyInCreationV0 = Struct("IdentityPublicKeyInCreationV0", { + id: KeyID, + key_type: KeyType, + purpose: Purpose, + security_level: SecurityLevel, + contract_bounds: Option(ContractBounds), + read_only: Bool, + data: BinaryData, + /** The signature is needed for ECDSA_SECP256K1 Key type and BLS12_381 Key type */ + signature: NotSignable(BinaryData), +}); +export const IdentityPublicKeyV0 = Struct("IdentityPublicKeyV0", { + id: KeyID, + purpose: Purpose, + security_level: SecurityLevel, + contract_bounds: Option(ContractBounds), + key_type: KeyType, + read_only: Bool, + data: BinaryData, + disabled_at: Option(TimestampMillis), +}); +// !ENCODE +/** + * A Quorum Commitment Payload used in a Quorum Commitment Special Transaction. + * This is used in the mining phase as described in DIP 6: + * [dip-0006.md#7-mining-phase](https://github.com/dashpay/dips/blob/master/dip-0006.md#7-mining-phase). + * + * Miners take the best final commitment for a DKG session and mine it into a block. + */ +export const QuorumCommitmentPayload = Struct("QuorumCommitmentPayload", { + version: VarUint, + height: VarUint, + finalization_commitment: QuorumEntry, +}); +// !ENCODE +/** + * An enum wrapper around various special transaction payloads. + * Special transactions are defined in DIP 2. + */ +export const TransactionPayload = Enum("TransactionPayload", /** @type {const} */ ({ + /** A wrapper for a Masternode Registration payload */ + ProviderRegistrationPayloadType: [ProviderRegistrationPayload], + /** A wrapper for a Masternode Update Service payload */ + ProviderUpdateServicePayloadType: [ProviderUpdateServicePayload], + /** A wrapper for a Masternode Update Registrar payload */ + ProviderUpdateRegistrarPayloadType: [ProviderUpdateRegistrarPayload], + /** A wrapper for a Masternode Update Revocation payload */ + ProviderUpdateRevocationPayloadType: [ProviderUpdateRevocationPayload], + /** A wrapper for a Coinbase payload */ + CoinbasePayloadType: [CoinbasePayload], + /** A wrapper for a Quorum Commitment payload */ + QuorumCommitmentPayloadType: [QuorumCommitmentPayload], + /** A wrapper for an Asset Lock payload */ + AssetLockPayloadType: [AssetLockPayload], + /** A wrapper for an Asset Unlock payload */ + AssetUnlockPayloadType: [AssetUnlockPayload], +})); +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const VotePoll = Enum("VotePoll", /** @type {const} */ ({ + ContestedDocumentResourceVotePoll: [ContestedDocumentResourceVotePoll], +})); +export const AssetLockProof = Enum("AssetLockProof", /** @type {const} */ ({ + Instant: [InstantAssetLockProof], + Chain: [ChainAssetLockProof], +})); +export const DataContractInSerializationFormat = Enum("DataContractInSerializationFormat", /** @type {const} */ ({ + V0: [DataContractInSerializationFormatV0], +})); +export const DataContractUpdateTransitionV0 = Struct("DataContractUpdateTransitionV0", { + identity_contract_nonce: IdentityNonce, + data_contract: DataContractInSerializationFormat, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +export const DocumentBaseTransition = Enum("DocumentBaseTransition", /** @type {const} */ ({ + V0: [DocumentBaseTransitionV0], +})); +export const DocumentCreateTransitionV0 = Struct("DocumentCreateTransitionV0", { + /** Document Base Transition */ + base: DocumentBaseTransition, + /** Entropy used to create a Document ID. */ + entropy: FixedBytes(32), + data: Map(String, Value), + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance: Option(Tuple(String, Credits)), +}); +export const DocumentDeleteTransitionV0 = Struct("DocumentDeleteTransitionV0", { + base: DocumentBaseTransition, +}); +export const DocumentPurchaseTransitionV0 = Struct("DocumentPurchaseTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + price: Credits, +}); +export const DocumentReplaceTransitionV0 = Struct("DocumentReplaceTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + data: Map(String, Value), +}); +export const DocumentTransferTransitionV0 = Struct("DocumentTransferTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + recipient_owner_id: Identifier, +}); +export const DocumentUpdatePriceTransitionV0 = Struct("DocumentUpdatePriceTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + price: Credits, +}); +/** + * platform_serialize unversioned + * platform_version_path "dpp.state_transition_serialization_versions.identity_credit_withdrawal_state_transition" + */ +export const IdentityCreditWithdrawalTransition = Enum("IdentityCreditWithdrawalTransition", /** @type {const} */ ({ + V0: [IdentityCreditWithdrawalTransitionV0], + V1: [IdentityCreditWithdrawalTransitionV1], +})); +/** platform_serialize limit = 2000 , unversioned */ +export const IdentityPublicKey = Enum("IdentityPublicKey", /** @type {const} */ ({ + V0: [IdentityPublicKeyV0], +})); +export const IdentityPublicKeyInCreation = Enum("IdentityPublicKeyInCreation", /** @type {const} */ ({ + V0: [IdentityPublicKeyInCreationV0], +})); +export const IdentityTopUpTransitionV0 = Struct("IdentityTopUpTransitionV0", { + asset_lock_proof: AssetLockProof, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + signature: NotSignable(BinaryData), +}); +export const IdentityUpdateTransitionV0 = Struct("IdentityUpdateTransitionV0", { + /** Unique identifier of the identity to be updated */ + identity_id: Identifier, + /** The revision of the identity after update */ + revision: Revision, + /** Identity nonce for this transition to prevent replay attacks */ + nonce: IdentityNonce, + /** + * Public Keys to add to the Identity + * we want to skip serialization of transitions, as we does it manually in `to_object()` and `to_json()` + */ + add_public_keys: Vec(IdentityPublicKeyInCreation), + /** Identity Public Keys ID's to disable for the Identity */ + disable_public_keys: Vec(KeyID), + /** The fee multiplier */ + user_fee_increase: UserFeeIncrease, + /** The ID of the public key used to sing the State Transition */ + signature_public_key_id: NotSignable(KeyID), + /** Cryptographic signature of the State Transition */ + signature: NotSignable(BinaryData), +}); +/** platform_serialize unversioned */ +export const ResourceVoteV0 = Struct("ResourceVoteV0", { + vote_poll: VotePoll, + resource_vote_choice: ResourceVoteChoice, +}); +/** DataContractCreateTransitionV0 has the same encoding structure */ +export const DataContractCreateTransitionV0 = Struct("DataContractCreateTransitionV0", { + data_contract: DataContractInSerializationFormat, + identity_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_update_state_transition" + */ +export const DataContractUpdateTransition = Enum("DataContractUpdateTransition", /** @type {const} */ ({ + V0: [DataContractUpdateTransitionV0], +})); +export const DocumentCreateTransition = Enum("DocumentCreateTransition", /** @type {const} */ ({ + V0: [DocumentCreateTransitionV0], +})); +export const DocumentDeleteTransition = Enum("DocumentDeleteTransition", /** @type {const} */ ({ + V0: [DocumentDeleteTransitionV0], +})); +export const DocumentPurchaseTransition = Enum("DocumentPurchaseTransition", /** @type {const} */ ({ + V0: [DocumentPurchaseTransitionV0], +})); +export const DocumentReplaceTransition = Enum("DocumentReplaceTransition", /** @type {const} */ ({ + V0: [DocumentReplaceTransitionV0], +})); +export const DocumentTransferTransition = Enum("DocumentTransferTransition", /** @type {const} */ ({ + V0: [DocumentTransferTransitionV0], +})); +export const DocumentUpdatePriceTransition = Enum("DocumentUpdatePriceTransition", /** @type {const} */ ({ + V0: [DocumentUpdatePriceTransitionV0], +})); +export const IdentityCreateTransitionV0 = Struct("IdentityCreateTransitionV0", { + public_keys: Vec(IdentityPublicKeyInCreation), + asset_lock_proof: AssetLockProof, + user_fee_increase: UserFeeIncrease, + signature: NotSignable(BinaryData), + identity_id: NotSignable(Identifier), +}); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_top_up_state_transition" + */ +export const IdentityTopUpTransition = Enum("IdentityTopUpTransition", /** @type {const} */ ({ + V0: [IdentityTopUpTransitionV0], +})); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_update_state_transition" + */ +export const IdentityUpdateTransition = Enum("IdentityUpdateTransition", /** @type {const} */ ({ + V0: [IdentityUpdateTransitionV0], +})); +/** platform_serialize limit = 15000 , unversioned */ +export const ResourceVote = Enum("ResourceVote", /** @type {const} */ ({ + V0: [ResourceVoteV0], +})); +/** platform_serialize limit = 15000 , unversioned */ +export const Vote = Enum("Vote", /** @type {const} */ ({ + ResourceVote: [ResourceVote], +})); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_create_state_transition" + */ +export const DataContractCreateTransition = Enum("DataContractCreateTransition", /** @type {const} */ ({ + V0: [DataContractCreateTransitionV0], +})); +export const DocumentTransition = Enum("DocumentTransition", /** @type {const} */ ({ + Create: [DocumentCreateTransition], + Replace: [DocumentReplaceTransition], + Delete: [DocumentDeleteTransition], + Transfer: [DocumentTransferTransition], + UpdatePrice: [DocumentUpdatePriceTransition], + Purchase: [DocumentPurchaseTransition], +})); +export const DocumentsBatchTransitionV0 = Struct("DocumentsBatchTransitionV0", { + owner_id: Identifier, + transitions: Vec(DocumentTransition), + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_create_state_transition" + */ +export const IdentityCreateTransition = Enum("IdentityCreateTransition", /** @type {const} */ ({ + V0: [IdentityCreateTransitionV0], +})); +/** platform_serialize unversioned */ +export const MasternodeVoteTransitionV0 = Struct("MasternodeVoteTransitionV0", { + pro_tx_hash: Identifier, + voter_identity_id: Identifier, + vote: Vote, + nonce: IdentityNonce, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.documents_batch_state_transition" + */ +export const DocumentsBatchTransition = Enum("DocumentsBatchTransition", /** @type {const} */ ({ + V0: [DocumentsBatchTransitionV0], +})); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.masternode_vote_state_transition" + */ +export const MasternodeVoteTransition = Enum("MasternodeVoteTransition", /** @type {const} */ ({ + V0: [MasternodeVoteTransitionV0], +})); +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const StateTransition = Enum("StateTransition", /** @type {const} */ ({ + DataContractCreate: [DataContractCreateTransition], + DataContractUpdate: [DataContractUpdateTransition], + DocumentsBatch: [DocumentsBatchTransition], + IdentityCreate: [IdentityCreateTransition], + IdentityTopUp: [IdentityTopUpTransition], + IdentityCreditWithdrawal: [IdentityCreditWithdrawalTransition], + IdentityUpdate: [IdentityUpdateTransition], + IdentityCreditTransfer: [IdentityCreditTransferTransition], + MasternodeVote: [MasternodeVoteTransition], +})); +// NOT NEEDED: AddOperation +// NOT NEEDED: AddrV2 +// NOT NEEDED: AddrV2Message +// NOT NEEDED: DUPLICATE_Address +// NOT NEEDED: AddressEncoding +// NOT NEEDED: AddressInner +// NOT NEEDED: AddressType +// NOT NEEDED: All +// NOT NEEDED: Amount +// NOT NEEDED: Annex +// NOT NEEDED: ArrayDeserializer +// NOT NEEDED: ArrayItemType +// NOT NEEDED: AssetLockOutputNotFoundError +// NOT NEEDED: AssetLockProofType +// NOT NEEDED: AssetLockTransactionIsNotFoundError +// NOT NEEDED: AssetLockValue +// NOT NEEDED: AssetLockValueV0 +// NOT NEEDED: AssetUnlockBaseTransactionInfo +// NOT NEEDED: BalanceChange +// NOT NEEDED: BalanceChangeForIdentity +// NOT NEEDED: BalanceIsNotEnoughError +// NOT NEEDED: BasicBLSError +// NOT NEEDED: BasicECDSAError +// NOT NEEDED: BasicError +// NOT NEEDED: BinVisitor +// NOT NEEDED: BinWriter +// NOT NEEDED: Bip34Error +// NOT NEEDED: BitStreamReader +// NOT NEEDED: BitStreamWriter +// NOT NEEDED: Block +// NOT NEEDED: BlockFilter +// NOT NEEDED: BlockFilterReader +// NOT NEEDED: BlockFilterWriter +// NOT NEEDED: BlockHeight +// NOT NEEDED: BlockInfo +// NOT NEEDED: BlockTransactions +// NOT NEEDED: BlockTransactionsRequest +// NOT NEEDED: BlockTxn +// NOT NEEDED: BloomFlags +// NOT NEEDED: BorrowedPair +// NOT NEEDED: Builder +// NOT NEEDED: ByteArrayKeyword +// NOT NEEDED: ByteArrayPropertySizes +// NOT NEEDED: Bytes +// NOT NEEDED: Bytes20 +// NOT NEEDED: Bytes32 +// NOT NEEDED: Bytes36 +// NOT NEEDED: BytesPerEpoch +// NOT NEEDED: BytesPerEpochByIdentifier +// NOT NEEDED: CFCheckpt +// NOT NEEDED: CFHeaders +// NOT NEEDED: CFilter +// NOT NEEDED: CachedEpochIndexFeeVersions +// NOT NEEDED: CachedEpochIndexFeeVersionsFieldsBeforeVersion4 +// NOT NEEDED: CborCanonicalMap +// NOT NEEDED: ChainCode +// NOT NEEDED: ChainHash +// NOT NEEDED: ChainLock +// NOT NEEDED: CheckedData +// NOT NEEDED: ChildNumber +// NOT NEEDED: Class +// NOT NEEDED: ClassifyContext +// NOT NEEDED: ClientDataRetrievalError +// NOT NEEDED: CmpctBlock +// NOT NEEDED: CommandString +// NOT NEEDED: CommandStringError +// NOT NEEDED: CommonCache +// NOT NEEDED: CompactTarget +// NOT NEEDED: CompatibleProtocolVersionIsNotDefinedError +// NOT NEEDED: ConfirmedHash +// NOT NEEDED: ConfirmedHashHashedWithProRegTx +// NOT NEEDED: ConsensusError +// NOT NEEDED: ConsensusValidationResult +// NOT NEEDED: Contender +// NOT NEEDED: ContenderV0 +// NOT NEEDED: ContenderWithSerializedDocument +// NOT NEEDED: ContenderWithSerializedDocumentV0 +// NOT NEEDED: ContestedDocumentVotePollStatus +// NOT NEEDED: ContestedDocumentVotePollStoredInfo +// NOT NEEDED: ContestedDocumentVotePollStoredInfoV0 +// NOT NEEDED: ContestedDocumentVotePollStoredInfoVoteEventV0 +// NOT NEEDED: ContestedDocumentVotePollWinnerInfo +// NOT NEEDED: ContestedDocumentsTemporarilyNotAllowedError +// NOT NEEDED: ContestedIndexFieldMatch +// NOT NEEDED: ContestedIndexInformation +// NOT NEEDED: ContestedIndexResolution +// NOT NEEDED: ContestedUniqueIndexOnMutableDocumentTypeError +// NOT NEEDED: ContestedUniqueIndexWithUniqueIndexError +// NOT NEEDED: ContractBoundsType +// NOT NEEDED: ControlBlock +// NOT NEEDED: ConversionError +// NOT NEEDED: CopyOperation +// NOT NEEDED: DUPLICATE_CoreBlockHeight +// NOT NEEDED: CreatedDataContract +// NOT NEEDED: CreatedDataContractInSerializationFormat +// NOT NEEDED: CreatedDataContractInSerializationFormatV0 +// NOT NEEDED: CreatedDataContractV0 +// NOT NEEDED: CreationRestrictionMode +// NOT NEEDED: CreditsPerEpoch +// NOT NEEDED: CreditsPerEpochByIdentifier +// NOT NEEDED: CycleHash +// NOT NEEDED: DKGParams +// NOT NEEDED: DPPError +// NOT NEEDED: DUPLICATE_DashPlatformProtocol +// NOT NEEDED: DashPlatformProtocolInitError +// NOT NEEDED: DataBuilder +// NOT NEEDED: DataContract +// NOT NEEDED: DataContractAlreadyPresentError +// NOT NEEDED: DataContractBoundsNotPresentError +// NOT NEEDED: DataContractConfigUpdateError +// NOT NEEDED: DataContractCreateTransitionLatest +// NOT NEEDED: DataContractError +// NOT NEEDED: DataContractFacade +// NOT NEEDED: DataContractFactory +// NOT NEEDED: DataContractFactoryV0 +// NOT NEEDED: DataContractHaveNewUniqueIndexError +// NOT NEEDED: DataContractImmutablePropertiesUpdateError +// NOT NEEDED: DataContractInvalidIndexDefinitionUpdateError +// NOT NEEDED: DataContractIsReadonlyError +// NOT NEEDED: DataContractMaxDepthExceedError +// NOT NEEDED: DUPLICATE_DataContractNotPresentError +// NOT NEEDED: DataContractUniqueIndicesChangedError +// NOT NEEDED: DataContractUpdatePermissionError +// NOT NEEDED: DataContractUpdateTransitionLatest +// NOT NEEDED: DataContractV0 +// NOT NEEDED: DataTriggerConditionError +// NOT NEEDED: DataTriggerError +// NOT NEEDED: DataTriggerExecutionError +// NOT NEEDED: DataTriggerInvalidResultError +// NOT NEEDED: DUPLICATE_DecodeError +// NOT NEEDED: DecodeInitError +// NOT NEEDED: DecodeProtocolIdentity +// NOT NEEDED: Decoder +// NOT NEEDED: DecodingError +// NOT NEEDED: DefaultEntropyGenerator +// NOT NEEDED: DeletedQuorum +// NOT NEEDED: Denomination +// NOT NEEDED: DerivationPath +// NOT NEEDED: DerivationPathIterator +// NOT NEEDED: DerivationPathReference +// NOT NEEDED: Deserializer +// NOT NEEDED: DisablingKeyIdAlsoBeingAddedInSameTransitionError +// NOT NEEDED: Display +// NOT NEEDED: DisplayExpected +// NOT NEEDED: DisplayStyle +// NOT NEEDED: DisplayUnchecked +// NOT NEEDED: DisplayWrapper +// NOT NEEDED: DistributionAmount +// NOT NEEDED: DistributionLeftovers +// NOT NEEDED: Document +// NOT NEEDED: DocumentAlreadyPresentError +// NOT NEEDED: DocumentContestCurrentlyLockedError +// NOT NEEDED: DocumentContestDocumentWithSameIdAlreadyPresentError +// NOT NEEDED: DocumentContestIdentityAlreadyContestantError +// NOT NEEDED: DocumentContestNotJoinableError +// NOT NEEDED: DocumentContestNotPaidForError +// NOT NEEDED: DocumentCreationNotAllowedError +// NOT NEEDED: DocumentError +// NOT NEEDED: DocumentFacade +// NOT NEEDED: DocumentFactory +// NOT NEEDED: DocumentFactoryV0 +// NOT NEEDED: DocumentFieldFillSize +// NOT NEEDED: DocumentFieldFillType +// NOT NEEDED: DocumentFieldMaxSizeExceededError +// NOT NEEDED: DocumentForCbor +// NOT NEEDED: DocumentIncorrectPurchasePriceError +// NOT NEEDED: DocumentNotForSaleError +// NOT NEEDED: DocumentNotFoundError +// NOT NEEDED: DocumentOwnerIdMismatchError +// NOT NEEDED: DocumentPatch +// NOT NEEDED: DocumentProperty +// NOT NEEDED: DocumentPropertyType +// NOT NEEDED: DocumentTimestampWindowViolationError +// NOT NEEDED: DocumentTimestampsAreEqualError +// NOT NEEDED: DocumentTimestampsMismatchError +// NOT NEEDED: DocumentTransitionActionType +// NOT NEEDED: DocumentTransitionsAreAbsentError +// NOT NEEDED: DocumentType +// NOT NEEDED: DocumentTypeMutRef +// NOT NEEDED: DocumentTypeRef +// NOT NEEDED: DocumentTypeUpdateError +// NOT NEEDED: DocumentTypeV0 +// NOT NEEDED: DocumentTypesAreMissingError +// NOT NEEDED: DocumentV0 +// NOT NEEDED: Duffs +// NOT NEEDED: DuplicateDocumentTransitionsWithIdsError +// NOT NEEDED: DuplicateDocumentTransitionsWithIndicesError +// NOT NEEDED: DuplicateIndexError +// NOT NEEDED: DuplicateIndexNameError +// NOT NEEDED: DuplicateUniqueIndexError +// NOT NEEDED: DuplicatedIdentityPublicKeyBasicError +// NOT NEEDED: DuplicatedIdentityPublicKeyIdBasicError +// NOT NEEDED: DuplicatedIdentityPublicKeyIdStateError +// NOT NEEDED: DuplicatedIdentityPublicKeyStateError +// NOT NEEDED: DUPLICATE_EcdsaSighashType +// NOT NEEDED: EmptyWrite +// NOT NEEDED: EncodeSigningDataResult +// NOT NEEDED: Encoder +// NOT NEEDED: Encoding +// NOT NEEDED: EntryMasternodeType +// NOT NEEDED: Epoch +// NOT NEEDED: EpochIndex +// NOT NEEDED: EpochIndexFeeVersionsForStorage +// NOT NEEDED: DUPLICATE_Error +// NOT NEEDED: ErrorTrackingWriter +// NOT NEEDED: ExpectedDocumentsData +// NOT NEEDED: ExtendedBlockInfo +// NOT NEEDED: ExtendedBlockInfoV0 +// NOT NEEDED: ExtendedDocument +// NOT NEEDED: ExtendedDocumentV0 +// NOT NEEDED: ExtendedDocumentVisitor +// NOT NEEDED: ExtendedEpochInfo +// NOT NEEDED: ExtendedEpochInfoV0 +// NOT NEEDED: ExtendedPrivKey +// NOT NEEDED: ExtendedPubKey +// NOT NEEDED: FeeError +// NOT NEEDED: FeeRate +// NOT NEEDED: FeeRefunds +// NOT NEEDED: FeeResult +// NOT NEEDED: FetchAndValidateDataContract +// NOT NEEDED: FieldMinMaxBounds +// NOT NEEDED: FieldType +// NOT NEEDED: FieldTypeWeights +// NOT NEEDED: FilterAdd +// NOT NEEDED: FilterHash +// NOT NEEDED: FilterHeader +// NOT NEEDED: FilterLoad +// NOT NEEDED: FinalizedContender +// NOT NEEDED: FinalizedContenderWithSerializedDocument +// NOT NEEDED: FinalizedResourceVoteChoicesWithVoterInfo +// NOT NEEDED: Fingerprint +// NOT NEEDED: FormatOptions +// NOT NEEDED: FromHexError +// NOT NEEDED: FutureLeafVersion +// NOT NEEDED: GcsFilter +// NOT NEEDED: GcsFilterReader +// NOT NEEDED: GcsFilterWriter +// NOT NEEDED: GetBlockTxn +// NOT NEEDED: GetBlocksMessage +// NOT NEEDED: GetCFCheckpt +// NOT NEEDED: GetCFHeaders +// NOT NEEDED: GetCFilters +// NOT NEEDED: GetDataContractSecurityLevelRequirementFn +// NOT NEEDED: GetHeadersMessage +// NOT NEEDED: GetKeyError +// NOT NEEDED: GetMnListDiff +// NOT NEEDED: GetQRInfo +// NOT NEEDED: HRVisitor +// NOT NEEDED: Header +// NOT NEEDED: HeaderAndShortIds +// NOT NEEDED: HeaderDeserializationWrapper +// NOT NEEDED: HeaderSerializationWrapper +// NOT NEEDED: DUPLICATE_Height +// NOT NEEDED: Hex +// NOT NEEDED: HiddenNodes +// NOT NEEDED: IHeader +// NOT NEEDED: IdentitiesContractKeys +// NOT NEEDED: Identity +// NOT NEEDED: IdentityAlreadyExistsError +// NOT NEEDED: IdentityAssetLockProofLockedTransactionMismatchError +// NOT NEEDED: IdentityAssetLockStateTransitionReplayError +// NOT NEEDED: IdentityAssetLockTransactionIsNotFoundError +// NOT NEEDED: IdentityAssetLockTransactionOutPointAlreadyConsumedError +// NOT NEEDED: IdentityAssetLockTransactionOutPointNotEnoughBalanceError +// NOT NEEDED: IdentityAssetLockTransactionOutputNotFoundError +// NOT NEEDED: IdentityCreateTransitionLatest +// NOT NEEDED: IdentityCreateTransitionV0Inner +// NOT NEEDED: IdentityCreditTransferToSelfError +// NOT NEEDED: IdentityCreditTransferTransitionLatest +// NOT NEEDED: IdentityCreditWithdrawalTransitionLatest +// NOT NEEDED: IdentityCreditWithdrawalTransitionV01 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV010 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV02 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV03 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV04 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV05 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV06 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV07 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV08 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV09 +// NOT NEEDED: IdentityFacade +// NOT NEEDED: IdentityFactory +// NOT NEEDED: IdentityInsufficientBalanceError +// NOT NEEDED: IdentityNotFoundError +// NOT NEEDED: IdentityNotPresentError +// NOT NEEDED: IdentityPublicKeyAlreadyExistsForUniqueContractBoundsError +// NOT NEEDED: IdentityPublicKeyIsDisabledError +// NOT NEEDED: IdentityPublicKeyIsReadOnlyError +// NOT NEEDED: IdentityV0 +// NOT NEEDED: IncompatibleDataContractSchemaError +// NOT NEEDED: IncompatibleDocumentTypeSchemaError +// NOT NEEDED: IncompatibleJsonSchemaOperation +// NOT NEEDED: IncompatibleProtocolVersionError +// NOT NEEDED: IncompatibleRe2PatternError +// NOT NEEDED: IncompleteBuilder +// NOT NEEDED: InconsistentCompoundIndexDataError +// NOT NEEDED: Index +// NOT NEEDED: IndexConstPath +// NOT NEEDED: IndexLevel +// NOT NEEDED: IndexLevelTypeInfo +// NOT NEEDED: IndexName +// NOT NEEDED: IndexOrderDirection +// NOT NEEDED: IndexProperties +// NOT NEEDED: IndexProperty +// NOT NEEDED: IndexPropertyName +// NOT NEEDED: IndexType +// NOT NEEDED: Input +// NOT NEEDED: InputWeightPrediction +// NOT NEEDED: DUPLICATE_InstantLock +// NOT NEEDED: Instruction +// NOT NEEDED: InstructionIndices +// NOT NEEDED: Instructions +// NOT NEEDED: IntegerReplacementType +// NOT NEEDED: InvalidAssetLockProofCoreChainHeightError +// NOT NEEDED: InvalidAssetLockProofTransactionHeightError +// NOT NEEDED: InvalidAssetLockTransactionOutputReturnSizeError +// NOT NEEDED: InvalidCompoundIndexError +// NOT NEEDED: InvalidDataContractIdError +// NOT NEEDED: InvalidDataContractVersionError +// NOT NEEDED: InvalidDocumentRevisionError +// NOT NEEDED: InvalidDocumentTransitionActionError +// NOT NEEDED: InvalidDocumentTransitionIdError +// NOT NEEDED: DUPLICATE_InvalidDocumentTypeError +// NOT NEEDED: InvalidDocumentTypeNameError +// NOT NEEDED: InvalidDocumentTypeRequiredSecurityLevelError +// NOT NEEDED: InvalidIdentifierError +// NOT NEEDED: InvalidIdentityAssetLockProofChainLockValidationError +// NOT NEEDED: InvalidIdentityAssetLockTransactionError +// NOT NEEDED: InvalidIdentityAssetLockTransactionOutputError +// NOT NEEDED: InvalidIdentityCreditTransferAmountError +// NOT NEEDED: InvalidIdentityCreditWithdrawalTransitionAmountError +// NOT NEEDED: InvalidIdentityCreditWithdrawalTransitionCoreFeeError +// NOT NEEDED: InvalidIdentityCreditWithdrawalTransitionOutputScriptError +// NOT NEEDED: InvalidIdentityKeySignatureError +// NOT NEEDED: InvalidIdentityNonceError +// NOT NEEDED: InvalidIdentityPublicKeyDataError +// NOT NEEDED: InvalidIdentityPublicKeyIdError +// NOT NEEDED: InvalidIdentityPublicKeySecurityLevelError +// NOT NEEDED: DUPLICATE_InvalidIdentityPublicKeyTypeError +// NOT NEEDED: InvalidIdentityRevisionError +// NOT NEEDED: InvalidIdentityUpdateTransitionDisableKeysError +// NOT NEEDED: InvalidIdentityUpdateTransitionEmptyError +// NOT NEEDED: InvalidIndexPropertyTypeError +// NOT NEEDED: InvalidIndexedPropertyConstraintError +// NOT NEEDED: InvalidInstantAssetLockProofError +// NOT NEEDED: InvalidInstantAssetLockProofSignatureError +// NOT NEEDED: InvalidJsonSchemaRefError +// NOT NEEDED: InvalidSignaturePublicKeyError +// NOT NEEDED: InvalidSignaturePublicKeyPurposeError +// NOT NEEDED: InvalidSignaturePublicKeySecurityLevelError +// NOT NEEDED: InvalidStateTransitionSignatureError +// NOT NEEDED: InvalidStateTransitionTypeError +// NOT NEEDED: InvalidVectorSizeError +// NOT NEEDED: Inventory +// NOT NEEDED: IoWrapper +// NOT NEEDED: IsIndexUnique +// NOT NEEDED: Iter +// NOT NEEDED: IterReader +// NOT NEEDED: JsonPath +// NOT NEEDED: JsonPathLiteral +// NOT NEEDED: JsonPathStep +// NOT NEEDED: JsonSchema +// NOT NEEDED: JsonSchemaCompilationError +// NOT NEEDED: DUPLICATE_JsonSchemaError +// NOT NEEDED: JsonSchemaErrorData +// NOT NEEDED: DUPLICATE_JsonSchemaValidator +// NOT NEEDED: JsonStateTransitionSerializationOptions +// NOT NEEDED: Key +// NOT NEEDED: KeyCount +// NOT NEEDED: KeyDerivationType +// NOT NEEDED: KeyRequest +// NOT NEEDED: KeySource +// NOT NEEDED: Keys +// NOT NEEDED: KnownCostItem +// NOT NEEDED: LLMQEntryVerificationSkipStatus +// NOT NEEDED: LLMQEntryVerificationStatus +// NOT NEEDED: LLMQModifierType +// NOT NEEDED: LLMQParams +// NOT NEEDED: LLMQQuarterReconstructionType +// NOT NEEDED: LLMQQuarterType +// NOT NEEDED: LLMQQuarterUsageType +// NOT NEEDED: LeafNode +// NOT NEEDED: LeafNodes +// NOT NEEDED: LeafVersion +// NOT NEEDED: LegacySighash +// NOT NEEDED: DUPLICATE_LockTime +// NOT NEEDED: LockTimeUnit +// NOT NEEDED: LockedVotePollCounter +// NOT NEEDED: Lower +// NOT NEEDED: MNSkipListMode +// NOT NEEDED: MapKeySerializer +// NOT NEEDED: MasterPublicKeyUpdateError +// NOT NEEDED: MasternodeIncorrectVoterIdentityIdError +// NOT NEEDED: MasternodeIncorrectVotingAddressError +// NOT NEEDED: MasternodeList +// NOT NEEDED: MasternodeListBuilder +// NOT NEEDED: MasternodeListEngine +// NOT NEEDED: MasternodeListEntry +// NOT NEEDED: MasternodeNotFoundError +// NOT NEEDED: MasternodeVoteAlreadyPresentError +// NOT NEEDED: MasternodeVoteTransitionLatest +// NOT NEEDED: MasternodeVotedTooManyTimesError +// NOT NEEDED: MaxDepthValidationResult +// NOT NEEDED: MaxDocumentsTransitionsExceededError +// NOT NEEDED: MaxIdentityPublicKeyLimitReachedError +// NOT NEEDED: MergeIdentityNonceResult +// NOT NEEDED: MerkleBlock +// NOT NEEDED: MerkleBlockError +// NOT NEEDED: MessageSignature +// NOT NEEDED: MessageSignatureError +// NOT NEEDED: MessageVerificationError +// NOT NEEDED: Metadata +// NOT NEEDED: MissingDataContractIdBasicError +// NOT NEEDED: MissingDocumentTransitionActionError +// NOT NEEDED: MissingDocumentTransitionTypeError +// NOT NEEDED: MissingDocumentTypeError +// NOT NEEDED: MissingIdentityPublicKeyIdsError +// NOT NEEDED: MissingMasterPublicKeyError +// NOT NEEDED: MissingPositionsInDocumentTypePropertiesError +// NOT NEEDED: MissingPublicKeyError +// NOT NEEDED: MissingStateTransitionTypeError +// NOT NEEDED: MissingTransferKeyError +// NOT NEEDED: MnListDiff +// NOT NEEDED: MoveOperation +// NOT NEEDED: NativeBlsModule +// NOT NEEDED: Network +// NOT NEEDED: NetworkChecked +// NOT NEEDED: NetworkMessage +// NOT NEEDED: NetworkUnchecked +// NOT NEEDED: NoTransferKeyForCoreWithdrawalAvailableError +// NOT NEEDED: NodeInfo +// NOT NEEDED: NonConsensusError +// NOT NEEDED: DUPLICATE_NonStandardSighashType +// NOT NEEDED: NonceOutOfBoundsError +// NOT NEEDED: NotImplementedIdentityCreditWithdrawalTransitionPoolingError +// NOT NEEDED: OperationError +// NOT NEEDED: OperatorPublicKey +// NOT NEEDED: OrderBy +// NOT NEEDED: Output +// NOT NEEDED: OutputType +// NOT NEEDED: OverflowError +// NOT NEEDED: OwnedPair +// NOT NEEDED: Pair +// NOT NEEDED: Params +// NOT NEEDED: ParentDocumentOptions +// NOT NEEDED: ParseAmountError +// NOT NEEDED: ParseIntError +// NOT NEEDED: ParseNetworkError +// NOT NEEDED: ParseOutPointError +// NOT NEEDED: PartialIdentity +// NOT NEEDED: PartialMerkleTree +// NOT NEEDED: PartiallySignedTransaction +// NOT NEEDED: PastAssetLockStateTransitionHashes +// NOT NEEDED: Patch +// NOT NEEDED: PatchDiffer +// NOT NEEDED: PatchError +// NOT NEEDED: PatchErrorKind +// NOT NEEDED: PatchOperation +// NOT NEEDED: Payload +// NOT NEEDED: PlatformItemKey +// NOT NEEDED: PreferredKeyPurposeForSigningWithdrawal +// NOT NEEDED: PrefilledTransaction +// NOT NEEDED: PrefundedSpecializedBalanceIdentifier +// NOT NEEDED: PrefundedSpecializedBalanceInsufficientError +// NOT NEEDED: PrefundedSpecializedBalanceNotFoundError +// NOT NEEDED: Prevouts +// NOT NEEDED: PrivateKey +// NOT NEEDED: ProTxHash +// NOT NEEDED: PropertyPath +// NOT NEEDED: ProprietaryKey +// NOT NEEDED: ProprietaryType +// NOT NEEDED: ProtocolError +// NOT NEEDED: ProtocolValidationOperation +// NOT NEEDED: ProtocolVersion +// NOT NEEDED: ProtocolVersionParsingError +// NOT NEEDED: ProtocolVersionVoteCount +// NOT NEEDED: Psbt +// NOT NEEDED: PsbtHash +// NOT NEEDED: PsbtParseError +// NOT NEEDED: PsbtSighashType +// NOT NEEDED: PublicKey +// NOT NEEDED: PublicKeyIsDisabledError +// NOT NEEDED: PublicKeyMismatchError +// NOT NEEDED: DUPLICATE_PublicKeySecurityLevelNotMetError +// NOT NEEDED: PublicKeyValidationError +// NOT NEEDED: PushBytes +// NOT NEEDED: PushBytesBuf +// NOT NEEDED: DUPLICATE_PushBytesError +// NOT NEEDED: PushDataLenLen +// NOT NEEDED: QRInfo +// NOT NEEDED: QualifiedMasternodeListEntry +// NOT NEEDED: QualifiedQuorumEntry +// NOT NEEDED: QuorumCLSigObject +// NOT NEEDED: QuorumCommitmentHash +// NOT NEEDED: QuorumEntryHash +// NOT NEEDED: QuorumModifierHash +// NOT NEEDED: QuorumOrderingHash +// NOT NEEDED: QuorumSigningRequestId +// NOT NEEDED: QuorumSigningSignId +// NOT NEEDED: QuorumSnapshot +// NOT NEEDED: QuorumValidationError +// NOT NEEDED: RandomDocumentTypeParameters +// NOT NEEDED: RawAssetLockProof +// NOT NEEDED: RawNetworkMessage +// NOT NEEDED: ReadBytesFromFiniteReaderOpts +// NOT NEEDED: Reject +// NOT NEEDED: RejectReason +// NOT NEEDED: RemoveOperation +// NOT NEEDED: ReplaceOperation +// NOT NEEDED: ReplacementType +// NOT NEEDED: SMLEntry +// NOT NEEDED: SMLStore +// NOT NEEDED: Script +// NOT NEEDED: ScriptHash +// NOT NEEDED: ScriptLeaf +// NOT NEEDED: ScriptLeaves +// NOT NEEDED: ScriptMerkleProofMap +// NOT NEEDED: ScriptPath +// NOT NEEDED: SegwitCache +// NOT NEEDED: SegwitV0Sighash +// NOT NEEDED: SendCmpct +// NOT NEEDED: SeqIterator +// NOT NEEDED: SerdeParsingError +// NOT NEEDED: SerializeBytesAsHex +// NOT NEEDED: SerializeMap +// NOT NEEDED: SerializeStructVariant +// NOT NEEDED: SerializeTupleVariant +// NOT NEEDED: SerializeVec +// NOT NEEDED: SerializedObjectParsingError +// NOT NEEDED: SerializedSignature +// NOT NEEDED: Serializer +// NOT NEEDED: ServiceFlags +// NOT NEEDED: Sha256dHash +// NOT NEEDED: ShortId +// NOT NEEDED: ShouldInsertWithAllNull +// NOT NEEDED: SigHashCache +// NOT NEEDED: SigHashType +// NOT NEEDED: SighashCache +// NOT NEEDED: SighashComponents +// NOT NEEDED: DUPLICATE_SighashTypeParseError +// NOT NEEDED: SignError +// NOT NEEDED: SignableBytesHasher +// NOT NEEDED: DUPLICATE_Signature +// NOT NEEDED: SignatureError +// NOT NEEDED: SignatureShouldNotBePresentError +// NOT NEEDED: SignedAmount +// NOT NEEDED: SignedCredits +// NOT NEEDED: SignedCreditsPerEpoch +// NOT NEEDED: SigningAlgorithm +// NOT NEEDED: SigningErrors +// NOT NEEDED: SigningKeys +// NOT NEEDED: SimpleConsensusValidationResult +// NOT NEEDED: SimpleValidationResult +// NOT NEEDED: SimplifiedMNList +// NOT NEEDED: Sink +// NOT NEEDED: SmallVec +// NOT NEEDED: SmlError +// NOT NEEDED: SortKey +// NOT NEEDED: SpecialTransactionPayloadHash +// NOT NEEDED: SpecializedDocumentFactory +// NOT NEEDED: SpecializedDocumentFactoryV0 +// NOT NEEDED: SplitFeatureVersionOutcome +// NOT NEEDED: StateError +// NOT NEEDED: StateTransitionError +// NOT NEEDED: StateTransitionFactory +// NOT NEEDED: StateTransitionIsNotSignedError +// NOT NEEDED: StateTransitionMaxSizeExceededError +// NOT NEEDED: StateTransitionProofResult +// NOT NEEDED: StateTransitionType +// NOT NEEDED: StatelessJsonSchemaLazyValidator +// NOT NEEDED: StoredAssetLockInfo +// NOT NEEDED: StringPropertySizes +// NOT NEEDED: SubValidator +// NOT NEEDED: SystemPropertyIndexAlreadyPresentError +// NOT NEEDED: TapLeaf +// NOT NEEDED: TapSighashType +// NOT NEEDED: TapTree +// NOT NEEDED: TaprootBuilder +// NOT NEEDED: TaprootBuilderError +// NOT NEEDED: TaprootCache +// NOT NEEDED: TaprootError +// NOT NEEDED: TaprootMerkleBranch +// NOT NEEDED: TaprootSpendInfo +// NOT NEEDED: Target +// NOT NEEDED: TestConsensusError +// NOT NEEDED: DUPLICATE_TestData +// NOT NEEDED: TestOperation +// NOT NEEDED: DUPLICATE_Time +// NOT NEEDED: TimestampIncluded +// NOT NEEDED: TooManyMasterPublicKeyError +// NOT NEEDED: TotalCreditsBalance +// NOT NEEDED: TradeMode +// NOT NEEDED: Transferable +// NOT NEEDED: TransitionFingerprint +// NOT NEEDED: TryFromError +// NOT NEEDED: TweakedKeyPair +// NOT NEEDED: TweakedPublicKey +// NOT NEEDED: TxIn +// NOT NEEDED: TxIndexOutOfRangeError +// NOT NEEDED: TxMerkleNode +// NOT NEEDED: Type +// NOT NEEDED: U256 +// NOT NEEDED: UintError +// NOT NEEDED: UndefinedIndexPropertyError +// NOT NEEDED: UniqueIndicesLimitReachedError +// NOT NEEDED: UnknownAssetLockProofTypeError +// NOT NEEDED: UnknownChainHash +// NOT NEEDED: UnknownDocumentCreationRestrictionModeError +// NOT NEEDED: UnknownSecurityLevelError +// NOT NEEDED: UnknownStorageKeyRequirementsError +// NOT NEEDED: UnknownTradeModeError +// NOT NEEDED: UnknownTransferableTypeError +// NOT NEEDED: UnsupportedFeatureError +// NOT NEEDED: UnsupportedProtocolVersionError +// NOT NEEDED: UnsupportedVersionError +// NOT NEEDED: UntweakedKeyPair +// NOT NEEDED: UntweakedPublicKey +// NOT NEEDED: Upper +// NOT NEEDED: UpperWriter +// NOT NEEDED: DUPLICATE_UsedKeyMatrix +// NOT NEEDED: ValidationResult +// NOT NEEDED: Validator +// NOT NEEDED: ValidatorSet +// NOT NEEDED: ValidatorSetV0 +// NOT NEEDED: ValidatorV0 +// NOT NEEDED: ValueError +// NOT NEEDED: ValueMapDeserializer +// NOT NEEDED: VarInt +// NOT NEEDED: Version +// NOT NEEDED: VersionError +// NOT NEEDED: VersionMessage +// NOT NEEDED: Visitor +// NOT NEEDED: VotePollNotAvailableForVotingError +// NOT NEEDED: VotePollNotFoundError +// NOT NEEDED: WPubkeyHash +// NOT NEEDED: WScriptHash +// NOT NEEDED: Weight +// NOT NEEDED: With +// NOT NEEDED: WithdrawalOutputScriptNotAllowedWhenSigningWithOwnerKeyError +// NOT NEEDED: WithdrawalTransactionIndex +// NOT NEEDED: WithdrawalTransactionIndexAndBytes +// NOT NEEDED: Witness +// NOT NEEDED: WitnessCommitment +// NOT NEEDED: WitnessMerkleNode +// NOT NEEDED: WitnessProgram +// NOT NEEDED: WitnessVersion +// NOT NEEDED: Work +// NOT NEEDED: DUPLICATE_WrongPublicKeyPurposeError +// NOT NEEDED: Wtxid +// NOT NEEDED: XpubIdentifier +// NOT NEEDED: YesNoAbstainVoteChoice diff --git a/built/DashPlatform.js/2-create-identity-transition.d.ts b/built/DashPlatform.js/2-create-identity-transition.d.ts new file mode 100644 index 0000000..3d717e7 --- /dev/null +++ b/built/DashPlatform.js/2-create-identity-transition.d.ts @@ -0,0 +1,68 @@ +/** + * @typedef AssetLockChainProof + * @prop {Number} core_chain_locked_height + * @prop {Object} out_point + * @prop {String} out_point.txid + * @prop {Number} out_point.vout + */ +/** + * @param {import('dashhd').HDWallet} assetKey + * @param {import('dashhd').HDWallet} masterKey + * @param {import('dashhd').HDWallet} otherKey + * @param {String} identityIdHex + * @param {String} txidHex + * @param {DashBincode.AssetLockProof} [assetProof] + */ +export function createIdentityFromAssetLock(assetKey: any, masterKey: any, otherKey: any, identityIdHex: string, txidHex: string, assetLockProof: any): Promise; +export type AssetLockChainProof = { + core_chain_locked_height: number; + out_point: { + txid: string; + vout: number; + }; +}; +export type EvoKey = { + id: Uint8; + /** + * - TODO constrain to members of KEY_TYPES + */ + type: DashBincode.KeyType; + /** + * - TODO constrain to members of KEY_PURPOSES + */ + purpose: DashBincode.Purpose; + /** + * - TODO constrain to members of KEY_LEVELS + */ + securityLevel: DashBincode.SecurityLevel; + readOnly: boolean; + publicKey: Uint8Array; + privateKey: Uint8Array; +}; +export type STKey = { + id: Uint8; + /** + * - TODO constrain to members of KEY_TYPES + */ + type: DashBincode.KeyType; + /** + * - TODO constrain to members of KEY_PURPOSES + */ + purpose: DashBincode.Purpose; + /** + * - base64-encoded publicKey (compact) + */ + data: Base64; + /** + * - TODO constrain to members of KEY_LEVELS + */ + securityLevel: DashBincode.SecurityLevel; + readOnly: boolean; +}; +export type Base58 = string; +export type Base64 = string; +export type HexString = string; +export type Uint53 = number; +export type Uint32 = number; +export type Uint8 = number; +import * as DashBincode from "./1.8.1/generated_bincode.js"; diff --git a/built/DashPlatform.js/2-create-identity-transition.js b/built/DashPlatform.js/2-create-identity-transition.js new file mode 100644 index 0000000..a6659fc --- /dev/null +++ b/built/DashPlatform.js/2-create-identity-transition.js @@ -0,0 +1,214 @@ +// import DashKeys from "dashkeys"; +import * as DashTx from "dashtx"; +import * as Bincode from "./src/bincode.js"; +import * as DashBincode from "./1.8.1/generated_bincode.js"; +import * as KeyUtils from "./src/key-utils.js"; +import baseX from "base-x"; +const BASE58 = `123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`; +let base58 = baseX(BASE58); +/** + * @typedef AssetLockChainProof + * @prop {Number} core_chain_locked_height + * @prop {Object} out_point + * @prop {String} out_point.txid + * @prop {Number} out_point.vout + */ +/** + * @param {import('dashhd').HDWallet} assetKey + * @param {import('dashhd').HDWallet} masterKey + * @param {import('dashhd').HDWallet} otherKey + * @param {String} identityIdHex + * @param {String} txidHex + * @param {DashBincode.AssetLockProof} [assetProof] + */ +export async function createIdentityFromAssetLock(assetKey, masterKey, otherKey, identityIdHex, txidHex, assetLockProof) { + // const INSTANT_ALP = 0; + // const CHAIN_ALP = 1; + if (!masterKey.privateKey) { + throw new Error("'masterKey' is missing 'privateKey'"); + } + if (!otherKey.privateKey) { + throw new Error("'otherKey' is missing 'privateKey'"); + } + let identityKeys = await getKnownIdentityKeys({ privateKey: masterKey.privateKey, publicKey: masterKey.publicKey }, { privateKey: otherKey.privateKey, publicKey: otherKey.publicKey }); + let stKeys = getIdentityTransitionKeys(identityKeys); + let identityCreate = DashBincode.IdentityCreateTransitionV0({ + //protocolVersion: L2_VERSION_PLATFORM, + // $version: L2_VERSION_PLATFORM.toString(), + // type: ST_CREATE_IDENTITY, + // ecdsaSig(assetLockPrivateKey, CBOR(thisStateTransition)) + // "signature":"IBTTgge+/VDa/9+n2q3pb4tAqZYI48AX8X3H/uedRLH5dN8Ekh/sxRRQQS9LaOPwZSCVED6XIYD+vravF2dhYOE=", + asset_lock_proof: assetLockProof, + // publicKeys: stKeys, + public_keys: stKeys, + // [ + // { + // id: 0, + // type: 0, + // purpose: 0, + // securityLevel: 0, + // data: "AkWRfl3DJiyyy6YPUDQnNx5KERRnR8CoTiFUvfdaYSDS", + // readOnly: false, + // }, + // ], + identity_id: DashBincode.Identifier(DashBincode.IdentifierBytes32(DashTx.utils.hexToBytes(identityIdHex))), + user_fee_increase: 0, + signature: DashBincode.BinaryData(new Uint8Array), + }); + let stateTransition = DashBincode.StateTransition.IdentityCreate(DashBincode.IdentityCreateTransition.V0(identityCreate)); + console.log(`stKeys:`); + console.log(stKeys); + let nullSigTransition = new Uint8Array(Bincode.encode(DashBincode.StateTransition, stateTransition, { + signable: true, + })); + console.log(); + console.log(`nullSigTransition (ready-to-sign by identity keys):`); + console.log('(hex)', DashTx.utils.bytesToHex(nullSigTransition)); + console.log('(base64)', bytesToBase64(nullSigTransition)); + let nullSigMagicHash = await KeyUtils.doubleSha256(nullSigTransition); + if (!assetKey.privateKey) { + throw new Error("'assetKey' is missing 'privateKey'"); + } + { + let magicSigBytes = await KeyUtils.magicSign({ + privKeyBytes: assetKey.privateKey, + doubleSha256Bytes: nullSigMagicHash, + }); + identityCreate.signature[0] = magicSigBytes; + } + for (let i = 0; i < identityKeys.length; i += 1) { + let key = identityKeys[i]; + let stPub = identityCreate.public_keys[i]; + let magicSigBytes = await KeyUtils.magicSign({ + privKeyBytes: key.privateKey, + doubleSha256Bytes: nullSigMagicHash, + }); + Bincode.match(stPub, { + V0: ({ 0: stPub0 }) => { + stPub0.signature[0] = magicSigBytes; + } + }); + } + console.log(); + console.log(JSON.stringify(stateTransition, (key, val) => { + if (val instanceof Uint8Array || val instanceof ArrayBuffer) { + return { '@Uint8Array hex': DashTx.utils.bytesToHex(new Uint8Array(val)) }; + } + return val; + }, 2)); + let grpcTransition = ""; + let transitionHashHex = ""; + { + let fullSigTransition = new Uint8Array(Bincode.encode(DashBincode.StateTransition, stateTransition, { + signable: false, + })); + console.log(); + console.log(`transition (fully signed):`); + console.log(DashTx.utils.bytesToHex(fullSigTransition)); + let transitionHash = await KeyUtils.sha256(fullSigTransition); + transitionHashHex = DashTx.utils.bytesToHex(transitionHash); + grpcTransition = bytesToBase64(fullSigTransition); + } + console.log(); + console.log(); + console.log(`grpcurl -plaintext -d '{ + "stateTransition": "${grpcTransition}" +}' seed-2.testnet.networks.dash.org:1443 org.dash.platform.dapi.v0.Platform.broadcastStateTransition`); + console.log(); + let identityIdBytes = DashTx.utils.hexToBytes(identityIdHex); + let identity = base58.encode(identityIdBytes); + console.log(`https://testnet.platform-explorer.com/identity/${identity}`); + console.log(`https://testnet.platform-explorer.com/transaction/${transitionHashHex}`); +} +; +/** + * @param {Required>} masterKey + * @param {Required>} otherKey + * @returns {Promise>} + */ +async function getKnownIdentityKeys(masterKey, otherKey) { + if (!masterKey.privateKey) { + throw new Error("linter fail"); + } + if (!otherKey.privateKey) { + throw new Error("linter fail"); + } + let keyDescs = [ + // {"$version":"0","id":0,"purpose":0,"securityLevel":0,"contractBounds":null,"type":0,"readOnly":false,"data":[3,58,154,139,30,76,88,26,25,135,114,76,102,151,19,93,49,192,126,231,172,130,126,106,89,206,192,34,176,77,81,5,95],"disabledAt":null} + { + id: 0, + type: DashBincode.KeyType.ECDSA_SECP256K1(), + purpose: DashBincode.Purpose.AUTHENTICATION(), + securityLevel: DashBincode.SecurityLevel.MASTER(), + readOnly: false, + publicKey: masterKey.publicKey, + privateKey: masterKey.privateKey, + data: "", + }, + // {"$version":"0","id":1,"purpose":0,"securityLevel":1,"contractBounds":null,"type":0,"readOnly":false,"data":[2,1,70,3,1,141,196,55,100,45,218,22,244,199,252,80,228,130,221,35,226,70,128,188,179,165,150,108,59,52,56,72,226],"disabledAt":null} + { + id: 1, + type: DashBincode.KeyType.ECDSA_SECP256K1(), + purpose: DashBincode.Purpose.AUTHENTICATION(), + securityLevel: DashBincode.SecurityLevel.CRITICAL(), + readOnly: false, + privateKey: otherKey.privateKey, + publicKey: otherKey.publicKey, + data: "", + }, + ]; + return keyDescs; +} +/** + * @typedef EvoKey + * @prop {Uint8} id + * @prop {DashBincode.KeyType} type - TODO constrain to members of KEY_TYPES + * @prop {DashBincode.Purpose} purpose - TODO constrain to members of KEY_PURPOSES + * @prop {DashBincode.SecurityLevel} securityLevel - TODO constrain to members of KEY_LEVELS + * @prop {Boolean} readOnly + * @prop {Uint8Array} publicKey + * @prop {Uint8Array} privateKey + */ +/** + * @typedef STKey + * @prop {Uint8} id + * @prop {DashBincode.KeyType} type - TODO constrain to members of KEY_TYPES + * @prop {DashBincode.Purpose} purpose - TODO constrain to members of KEY_PURPOSES + * @prop {Base64} data - base64-encoded publicKey (compact) + * @prop {DashBincode.SecurityLevel} securityLevel - TODO constrain to members of KEY_LEVELS + * @prop {Boolean} readOnly + */ +/** + * @param {Array} identityKeys - TODO + * @returns {Array} + */ +function getIdentityTransitionKeys(identityKeys) { + let stKeys = []; + for (let key of identityKeys) { + let stKey = DashBincode.IdentityPublicKeyInCreation.V0(DashBincode.IdentityPublicKeyInCreationV0({ + id: key.id, + key_type: key.type, + purpose: key.purpose, + security_level: key.securityLevel, + contract_bounds: undefined, + read_only: key.readOnly || false, + data: DashBincode.BinaryData(key.publicKey), + signature: DashBincode.BinaryData(new Uint8Array), + })); + stKeys.push(stKey); + } + return stKeys; +} +/** + * @param {Uint8Array} bytes + */ +function bytesToBase64(bytes) { + // @ts-expect-error Uint8Array is close enough to number[] for this to work + return btoa(String.fromCharCode.apply(null, bytes)); +} +/** @typedef {String} Base58 */ +/** @typedef {String} Base64 */ +/** @typedef {String} HexString */ +/** @typedef {Number} Uint53 */ +/** @typedef {Number} Uint32 */ +/** @typedef {Number} Uint8 */ diff --git a/built/DashPlatform.js/2.0.0/generated_bincode.d.ts b/built/DashPlatform.js/2.0.0/generated_bincode.d.ts new file mode 100644 index 0000000..f68f6a7 --- /dev/null +++ b/built/DashPlatform.js/2.0.0/generated_bincode.d.ts @@ -0,0 +1,283 @@ +export const Hash: any; +/** @type {*} */ +export const Value: any; +export const BinaryData: any; +export const BlockHeight: any; +export const BlockHeightInterval: any; +export const Credits: any; +export const DefinitionName: any; +export const DerivationEncryptionKeyIndex: any; +export const DocumentName: any; +export const EpochIndex: any; +export const EpochInterval: any; +export const GroupContractPosition: any; +export const GroupMemberPower: any; +export const GroupRequiredPower: any; +export const Hash256: any; +export const IdentifierBytes32: any; +export const IdentityNonce: any; +export const KeyID: any; +/** + * allow non_camel_case_types + * repr u8 + */ +export const KeyType: any; +/** repr u8 */ +export const Pooling: any; +/** repr u8 */ +export const Purpose: any; +/** "Raw" instant lock for serialization */ +export const RawInstantLockProof: any; +export const RecipientKeyIndex: any; +export const Revision: any; +export const RootEncryptionKeyIndex: any; +/** + * An owned, growable script. + * + * `ScriptBuf` is the most common script type that has the ownership over the contents of the + * script. It has a close relationship with its borrowed counterpart, [`Script`]. + * + * Just as other similar types, this implements [`Deref`], so [deref coercions] apply. Also note + * that all the safety/validity restrictions that apply to [`Script`] apply to `ScriptBuf` as well. + * + * [deref coercions]: https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion + */ +export const ScriptBuf: any; +/** repr u8 */ +export const SecurityLevel: any; +export const SenderKeyIndex: any; +export const SharedEncryptedNote: any; +/** + * The Storage Key requirements + * repr u8 + */ +export const StorageKeyRequirements: any; +export const TimestampMillis: any; +export const TimestampMillisInterval: any; +export const TokenAmount: any; +export const TokenConfigurationLocalizationV0: any; +export const TokenContractPosition: any; +/** + * Represents the type of token distribution. + * + * - `PreProgrammed`: A scheduled distribution with predefined rules. + * - `Perpetual`: A continuous or recurring distribution. + */ +export const TokenDistributionType: any; +export const TokenEmergencyAction: any; +/** + * The rules for keeping a ledger as documents of token events. + * Config update, Destroying Frozen Funds, Emergency Action, + * Pre Programmed Token Release always require an entry to the ledger + */ +export const TokenKeepsHistoryRulesV0: any; +/** A transaction output, which defines new coins to be created from old ones. */ +export const TxOut: any; +/** A dash transaction hash/transaction ID. */ +export const Txid: any; +export const UserFeeIncrease: any; +export const ValueMap: any; +/** + * An Asset Lock payload. This is contained as the payload of an asset lock special transaction. + * The Asset Lock Special transaction and this payload is described in the Asset Lock DIP2X + * (todo:update this). + * An Asset Lock can fund multiple Identity registrations or top ups. + * The Asset Lock payload credit outputs field contains a vector of TxOuts. + * Each TxOut refers to a funding of an Identity. + */ +export const AssetLockPayload: any; +export const DashcoreScript: any; +export const DataContractConfigV0: any; +export const DataContractConfigV1: any; +export const DistributionFunction: any; +export const Identifier: any; +/** platform_serialize unversioned */ +export const IdentityCreditTransferTransitionV0: any; +export const InstantAssetLockProof: any; +/** A reference to a transaction output. */ +export const OutPoint: any; +export const PrivateEncryptedNote: any; +/** + * A representation of a dynamic value that can handled dynamically + * non_exhaustive + */ +export const REAL_Value: any; +/** + * A resource votes is a votes determining what we should do with a contested resource. + * For example Alice and Bob both want the username "Malaka" + * Some would vote for Alice to get it by putting in her Identifier. + * Some would vote for Bob to get it by putting in Bob's Identifier. + * Let's say someone voted, but is now not quite sure of their votes, they can abstain. + * Lock is there to signal that the shared resource should be given to no one. + * In this case Malaka might have a bad connotation in Greek, hence some might votes to Lock + * the name. + */ +export const ResourceVoteChoice: any; +export const RewardDistributionType: any; +export const TokenConfigurationLocalization: any; +/** platform_serialize unversioned */ +export const TokenDistributionRecipient: any; +export const TokenKeepsHistoryRules: any; +export const TokenPerpetualDistributionV0: any; +export const TokenPreProgrammedDistributionV0: any; +export const AuthorizedActionTakers: any; +/** + * Instant Asset Lock Proof is a part of Identity Create and Identity Topup + * transitions. It is a proof that specific output of dash is locked in credits + * pull and the transitions can mint credits and populate identity's balance. + * To prove that the output is locked, a height where transaction was chain locked is provided. + */ +export const ChainAssetLockProof: any; +export const ChangeControlRulesV0: any; +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const ContestedDocumentResourceVotePoll: any; +/** + * A contract bounds is the bounds that the key has influence on. + * For authentication keys the bounds mean that the keys can only be used to sign + * within the specified contract. + * For encryption decryption this tells clients to only use these keys for specific + * contracts. + * + * repr u8 + */ +export const ContractBounds: any; +export const CoreScript: any; +export const DataContractConfig: any; +export const DataContractInSerializationFormatV0: any; +export const DocumentBaseTransitionV0: any; +export const GroupStateTransitionInfo: any; +/** platform_serialize unversioned */ +export const GroupV0: any; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_credit_transfer_state_transition" + */ +export const IdentityCreditTransferTransition: any; +export const IdentityCreditWithdrawalTransitionV0: any; +export const IdentityCreditWithdrawalTransitionV1: any; +export const IdentityPublicKeyInCreationV0: any; +export const IdentityPublicKeyV0: any; +export const TokenBaseTransitionV0: any; +export const TokenConfigurationConventionV0: any; +/** platform_serialize unversioned */ +export const TokenPerpetualDistribution: any; +export const TokenPreProgrammedDistribution: any; +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const VotePoll: any; +export const AssetLockProof: any; +export const ChangeControlRules: any; +export const DocumentBaseTransition: any; +export const DocumentCreateTransitionV0: any; +export const DocumentDeleteTransitionV0: any; +export const DocumentPurchaseTransitionV0: any; +export const DocumentReplaceTransitionV0: any; +export const DocumentTransferTransitionV0: any; +export const DocumentUpdatePriceTransitionV0: any; +/** platform_serialize unversioned */ +export const Group: any; +/** + * platform_serialize unversioned + * platform_version_path "dpp.state_transition_serialization_versions.identity_credit_withdrawal_state_transition" + */ +export const IdentityCreditWithdrawalTransition: any; +/** platform_serialize limit = 2000 , unversioned */ +export const IdentityPublicKey: any; +export const IdentityPublicKeyInCreation: any; +export const IdentityTopUpTransitionV0: any; +export const IdentityUpdateTransitionV0: any; +/** platform_serialize unversioned */ +export const ResourceVoteV0: any; +export const TokenBaseTransition: any; +export const TokenBurnTransitionV0: any; +export const TokenClaimTransitionV0: any; +export const TokenConfigurationConvention: any; +export const TokenDestroyFrozenFundsTransitionV0: any; +export const TokenDistributionRulesV0: any; +export const TokenEmergencyActionTransitionV0: any; +export const TokenFreezeTransitionV0: any; +export const TokenMintTransitionV0: any; +export const TokenTransferTransitionV0: any; +export const TokenUnfreezeTransitionV0: any; +export const DocumentCreateTransition: any; +export const DocumentDeleteTransition: any; +export const DocumentPurchaseTransition: any; +export const DocumentReplaceTransition: any; +export const DocumentTransferTransition: any; +export const DocumentUpdatePriceTransition: any; +export const IdentityCreateTransitionV0: any; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_top_up_state_transition" + */ +export const IdentityTopUpTransition: any; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_update_state_transition" + */ +export const IdentityUpdateTransition: any; +/** platform_serialize limit = 15000 , unversioned */ +export const ResourceVote: any; +export const TokenBurnTransition: any; +export const TokenClaimTransition: any; +export const TokenConfigurationChangeItem: any; +export const TokenDestroyFrozenFundsTransition: any; +export const TokenDistributionRules: any; +export const TokenEmergencyActionTransition: any; +export const TokenFreezeTransition: any; +export const TokenMintTransition: any; +export const TokenTransferTransition: any; +export const TokenUnfreezeTransition: any; +/** platform_serialize limit = 15000 , unversioned */ +export const Vote: any; +export const DocumentTransition: any; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_create_state_transition" + */ +export const IdentityCreateTransition: any; +/** platform_serialize unversioned */ +export const MasternodeVoteTransitionV0: any; +export const TokenConfigUpdateTransitionV0: any; +export const TokenConfigurationV0: any; +export const BatchTransitionV0: any; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.masternode_vote_state_transition" + */ +export const MasternodeVoteTransition: any; +export const TokenConfigUpdateTransition: any; +export const TokenConfiguration: any; +export const TokenTransition: any; +export const BatchedTransition: any; +export const DataContractInSerializationFormatV1: any; +export const BatchTransitionV1: any; +export const DataContractInSerializationFormat: any; +export const DataContractUpdateTransitionV0: any; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.batch_state_transition" + */ +export const BatchTransition: any; +/** DataContractCreateTransitionV0 has the same encoding structure */ +export const DataContractCreateTransitionV0: any; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_update_state_transition" + */ +export const DataContractUpdateTransition: any; +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_create_state_transition" + */ +export const DataContractCreateTransition: any; +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const StateTransition: any; diff --git a/built/DashPlatform.js/2.0.0/generated_bincode.js b/built/DashPlatform.js/2.0.0/generated_bincode.js new file mode 100644 index 0000000..c7a2465 --- /dev/null +++ b/built/DashPlatform.js/2.0.0/generated_bincode.js @@ -0,0 +1,2359 @@ +import { Bool, Bytes, Enum, VariantDiscriminant, FixedBytes, Lazy, Struct, StructTuple, Int128, Int16, Int32, Int64, Int8, Uint128, Uint16, Uint32, Uint64, Uint8, Float64, VarInt, VarUint, Vec, Tuple, Map, Option, String, Nothing, Range, NotSignable, SocketAddr, } from "../bincode.js"; +import { Transaction } from "../bincode_types.js"; +export const Hash = Bytes; //FixedBytes(32) +/** @type {*} */ +export const Value = Lazy("Value", () => REAL_Value); +export const BinaryData = StructTuple("BinaryData", Bytes); +export const BlockHeight = VarUint; +export const BlockHeightInterval = VarUint; +export const Credits = VarUint; +export const DefinitionName = String; +export const DerivationEncryptionKeyIndex = VarUint; +export const DocumentName = String; +export const EpochIndex = VarUint; +export const EpochInterval = VarUint; +export const GroupContractPosition = VarUint; +export const GroupMemberPower = VarUint; +export const GroupRequiredPower = VarUint; +export const Hash256 = FixedBytes(32); +export const IdentifierBytes32 = StructTuple("IdentifierBytes32", FixedBytes(32)); +export const IdentityNonce = VarUint; +export const KeyID = VarUint; +/** + * allow non_camel_case_types + * repr u8 + */ +export const KeyType = Enum("KeyType", /** @type {const} */ ({ + /** default */ + ECDSA_SECP256K1: [], + BLS12_381: [], + ECDSA_HASH160: [], + BIP13_SCRIPT_HASH: [], + EDDSA_25519_HASH160: [], +})); +/** repr u8 */ +export const Pooling = Enum("Pooling", /** @type {const} */ ({ + /** default */ + Never: [], + IfAvailable: [], + Standard: [], +})); +/** repr u8 */ +export const Purpose = Enum("Purpose", /** @type {const} */ ({ + /** + * at least one authentication key must be registered for all security levels + * default + */ + AUTHENTICATION: [], + /** this key cannot be used for signing documents */ + ENCRYPTION: [], + /** this key cannot be used for signing documents */ + DECRYPTION: [], + /** this key is used to sign credit transfer and withdrawal state transitions */ + TRANSFER: [], + /** this key cannot be used for signing documents */ + SYSTEM: [], + /** this key cannot be used for signing documents */ + VOTING: [], + /** this key is used to prove ownership of a masternode or evonode */ + OWNER: [], +})); +// !ENCODE +/** "Raw" instant lock for serialization */ +export const RawInstantLockProof = Struct("RawInstantLockProof", { + instant_lock: BinaryData, + transaction: BinaryData, + output_index: VarUint, +}); +export const RecipientKeyIndex = VarUint; +export const Revision = VarUint; +export const RootEncryptionKeyIndex = VarUint; +// !ENCODE +/** + * An owned, growable script. + * + * `ScriptBuf` is the most common script type that has the ownership over the contents of the + * script. It has a close relationship with its borrowed counterpart, [`Script`]. + * + * Just as other similar types, this implements [`Deref`], so [deref coercions] apply. Also note + * that all the safety/validity restrictions that apply to [`Script`] apply to `ScriptBuf` as well. + * + * [deref coercions]: https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion + */ +export const ScriptBuf = StructTuple("ScriptBuf", Bytes); +/** repr u8 */ +export const SecurityLevel = Enum("SecurityLevel", /** @type {const} */ ({ + MASTER: [], + CRITICAL: [], + /** default */ + HIGH: [], + MEDIUM: [], +})); +export const SenderKeyIndex = VarUint; +export const SharedEncryptedNote = Tuple(SenderKeyIndex, RecipientKeyIndex, Bytes); +/** + * The Storage Key requirements + * repr u8 + */ +export const StorageKeyRequirements = Enum("StorageKeyRequirements", /** @type {const} */ ({ + Unique: [], + Multiple: [], + MultipleReferenceToLatest: [], +})); +export const TimestampMillis = VarUint; +export const TimestampMillisInterval = VarUint; +export const TokenAmount = VarUint; +export const TokenConfigurationLocalizationV0 = Struct("TokenConfigurationLocalizationV0", { + should_capitalize: Bool, + singular_form: String, + plural_form: String, +}); +export const TokenContractPosition = VarUint; +/** + * Represents the type of token distribution. + * + * - `PreProgrammed`: A scheduled distribution with predefined rules. + * - `Perpetual`: A continuous or recurring distribution. + */ +export const TokenDistributionType = Enum("TokenDistributionType", /** @type {const} */ ({ + /** + * A pre-programmed distribution scheduled for a specific time. + * default + */ + PreProgrammed: [], + /** A perpetual distribution that occurs at regular intervals. */ + Perpetual: [], +})); +export const TokenEmergencyAction = Enum("TokenEmergencyAction", /** @type {const} */ ({ + /** default */ + Pause: [], + Resume: [], +})); +/** + * The rules for keeping a ledger as documents of token events. + * Config update, Destroying Frozen Funds, Emergency Action, + * Pre Programmed Token Release always require an entry to the ledger + */ +export const TokenKeepsHistoryRulesV0 = Struct("TokenKeepsHistoryRulesV0", { + /** Whether transfer history is recorded. */ + keeps_transfer_history: Bool, + /** Whether freezing history is recorded. */ + keeps_freezing_history: Bool, + /** Whether minting history is recorded. */ + keeps_minting_history: Bool, + /** Whether burning history is recorded. */ + keeps_burning_history: Bool, +}); +// !ENCODE +/** A transaction output, which defines new coins to be created from old ones. */ +export const TxOut = Struct("TxOut", { + /** The value of the output, in satoshis. */ + value: VarUint, + /** The script which must be satisfied for the output to be spent. */ + script_pubkey: ScriptBuf, +}); +// !ENCODE +/** A dash transaction hash/transaction ID. */ +export const Txid = StructTuple("Txid", Hash); +export const UserFeeIncrease = VarUint; +export const ValueMap = Vec(Tuple(Value, Value)); +// !ENCODE +/** + * An Asset Lock payload. This is contained as the payload of an asset lock special transaction. + * The Asset Lock Special transaction and this payload is described in the Asset Lock DIP2X + * (todo:update this). + * An Asset Lock can fund multiple Identity registrations or top ups. + * The Asset Lock payload credit outputs field contains a vector of TxOuts. + * Each TxOut refers to a funding of an Identity. + */ +export const AssetLockPayload = Struct("AssetLockPayload", { + version: Uint8, + credit_outputs: Vec(TxOut), +}); +export const DashcoreScript = ScriptBuf; +export const DataContractConfigV0 = Struct("DataContractConfigV0", { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: Bool, + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: Bool, + /** Does the contract keep history when the contract itself changes */ + keeps_history: Bool, + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: Bool, + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: Bool, + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: Bool, + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: Option(StorageKeyRequirements), + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: Option(StorageKeyRequirements), +}); +export const DataContractConfigV1 = Struct("DataContractConfigV1", { + /** + * Can the contract ever be deleted. If the contract is deleted, so should be all + * documents associated with it. TODO: There should also be a way to "stop" the contract - + * contract and documents are kept in the system, but no new documents can be added to it + */ + can_be_deleted: Bool, + /** + * Is the contract mutable. Means that the document definitions can be changed or new + * document definitions can be added to the contract + */ + readonly: Bool, + /** Does the contract keep history when the contract itself changes */ + keeps_history: Bool, + /** + * Do documents in the contract keep history. This is a default for all documents in + * the contract, but can be overridden by the document itself + */ + documents_keep_history_contract_default: Bool, + /** + * Are documents in the contract mutable? This specifies whether the documents can be + * changed. This is a default for all document types in the contract, but can be + * overridden by the document type config. + */ + documents_mutable_contract_default: Bool, + /** + * Can documents in the contract be deleted? This specifies whether the documents can be + * deleted. This is a default for all document types in the contract, but can be + * overridden by the document types itself. + */ + documents_can_be_deleted_contract_default: Bool, + /** Encryption key storage requirements */ + requires_identity_encryption_bounded_key: Option(StorageKeyRequirements), + /** Decryption key storage requirements */ + requires_identity_decryption_bounded_key: Option(StorageKeyRequirements), + /** Use sized integer Rust types for `integer` property type based on validation rules */ + sized_integer_types: Bool, +}); +// !ENCODE +export const DistributionFunction = Enum("DistributionFunction", /** @type {const} */ ({ + /** + * Emits a constant (fixed) number of tokens for every period. + * + * # Formula + * For any period `x`, the emitted tokens are: + * + * ```text + * f(x) = n + * ``` + * + * # Use Case + * - When a predictable, unchanging reward is desired. + * - Simplicity and stable emissions. + * + * # Example + * - If `n = 5` tokens per block, then after 3 blocks the total emission is 15 tokens. + */ + FixedAmount: { + amount: TokenAmount, + }, + /** + * Emits a random number of tokens within a specified range. + * + * # Description + * - This function selects a **random** token emission amount between `min` and `max`. + * - The value is drawn **uniformly** between the bounds. + * - The randomness uses a Pseudo Random Function (PRF) from x. + * + * # Formula + * For any period `x`, the emitted tokens follow: + * + * ```text + * f(x) ∈ [min, max] + * ``` + * + * # Parameters + * - `min`: The **minimum** possible number of tokens emitted. + * - `max`: The **maximum** possible number of tokens emitted. + * + * # Use Cases + * - **Stochastic Rewards**: Introduces randomness into rewards to incentivize unpredictability. + * - **Lottery-Based Systems**: Used for randomized emissions, such as block rewards with probabilistic payouts. + * + * # Example + * Suppose a system emits **between 10 and 100 tokens per period**. + * + * ```text + * Random { min: 10, max: 100 } + * ``` + * + * | Period (x) | Emitted Tokens (Random) | + * |------------|------------------------| + * | 1 | 27 | + * | 2 | 94 | + * | 3 | 63 | + * | 4 | 12 | + * + * - Each period, the function emits a **random number of tokens** between `min = 10` and `max = 100`. + * - Over time, the **average reward trends toward the midpoint** `(min + max) / 2`. + * + * # Constraints + * - **`min` must be ≤ `max`**, otherwise the function is invalid. + * - If `min == max`, this behaves like a `FixedAmount` function with a constant emission. + */ + Random: { + min: TokenAmount, + max: TokenAmount, + }, + /** + * Emits tokens that decrease in discrete steps at fixed intervals. + * + * # Formula + * For a given period `x`, the emission is calculated as: + * + * ```text + * f(x) = n * (1 - (decrease_per_interval_numerator / decrease_per_interval_denominator))^((x - s) / step_count) + * ``` + * + * # Parameters + * - `step_count`: The number of periods between each step. + * - `decrease_per_interval_numerator` and `decrease_per_interval_denominator`: Define the reduction factor per step. + * - `s`: Optional start period offset (e.g., start block or time). If not provided, the contract creation start is used. + * - `n`: The initial token emission. + * - `min_value`: Optional minimum emission value. + * + * # Use Case + * - Modeling reward systems similar to Bitcoin or Dash Core. + * - Encouraging early participation by providing higher rewards initially. + * + * # Example + * - Bitcoin-style: 50% reduction every 210,000 blocks. + * - Dash-style: Approximately a 7% reduction every 210,000 blocks. + */ + StepDecreasingAmount: { + step_count: VarUint, + decrease_per_interval_numerator: VarUint, + decrease_per_interval_denominator: VarUint, + s: Option(VarUint), + n: TokenAmount, + min_value: Option(VarUint), + }, + /** + * Emits tokens in fixed amounts for predefined intervals (steps). + * + * # Details + * - Within each step, the emission remains constant. + * - The keys in the `BTreeMap` represent the starting period for each interval, + * and the corresponding values are the fixed token amounts to emit during that interval. + * + * # Use Case + * - Adjusting rewards at specific milestones or time intervals. + * + * # Example + * - Emit 100 tokens per block for the first 1,000 blocks, then 50 tokens per block thereafter. + */ + Stepwise: [Map(VarUint, TokenAmount)], + /** + * Emits tokens following a linear function that can increase or decrease over time + * with fractional precision. + * + * # Formula + * The emission at period `x` is given by: + * + * ```text + * f(x) = (a * (x - start_moment) / d) + starting_amount + * ``` + * + * # Parameters + * - `a`: The slope numerator; determines the rate of change. + * - `d`: The slope divisor; together with `a` controls the fractional rate. + * - `s`: Optional start period offset. If not set, the contract creation start is assumed. + * - `b`: The initial token emission (offset). + * - `min_value` / `max_value`: Optional bounds to clamp the emission. + * + * # Details + * - If `a > 0`, emissions increase over time. + * - If `a < 0`, emissions decrease over time. + * + * # Behavior + * - **If `a > 0`**, emissions increase linearly over time. + * - **If `a < 0`**, emissions decrease linearly over time. + * - **If `a = 0`**, emissions remain constant at `b`. + * + * # Use Cases + * - **Predictable Inflation or Deflation:** A simple mechanism to adjust token supply dynamically. + * - **Long-Term Incentive Structures:** Ensures steady and measurable growth or reduction of rewards. + * - **Decaying Emissions:** Can be used to gradually taper off token rewards over time. + * - **Sustained Growth Models:** Encourages prolonged engagement by steadily increasing rewards. + * + * # Examples + * + * ## **1️⃣ Increasing Linear Emission (`a > 0`)** + * - Tokens increase by **1 token per block** starting from 10. + * + * ```text + * f(x) = (1 * (x - 0) / 1) + 10 + * ``` + * + * | Block (x) | f(x) (Tokens) | + * |-----------|---------------| + * | 0 | 10 | + * | 1 | 11 | + * | 2 | 12 | + * | 3 | 13 | + * + * **Use Case:** Encourages continued participation by providing increasing rewards over time. + * + * --- + * + * ## **2️⃣ Decreasing Linear Emission (`a < 0`)** + * - Tokens **start at 100 and decrease by 2 per period**. + * + * ```text + * f(x) = (-2 * (x - 0) / 1) + 100 + * ``` + * + * | Block (x) | f(x) (Tokens) | + * |-----------|---------------| + * | 0 | 100 | + * | 1 | 98 | + * | 2 | 96 | + * | 3 | 94 | + * + * **Use Case:** Suitable for deflationary models where rewards need to decrease over time. + * + * --- + * + * ## **3️⃣ Emission with a Delayed Start (`s > 0`)** + * - **No emissions before `x = s`** (e.g., rewards start at block `10`). + * + * ```text + * f(x) = (5 * (x - 10) / 1) + 50 + * ``` + * + * | Block (x) | f(x) (Tokens) | + * |-----------|---------------| + * | 9 | 50 (no change)| + * | 10 | 50 | + * | 11 | 55 | + * | 12 | 60 | + * + * **Use Case:** Useful when rewards should only begin at a specific milestone. + * + * --- + * + * ## **4️⃣ Clamping Emissions with `min_value` and `max_value`** + * - **Start at 50, increase by 2, but never exceed 60.** + * + * ```text + * f(x) = (2 * (x - 0) / 1) + 50 + * ``` + * + * | Block (x) | f(x) (Tokens) | + * |-----------|---------------| + * | 0 | 50 | + * | 1 | 52 | + * | 2 | 54 | + * | 5 | 60 (max cap) | + * + * **Use Case:** Prevents runaway inflation by limiting the emission range. + * + * --- + * + * # Summary + * - **Increasing rewards (`a > 0`)**: Encourages longer participation. + * - **Decreasing rewards (`a < 0`)**: Supports controlled deflation. + * - **Delayed start (`s > 0`)**: Ensures rewards only begin at a specific point. + * - **Clamping (`min_value`, `max_value`)**: Maintains controlled emission boundaries. + */ + Linear: { + a: VarInt, + d: VarUint, + start_step: Option(VarUint), + starting_amount: TokenAmount, + min_value: Option(VarUint), + max_value: Option(VarUint), + }, + /** + * Emits tokens following a polynomial curve with integer arithmetic. + * + * # Formula + * The emission at period `x` is given by: + * + * ```text + * f(x) = (a * (x - s + o)^(m/n)) / d + b + * ``` + * + * # Parameters + * - `a`: Scaling factor for the polynomial term. + * - `m` and `n`: Together specify the exponent as a rational number (allowing non-integer exponents). + * - `d`: A divisor for scaling. + * - `s`: Optional start period offset. If not provided, the contract creation start is used. + * - `o`: An offset for the polynomial function, this is useful if s is in None, + * - `b`: An offset added to the computed value. + * - `min_value` / `max_value`: Optional bounds to constrain the emission. + * + * # Behavior & Use Cases + * The polynomial function's behavior depends on the values of `a` (scaling factor) and `m` (exponent numerator). + * + * ## **1️⃣ `a > 0`, `m > 0` (Increasing Polynomial Growth)** + * - **Behavior**: Emissions **increase at an accelerating rate** over time. + * - **Use Case**: Suitable for models where incentives start small and grow over time (e.g., boosting late-stage participation). + * - **Example**: + * ```text + * f(x) = (2 * (x - s + o)^2) / d + 10 + * ``` + * - If `s = 0`, `o = 0`, and `d = 1`, then: + * - `f(1) = 12` + * - `f(2) = 18` + * - `f(3) = 28` (Emissions **accelerate over time**) + * + * ## **2️⃣ `a > 0`, `m < 0` (Decreasing Polynomial Decay)** + * - **Behavior**: Emissions **start high and gradually decline**. + * - **Use Case**: Useful for front-loaded incentives where rewards are larger at the beginning and taper off over time. + * - **Example**: + * ```text + * f(x) = (5 * (x - s + o)^(-1)) / d + 10 + * ``` + * - If `s = 0`, `o = 0`, and `d = 1`, then: + * - `f(1) = 15` + * - `f(2) = 12.5` + * - `f(3) = 11.67` (Emissions **shrink but never hit zero**) + * + * ## **3️⃣ `a < 0`, `m > 0` (Inverted Growth → Decreasing Over Time)** + * - **Behavior**: Emissions **start large but decrease faster over time**. + * - **Use Case**: Suitable for cases where high initial incentives quickly drop off (e.g., limited early rewards). + * - **Example**: + * ```text + * f(x) = (-3 * (x - s + o)^2) / d + 50 + * ``` + * - If `s = 0`, `o = 0`, and `d = 1`, then: + * - `f(1) = 47` + * - `f(2) = 38` + * - `f(3) = 23` (Emissions **fall sharply**) + * + * ## **4️⃣ `a < 0`, `m < 0` (Inverted Decay → Slowing Increase)** + * - **Behavior**: Emissions **start low, rise gradually, and then flatten out**. + * - **Use Case**: Useful for controlled inflation where rewards increase over time but approach a stable maximum. + * - **Example**: + * ```text + * f(x) = (-10 * (x - s + o)^(-2)) / d + 50 + * ``` + * - If `s = 0`, `o = 0`, and `d = 1`, then: + * - `f(1) = 40` + * - `f(2) = 47.5` + * - `f(3) = 48.89` (Growth **slows as it approaches 50**) + * + * # Summary + * - **Positive `a` means increasing emissions**, while **negative `a` means decreasing emissions**. + * - **Positive `m` leads to growth**, while **negative `m` leads to decay**. + * - The combination of `a` and `m` defines whether emissions accelerate, decay, or remain stable. + */ + Polynomial: { + a: VarInt, + d: VarUint, + m: VarInt, + n: VarUint, + o: VarInt, + start_moment: Option(VarUint), + b: TokenAmount, + min_value: Option(VarUint), + max_value: Option(VarUint), + }, + /** + * Emits tokens following an exponential function. + * + * # Formula + * The emission at period `x` is given by: + * + * ```text + * f(x) = (a * e^(m * (x - s) / n)) / d + c + * ``` + * + * # Parameters + * - `a`: The scaling factor. + * - `m` and `n`: Define the exponent rate (with `m > 0` for growth and `m < 0` for decay). + * - `d`: A divisor used to scale the exponential term. + * - `s`: Optional start period offset. If not set, the contract creation start is assumed. + * - `o`: An offset for the exp function, this is useful if s is in None. + * - `c`: An offset added to the result. + * - `min_value` / `max_value`: Optional constraints on the emitted tokens. + * + * # Use Cases + * ## **Exponential Growth (`m > 0`):** + * - **Incentivized Spending**: Higher emissions over time increase the circulating supply, encouraging users to spend tokens. + * - **Progressive Emission Models**: Useful for models where early emissions are low but increase significantly over time. + * - **Early-Stage Adoption Strategies**: Helps drive later participation by offering increasing rewards as time progresses. + * + * ## **Exponential Decay (`m < 0`):** + * - **Deflationary Reward Models**: Reduces emissions over time, ensuring token scarcity. + * - **Early Participation Incentives**: Encourages early users by distributing more tokens initially and gradually decreasing rewards. + * - **Sustainable Emission Models**: Helps manage token supply while preventing runaway inflation. + * + * # Examples + * ## **Example 1: Exponential Growth (`m > 0`)** + * - **Use Case**: A staking model where rewards increase over time to encourage long-term participation. + * - **Parameters**: `a = 100`, `m = 2`, `n = 50`, `d = 10`, `c = 5` + * - **Formula**: + * ```text + * f(x) = (100 * e^(2 * (x - s) / 50)) / 10 + 5 + * ``` + * - **Effect**: Emissions start small but **increase exponentially** over time, rewarding late stakers more than early ones. + * + * ## **Example 2: Exponential Decay (`m < 0`)** + * - **Use Case**: A deflationary model where emissions start high and gradually decrease to ensure scarcity. + * - **Parameters**: `a = 500`, `m = -3`, `n = 100`, `d = 20`, `c = 10` + * - **Formula**: + * ```text + * f(x) = (500 * e^(-3 * (x - s) / 100)) / 20 + 10 + * ``` + * - **Effect**: Emissions start **high and decay exponentially**, ensuring early participants get larger rewards. + */ + Exponential: { + a: VarUint, + d: VarUint, + m: VarInt, + n: VarUint, + o: VarInt, + start_moment: Option(VarUint), + c: TokenAmount, + min_value: Option(VarUint), + max_value: Option(VarUint), + }, + /** + * Emits tokens following a logarithmic function. + * + * # Formula + * The emission at period `x` is computed as: + * + * ```text + * f(x) = (a * log(m * (x - s + o) / n)) / d + b + * ``` + * + * # Parameters + * - `a`: Scaling factor for the logarithmic term. + * - `d`: A divisor for scaling. + * - `m` and `n`: Adjust the input to the logarithm function. + * - `s`: Optional start period offset. If not provided, the contract creation start is used. + * - `o`: An offset for the log function, this is useful if s is in None. + * - `b`: An offset added to the result. + * - `min_value` / `max_value`: Optional bounds to ensure the emission remains within limits. + * + * # Use Case + * - **Gradual Growth with a Slowing Rate**: Suitable for reward schedules where the emission + * starts at a lower rate, increases quickly at first, but then slows down over time. + * - **Predictable Emission Scaling**: Ensures a growing but controlled emission curve that + * does not escalate too quickly. + * - **Sustainability and Inflation Control**: Helps prevent runaway token supply growth + * by ensuring rewards increase at a decreasing rate. + * + * # Example + * - Suppose we want token emissions to start at a low value and grow over time, but at a + * **decreasing rate**, ensuring controlled long-term growth. + * + * - Given the formula: + * ```text + * f(x) = (a * log(m * (x - s + o) / n)) / d + b + * ``` + * + * - Let’s assume the following parameters: + * - `a = 100`: Scaling factor. + * - `d = 10`: Divisor to control overall scaling. + * - `m = 2`, `n = 1`: Adjust the logarithmic input. + * - `s = 0`, `o = 1`: Starting conditions. + * - `b = 50`: Base amount added. + * + * - This results in: + * ```text + * f(x) = (100 * log(2 * (x + 1) / 1)) / 10 + 50 + * ``` + * + * - **Expected Behavior:** + * - At `x = 1`, emission = `f(1) = (100 * log(4)) / 10 + 50 ≈ 82` + * - At `x = 10`, emission = `f(10) = (100 * log(22)) / 10 + 50 ≈ 106` + * - At `x = 100`, emission = `f(100) = (100 * log(202)) / 10 + 50 ≈ 130` + * + * - **Observations:** + * - The emission **increases** over time, but at a **slowing rate**. + * - Early increases are more pronounced, but as `x` grows, the additional reward per + * period gets smaller. + * - This makes it ideal for long-term, controlled emission models. + */ + Logarithmic: { + a: VarInt, + d: VarUint, + m: VarUint, + n: VarUint, + o: VarInt, + start_moment: Option(VarUint), + b: TokenAmount, + min_value: Option(VarUint), + max_value: Option(VarUint), + }, + /** + * Emits tokens following an inverted logarithmic function. + * + * # Formula + * The emission at period `x` is given by: + * + * ```text + * f(x) = (a * log( n / (m * (x - s + o)) )) / d + b + * ``` + * + * # Parameters + * - `a`: Scaling factor. + * - `d`: Divisor for scaling. + * - `m` and `n`: Together control the logarithm argument inversion. + * - `o`: Offset applied inside the logarithm. + * - `s`: Optional start period offset. + * - `b`: Offset added to the computed value. + * - `min_value` / `max_value`: Optional boundaries for the emission. + * + * # Use Case + * - **Gradual Decay of Rewards**: Suitable when early adopters should receive higher rewards, + * but later participants should receive smaller but still meaningful amounts. + * - **Resource Draining / Controlled Burn**: Used when token emissions should drop significantly + * at first but slow down over time to preserve capital. + * - **Airdrop or Grant System**: Ensures early claimants receive larger distributions, but later + * claimants receive diminishing rewards. + * + * # Example + * - Suppose a system starts with **500 tokens per period** and gradually reduces over time: + * + * ```text + * f(x) = (1000 * log(5000 / (5 * (x - 1000)))) / 10 + 10 + * ``` + * + * Example values: + * + * | Period (x) | Emission (f(x)) | + * |------------|----------------| + * | 1000 | 500 tokens | + * | 1500 | 230 tokens | + * | 2000 | 150 tokens | + * | 5000 | 50 tokens | + * | 10,000 | 20 tokens | + * | 50,000 | 10 tokens | + * + * - The emission **starts high** and **gradually decreases**, ensuring early adopters receive + * more tokens while later participants still get rewards. + * - The function **slows down the rate of decrease** over time, preventing emissions from + * hitting zero too quickly. + */ + InvertedLogarithmic: { + a: VarInt, + d: VarUint, + m: VarUint, + n: VarUint, + o: VarInt, + start_moment: Option(VarUint), + b: TokenAmount, + min_value: Option(VarUint), + max_value: Option(VarUint), + }, +})); +export const Identifier = StructTuple("Identifier", IdentifierBytes32); +/** platform_serialize unversioned */ +export const IdentityCreditTransferTransitionV0 = Struct("IdentityCreditTransferTransitionV0", { + identity_id: Identifier, + recipient_id: Identifier, + amount: VarUint, + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +export const InstantAssetLockProof = RawInstantLockProof; +// !ENCODE +/** A reference to a transaction output. */ +export const OutPoint = Struct("OutPoint", { + /** The referenced transaction's txid. */ + txid: Txid, + /** The index of the referenced output in its transaction's vout. */ + vout: VarUint, +}); +export const PrivateEncryptedNote = Tuple(RootEncryptionKeyIndex, DerivationEncryptionKeyIndex, Bytes); +/** + * A representation of a dynamic value that can handled dynamically + * non_exhaustive + */ +export const REAL_Value = Enum("Value", /** @type {const} */ ({ + /** A u128 integer */ + U128: [VarUint], + /** A i128 integer */ + I128: [VarInt], + /** A u64 integer */ + U64: [VarUint], + /** A i64 integer */ + I64: [VarInt], + /** A u32 integer */ + U32: [VarUint], + /** A i32 integer */ + I32: [VarInt], + /** A u16 integer */ + U16: [VarUint], + /** A i16 integer */ + I16: [VarInt], + /** A u8 integer */ + U8: [Uint8], + /** A i8 integer */ + I8: [Int8], + /** Bytes */ + Bytes: [Bytes], + /** Bytes 20 */ + Bytes20: [FixedBytes(20)], + /** Bytes 32 */ + Bytes32: [FixedBytes(32)], + /** Bytes 36 : Useful for outpoints */ + Bytes36: [FixedBytes(36)], + /** An enumeration of u8 */ + EnumU8: [Bytes], + /** An enumeration of strings */ + EnumString: [Vec(String)], + /** + * Identifier + * The identifier is very similar to bytes, however it is serialized to Base58 when converted + * to a JSON Value + */ + Identifier: [Hash256], + /** A float */ + Float: [Float64], + /** A string */ + Text: [String], + /** A boolean */ + Bool: [Bool], + /** Null */ + Null: [], + /** An array */ + Array: [Vec(Value)], + /** A map */ + Map: [ValueMap], +})); +/** + * A resource votes is a votes determining what we should do with a contested resource. + * For example Alice and Bob both want the username "Malaka" + * Some would vote for Alice to get it by putting in her Identifier. + * Some would vote for Bob to get it by putting in Bob's Identifier. + * Let's say someone voted, but is now not quite sure of their votes, they can abstain. + * Lock is there to signal that the shared resource should be given to no one. + * In this case Malaka might have a bad connotation in Greek, hence some might votes to Lock + * the name. + */ +export const ResourceVoteChoice = Enum("ResourceVoteChoice", /** @type {const} */ ({ + TowardsIdentity: [Identifier], + /** default */ + Abstain: [], + Lock: [], +})); +export const RewardDistributionType = Enum("RewardDistributionType", /** @type {const} */ ({ + /** + * An amount of tokens is emitted every n blocks. + * The start and end are included if set. + * If start is not set then it will start at the height of the block when the data contract + * is registered. + */ + BlockBasedDistribution: { + interval: BlockHeightInterval, + function: DistributionFunction, + }, + /** + * An amount of tokens is emitted every amount of time given. + * The start and end are included if set. + * If start is not set then it will start at the time of the block when the data contract + * is registered. + */ + TimeBasedDistribution: { + interval: TimestampMillisInterval, + function: DistributionFunction, + }, + /** + * An amount of tokens is emitted every amount of epochs. + * The start and end are included if set. + * If start is not set then it will start at the epoch of the block when the data contract + * is registered. A distribution would happen at the start of the following epoch, even if it + * is just 1 block later. + */ + EpochBasedDistribution: { + interval: EpochInterval, + function: DistributionFunction, + }, +})); +export const TokenConfigurationLocalization = Enum("TokenConfigurationLocalization", /** @type {const} */ ({ + V0: [TokenConfigurationLocalizationV0], +})); +/** platform_serialize unversioned */ +export const TokenDistributionRecipient = Enum("TokenDistributionRecipient", /** @type {const} */ ({ + /** + * Distribute to the contract Owner + * default + */ + ContractOwner: [], + /** Distribute to a single identity */ + Identity: [Identifier], + /** + * Distribute tokens by participation + * This distribution can only happen when choosing epoch based distribution + */ + EvonodesByParticipation: [], +})); +export const TokenKeepsHistoryRules = Enum("TokenKeepsHistoryRules", /** @type {const} */ ({ + V0: [TokenKeepsHistoryRulesV0], +})); +export const TokenPerpetualDistributionV0 = Struct("TokenPerpetualDistributionV0", { + /** The distribution type that the token will use */ + distribution_type: RewardDistributionType, + /** The recipient type */ + distribution_recipient: TokenDistributionRecipient, +}); +export const TokenPreProgrammedDistributionV0 = Struct("TokenPreProgrammedDistributionV0", { + distributions: Map(TimestampMillis, Map(Identifier, TokenAmount)), +}); +export const AuthorizedActionTakers = Enum("AuthorizedActionTakers", /** @type {const} */ ({ + /** default */ + NoOne: [], + ContractOwner: [], + Identity: [Identifier], + MainGroup: [], + Group: [GroupContractPosition], +})); +// !ENCODE +/** + * Instant Asset Lock Proof is a part of Identity Create and Identity Topup + * transitions. It is a proof that specific output of dash is locked in credits + * pull and the transitions can mint credits and populate identity's balance. + * To prove that the output is locked, a height where transaction was chain locked is provided. + */ +export const ChainAssetLockProof = Struct("ChainAssetLockProof", { + /** Core height on which the asset lock transaction was chain locked or higher */ + core_chain_locked_height: VarUint, + /** A reference to Asset Lock Special Transaction ID and output index in the payload */ + out_point: OutPoint, +}); +export const ChangeControlRulesV0 = Struct("ChangeControlRulesV0", { + /** This is who is authorized to make such a change */ + authorized_to_make_change: AuthorizedActionTakers, + /** This is who is authorized to make such a change to the people authorized to make a change */ + admin_action_takers: AuthorizedActionTakers, + /** Are we allowed to change to None in the future */ + changing_authorized_action_takers_to_no_one_allowed: Bool, + /** Are we allowed to change the admin action takers to no one in the future */ + changing_admin_action_takers_to_no_one_allowed: Bool, + /** Can the admin action takers change themselves */ + self_changing_admin_action_takers_allowed: Bool, +}); +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const ContestedDocumentResourceVotePoll = Struct("ContestedDocumentResourceVotePoll", { + contract_id: Identifier, + document_type_name: String, + index_name: String, + index_values: Vec(Value), +}); +/** + * A contract bounds is the bounds that the key has influence on. + * For authentication keys the bounds mean that the keys can only be used to sign + * within the specified contract. + * For encryption decryption this tells clients to only use these keys for specific + * contracts. + * + * repr u8 + */ +export const ContractBounds = Enum("ContractBounds", /** @type {const} */ ({ + /** this key can only be used within a specific contract */ + SingleContract: { + id: Identifier, + }, + /** this key can only be used within a specific contract and for a specific document type */ + SingleContractDocumentType: { + id: Identifier, + document_type_name: String, + }, +})); +// !ENCODE +export const CoreScript = StructTuple("CoreScript", DashcoreScript); +export const DataContractConfig = Enum("DataContractConfig", /** @type {const} */ ({ + V0: [DataContractConfigV0], + V1: [DataContractConfigV1], +})); +export const DataContractInSerializationFormatV0 = Struct("DataContractInSerializationFormatV0", { + /** A unique identifier for the data contract. */ + id: Identifier, + /** Internal configuration for the contract. */ + config: DataContractConfig, + /** The version of this data contract. */ + version: VarUint, + /** The identifier of the contract owner. */ + owner_id: Identifier, + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: Option(Map(DefinitionName, Value)), + /** Document JSON Schemas per type */ + document_schemas: Map(DocumentName, Value), +}); +export const DocumentBaseTransitionV0 = Struct("DocumentBaseTransitionV0", { + /** The document ID */ + id: Identifier, + identity_contract_nonce: IdentityNonce, + /** Name of document type found int the data contract associated with the `data_contract_id` */ + document_type_name: String, + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier, +}); +export const GroupStateTransitionInfo = Struct("GroupStateTransitionInfo", { + group_contract_position: GroupContractPosition, + action_id: Identifier, + /** This is true if we are the proposer, otherwise we are just voting on a previous action. */ + action_is_proposer: Bool, +}); +/** platform_serialize unversioned */ +export const GroupV0 = Struct("GroupV0", { + members: Map(Identifier, GroupMemberPower), + required_power: GroupRequiredPower, +}); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_credit_transfer_state_transition" + */ +export const IdentityCreditTransferTransition = Enum("IdentityCreditTransferTransition", /** @type {const} */ ({ + V0: [IdentityCreditTransferTransitionV0], +})); +export const IdentityCreditWithdrawalTransitionV0 = Struct("IdentityCreditWithdrawalTransitionV0", { + identity_id: Identifier, + amount: VarUint, + core_fee_per_byte: VarUint, + pooling: Pooling, + output_script: CoreScript, + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +export const IdentityCreditWithdrawalTransitionV1 = Struct("IdentityCreditWithdrawalTransitionV1", { + identity_id: Identifier, + amount: VarUint, + core_fee_per_byte: VarUint, + pooling: Pooling, + /** If the send to output script is None, then we send the withdrawal to the address set by core */ + output_script: Option(CoreScript), + nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +export const IdentityPublicKeyInCreationV0 = Struct("IdentityPublicKeyInCreationV0", { + id: KeyID, + key_type: KeyType, + purpose: Purpose, + security_level: SecurityLevel, + contract_bounds: Option(ContractBounds), + read_only: Bool, + data: BinaryData, + /** The signature is needed for ECDSA_SECP256K1 Key type and BLS12_381 Key type */ + signature: NotSignable(BinaryData), +}); +export const IdentityPublicKeyV0 = Struct("IdentityPublicKeyV0", { + id: KeyID, + purpose: Purpose, + security_level: SecurityLevel, + contract_bounds: Option(ContractBounds), + key_type: KeyType, + read_only: Bool, + data: BinaryData, + disabled_at: Option(TimestampMillis), +}); +export const TokenBaseTransitionV0 = Struct("TokenBaseTransitionV0", { + identity_contract_nonce: IdentityNonce, + /** ID of the token within the contract */ + token_contract_position: VarUint, + /** Data contract ID generated from the data contract's `owner_id` and `entropy` */ + data_contract_id: Identifier, + /** Token ID generated from the data contract ID and the token position */ + token_id: Identifier, + /** Using group multi party rules for authentication */ + using_group_info: Option(GroupStateTransitionInfo), +}); +export const TokenConfigurationConventionV0 = Struct("TokenConfigurationConventionV0", { + /** + * Localizations for the token name. + * The key must be a ISO 639 2-chars language code + */ + localizations: Map(String, TokenConfigurationLocalization), + decimals: VarUint, +}); +/** platform_serialize unversioned */ +export const TokenPerpetualDistribution = Enum("TokenPerpetualDistribution", /** @type {const} */ ({ + V0: [TokenPerpetualDistributionV0], +})); +export const TokenPreProgrammedDistribution = Enum("TokenPreProgrammedDistribution", /** @type {const} */ ({ + V0: [TokenPreProgrammedDistributionV0], +})); +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const VotePoll = Enum("VotePoll", /** @type {const} */ ({ + ContestedDocumentResourceVotePoll: [ContestedDocumentResourceVotePoll], +})); +export const AssetLockProof = Enum("AssetLockProof", /** @type {const} */ ({ + Instant: [InstantAssetLockProof], + Chain: [ChainAssetLockProof], +})); +export const ChangeControlRules = Enum("ChangeControlRules", /** @type {const} */ ({ + V0: [ChangeControlRulesV0], +})); +export const DocumentBaseTransition = Enum("DocumentBaseTransition", /** @type {const} */ ({ + V0: [DocumentBaseTransitionV0], +})); +export const DocumentCreateTransitionV0 = Struct("DocumentCreateTransitionV0", { + /** Document Base Transition */ + base: DocumentBaseTransition, + /** Entropy used to create a Document ID. */ + entropy: FixedBytes(32), + data: Map(String, Value), + /** + * Pre funded balance (for unique index conflict resolution voting - the identity will put money + * aside that will be used by voters to vote) + * This is a map of index names to the amount we want to prefund them for + * Since index conflict resolution is not a common feature most often nothing should be added here. + */ + prefunded_voting_balance: Option(Tuple(String, Credits)), +}); +export const DocumentDeleteTransitionV0 = Struct("DocumentDeleteTransitionV0", { + base: DocumentBaseTransition, +}); +export const DocumentPurchaseTransitionV0 = Struct("DocumentPurchaseTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + price: Credits, +}); +export const DocumentReplaceTransitionV0 = Struct("DocumentReplaceTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + data: Map(String, Value), +}); +export const DocumentTransferTransitionV0 = Struct("DocumentTransferTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + recipient_owner_id: Identifier, +}); +export const DocumentUpdatePriceTransitionV0 = Struct("DocumentUpdatePriceTransitionV0", { + base: DocumentBaseTransition, + revision: Revision, + price: Credits, +}); +/** platform_serialize unversioned */ +export const Group = Enum("Group", /** @type {const} */ ({ + V0: [GroupV0], +})); +/** + * platform_serialize unversioned + * platform_version_path "dpp.state_transition_serialization_versions.identity_credit_withdrawal_state_transition" + */ +export const IdentityCreditWithdrawalTransition = Enum("IdentityCreditWithdrawalTransition", /** @type {const} */ ({ + V0: [IdentityCreditWithdrawalTransitionV0], + V1: [IdentityCreditWithdrawalTransitionV1], +})); +/** platform_serialize limit = 2000 , unversioned */ +export const IdentityPublicKey = Enum("IdentityPublicKey", /** @type {const} */ ({ + V0: [IdentityPublicKeyV0], +})); +export const IdentityPublicKeyInCreation = Enum("IdentityPublicKeyInCreation", /** @type {const} */ ({ + V0: [IdentityPublicKeyInCreationV0], +})); +export const IdentityTopUpTransitionV0 = Struct("IdentityTopUpTransitionV0", { + asset_lock_proof: AssetLockProof, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + signature: NotSignable(BinaryData), +}); +export const IdentityUpdateTransitionV0 = Struct("IdentityUpdateTransitionV0", { + /** Unique identifier of the identity to be updated */ + identity_id: Identifier, + /** The revision of the identity after update */ + revision: Revision, + /** Identity nonce for this transition to prevent replay attacks */ + nonce: IdentityNonce, + /** + * Public Keys to add to the Identity + * we want to skip serialization of transitions, as we does it manually in `to_object()` and `to_json()` + */ + add_public_keys: Vec(IdentityPublicKeyInCreation), + /** Identity Public Keys ID's to disable for the Identity */ + disable_public_keys: Vec(KeyID), + /** The fee multiplier */ + user_fee_increase: UserFeeIncrease, + /** The ID of the public key used to sing the State Transition */ + signature_public_key_id: NotSignable(KeyID), + /** Cryptographic signature of the State Transition */ + signature: NotSignable(BinaryData), +}); +/** platform_serialize unversioned */ +export const ResourceVoteV0 = Struct("ResourceVoteV0", { + vote_poll: VotePoll, + resource_vote_choice: ResourceVoteChoice, +}); +export const TokenBaseTransition = Enum("TokenBaseTransition", /** @type {const} */ ({ + V0: [TokenBaseTransitionV0], +})); +export const TokenBurnTransitionV0 = Struct("TokenBurnTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** How much should we burn */ + burn_amount: VarUint, + /** The public note */ + public_note: Option(String), +}); +export const TokenClaimTransitionV0 = Struct("TokenClaimTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The type of distribution we are targeting */ + distribution_type: TokenDistributionType, + /** A public note, this will only get saved to the state if we are using a historical contract */ + public_note: Option(String), +}); +export const TokenConfigurationConvention = Enum("TokenConfigurationConvention", /** @type {const} */ ({ + V0: [TokenConfigurationConventionV0], +})); +export const TokenDestroyFrozenFundsTransitionV0 = Struct("TokenDestroyFrozenFundsTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The identity id of the account whose balance should be destroyed */ + frozen_identity_id: Identifier, + /** The public note */ + public_note: Option(String), +}); +export const TokenDistributionRulesV0 = Struct("TokenDistributionRulesV0", { + perpetual_distribution: Option(TokenPerpetualDistribution), + perpetual_distribution_rules: ChangeControlRules, + pre_programmed_distribution: Option(TokenPreProgrammedDistribution), + new_tokens_destination_identity: Option(Identifier), + new_tokens_destination_identity_rules: ChangeControlRules, + minting_allow_choosing_destination: Bool, + minting_allow_choosing_destination_rules: ChangeControlRules, +}); +export const TokenEmergencyActionTransitionV0 = Struct("TokenEmergencyActionTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The emergency action */ + emergency_action: TokenEmergencyAction, + /** The public note */ + public_note: Option(String), +}); +export const TokenFreezeTransitionV0 = Struct("TokenFreezeTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The identity that we are freezing */ + identity_to_freeze_id: Identifier, + /** The public note */ + public_note: Option(String), +}); +export const TokenMintTransitionV0 = Struct("TokenMintTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** + * Who should we issue the token to? If this is not set then we issue to the identity set in + * contract settings. If such an operation is allowed. + */ + issued_to_identity_id: Option(Identifier), + /** How much should we issue */ + amount: VarUint, + /** The public note */ + public_note: Option(String), +}); +export const TokenTransferTransitionV0 = Struct("TokenTransferTransitionV0", { + base: TokenBaseTransition, + amount: VarUint, + recipient_id: Identifier, + /** The public note */ + public_note: Option(String), + /** An optional shared encrypted note */ + shared_encrypted_note: Option(SharedEncryptedNote), + /** An optional private encrypted note */ + private_encrypted_note: Option(PrivateEncryptedNote), +}); +export const TokenUnfreezeTransitionV0 = Struct("TokenUnfreezeTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** The identity that we are freezing */ + frozen_identity_id: Identifier, + /** The public note */ + public_note: Option(String), +}); +export const DocumentCreateTransition = Enum("DocumentCreateTransition", /** @type {const} */ ({ + V0: [DocumentCreateTransitionV0], +})); +export const DocumentDeleteTransition = Enum("DocumentDeleteTransition", /** @type {const} */ ({ + V0: [DocumentDeleteTransitionV0], +})); +export const DocumentPurchaseTransition = Enum("DocumentPurchaseTransition", /** @type {const} */ ({ + V0: [DocumentPurchaseTransitionV0], +})); +export const DocumentReplaceTransition = Enum("DocumentReplaceTransition", /** @type {const} */ ({ + V0: [DocumentReplaceTransitionV0], +})); +export const DocumentTransferTransition = Enum("DocumentTransferTransition", /** @type {const} */ ({ + V0: [DocumentTransferTransitionV0], +})); +export const DocumentUpdatePriceTransition = Enum("DocumentUpdatePriceTransition", /** @type {const} */ ({ + V0: [DocumentUpdatePriceTransitionV0], +})); +export const IdentityCreateTransitionV0 = Struct("IdentityCreateTransitionV0", { + public_keys: Vec(IdentityPublicKeyInCreation), + asset_lock_proof: AssetLockProof, + user_fee_increase: UserFeeIncrease, + signature: NotSignable(BinaryData), + identity_id: NotSignable(Identifier), +}); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_top_up_state_transition" + */ +export const IdentityTopUpTransition = Enum("IdentityTopUpTransition", /** @type {const} */ ({ + V0: [IdentityTopUpTransitionV0], +})); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_update_state_transition" + */ +export const IdentityUpdateTransition = Enum("IdentityUpdateTransition", /** @type {const} */ ({ + V0: [IdentityUpdateTransitionV0], +})); +/** platform_serialize limit = 15000 , unversioned */ +export const ResourceVote = Enum("ResourceVote", /** @type {const} */ ({ + V0: [ResourceVoteV0], +})); +export const TokenBurnTransition = Enum("TokenBurnTransition", /** @type {const} */ ({ + V0: [TokenBurnTransitionV0], +})); +export const TokenClaimTransition = Enum("TokenClaimTransition", /** @type {const} */ ({ + V0: [TokenClaimTransitionV0], +})); +export const TokenConfigurationChangeItem = Enum("TokenConfigurationChangeItem", /** @type {const} */ ({ + /** default */ + TokenConfigurationNoChange: [], + Conventions: [TokenConfigurationConvention], + ConventionsControlGroup: [AuthorizedActionTakers], + ConventionsAdminGroup: [AuthorizedActionTakers], + MaxSupply: [Option(TokenAmount)], + MaxSupplyControlGroup: [AuthorizedActionTakers], + MaxSupplyAdminGroup: [AuthorizedActionTakers], + PerpetualDistribution: [Option(TokenPerpetualDistribution)], + PerpetualDistributionControlGroup: [AuthorizedActionTakers], + PerpetualDistributionAdminGroup: [AuthorizedActionTakers], + NewTokensDestinationIdentity: [Option(Identifier)], + NewTokensDestinationIdentityControlGroup: [AuthorizedActionTakers], + NewTokensDestinationIdentityAdminGroup: [AuthorizedActionTakers], + MintingAllowChoosingDestination: [Bool], + MintingAllowChoosingDestinationControlGroup: [AuthorizedActionTakers], + MintingAllowChoosingDestinationAdminGroup: [AuthorizedActionTakers], + ManualMinting: [AuthorizedActionTakers], + ManualMintingAdminGroup: [AuthorizedActionTakers], + ManualBurning: [AuthorizedActionTakers], + ManualBurningAdminGroup: [AuthorizedActionTakers], + Freeze: [AuthorizedActionTakers], + FreezeAdminGroup: [AuthorizedActionTakers], + Unfreeze: [AuthorizedActionTakers], + UnfreezeAdminGroup: [AuthorizedActionTakers], + DestroyFrozenFunds: [AuthorizedActionTakers], + DestroyFrozenFundsAdminGroup: [AuthorizedActionTakers], + EmergencyAction: [AuthorizedActionTakers], + EmergencyActionAdminGroup: [AuthorizedActionTakers], + MainControlGroup: [Option(GroupContractPosition)], +})); +export const TokenDestroyFrozenFundsTransition = Enum("TokenDestroyFrozenFundsTransition", /** @type {const} */ ({ + V0: [TokenDestroyFrozenFundsTransitionV0], +})); +export const TokenDistributionRules = Enum("TokenDistributionRules", /** @type {const} */ ({ + V0: [TokenDistributionRulesV0], +})); +export const TokenEmergencyActionTransition = Enum("TokenEmergencyActionTransition", /** @type {const} */ ({ + V0: [TokenEmergencyActionTransitionV0], +})); +export const TokenFreezeTransition = Enum("TokenFreezeTransition", /** @type {const} */ ({ + V0: [TokenFreezeTransitionV0], +})); +export const TokenMintTransition = Enum("TokenMintTransition", /** @type {const} */ ({ + V0: [TokenMintTransitionV0], +})); +export const TokenTransferTransition = Enum("TokenTransferTransition", /** @type {const} */ ({ + V0: [TokenTransferTransitionV0], +})); +export const TokenUnfreezeTransition = Enum("TokenUnfreezeTransition", /** @type {const} */ ({ + V0: [TokenUnfreezeTransitionV0], +})); +/** platform_serialize limit = 15000 , unversioned */ +export const Vote = Enum("Vote", /** @type {const} */ ({ + ResourceVote: [ResourceVote], +})); +export const DocumentTransition = Enum("DocumentTransition", /** @type {const} */ ({ + Create: [DocumentCreateTransition], + Replace: [DocumentReplaceTransition], + Delete: [DocumentDeleteTransition], + Transfer: [DocumentTransferTransition], + UpdatePrice: [DocumentUpdatePriceTransition], + Purchase: [DocumentPurchaseTransition], +})); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.identity_create_state_transition" + */ +export const IdentityCreateTransition = Enum("IdentityCreateTransition", /** @type {const} */ ({ + V0: [IdentityCreateTransitionV0], +})); +/** platform_serialize unversioned */ +export const MasternodeVoteTransitionV0 = Struct("MasternodeVoteTransitionV0", { + pro_tx_hash: Identifier, + voter_identity_id: Identifier, + vote: Vote, + nonce: IdentityNonce, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +export const TokenConfigUpdateTransitionV0 = Struct("TokenConfigUpdateTransitionV0", { + /** Document Base Transition */ + base: TokenBaseTransition, + /** Updated token configuration item */ + update_token_configuration_item: TokenConfigurationChangeItem, + /** The public note */ + public_note: Option(String), +}); +export const TokenConfigurationV0 = Struct("TokenConfigurationV0", { + conventions: TokenConfigurationConvention, + /** Who can change the conventions */ + conventions_change_rules: ChangeControlRules, + /** The supply at the creation of the token */ + base_supply: TokenAmount, + /** The maximum supply the token can ever have */ + max_supply: Option(TokenAmount), + /** The rules for keeping history. */ + keeps_history: TokenKeepsHistoryRules, + /** Do we start off as paused, meaning that we can not transfer till we unpause. */ + start_as_paused: Bool, + /** + * Who can change the max supply + * Even if set no one can ever change this under the base supply + */ + max_supply_change_rules: ChangeControlRules, + /** The distribution rules for the token */ + distribution_rules: TokenDistributionRules, + manual_minting_rules: ChangeControlRules, + manual_burning_rules: ChangeControlRules, + freeze_rules: ChangeControlRules, + unfreeze_rules: ChangeControlRules, + destroy_frozen_funds_rules: ChangeControlRules, + emergency_action_rules: ChangeControlRules, + main_control_group: Option(GroupContractPosition), + main_control_group_can_be_modified: AuthorizedActionTakers, +}); +export const BatchTransitionV0 = Struct("BatchTransitionV0", { + owner_id: Identifier, + transitions: Vec(DocumentTransition), + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.masternode_vote_state_transition" + */ +export const MasternodeVoteTransition = Enum("MasternodeVoteTransition", /** @type {const} */ ({ + V0: [MasternodeVoteTransitionV0], +})); +export const TokenConfigUpdateTransition = Enum("TokenConfigUpdateTransition", /** @type {const} */ ({ + V0: [TokenConfigUpdateTransitionV0], +})); +export const TokenConfiguration = Enum("TokenConfiguration", /** @type {const} */ ({ + V0: [TokenConfigurationV0], +})); +export const TokenTransition = Enum("TokenTransition", /** @type {const} */ ({ + Burn: [TokenBurnTransition], + Mint: [TokenMintTransition], + Transfer: [TokenTransferTransition], + Freeze: [TokenFreezeTransition], + Unfreeze: [TokenUnfreezeTransition], + DestroyFrozenFunds: [TokenDestroyFrozenFundsTransition], + Claim: [TokenClaimTransition], + EmergencyAction: [TokenEmergencyActionTransition], + ConfigUpdate: [TokenConfigUpdateTransition], +})); +export const BatchedTransition = Enum("BatchedTransition", /** @type {const} */ ({ + Document: [DocumentTransition], + Token: [TokenTransition], +})); +export const DataContractInSerializationFormatV1 = Struct("DataContractInSerializationFormatV1", { + /** A unique identifier for the data contract. */ + id: Identifier, + /** Internal configuration for the contract. */ + config: DataContractConfig, + /** The version of this data contract. */ + version: VarUint, + /** The identifier of the contract owner. */ + owner_id: Identifier, + /** Shared subschemas to reuse across documents as $defs object */ + schema_defs: Option(Map(DefinitionName, Value)), + /** Document JSON Schemas per type */ + document_schemas: Map(DocumentName, Value), + /** The time in milliseconds that the contract was created. */ + created_at: Option(TimestampMillis), + /** The time in milliseconds that the contract was last updated. */ + updated_at: Option(TimestampMillis), + /** The block that the document was created. */ + created_at_block_height: Option(BlockHeight), + /** The block that the contract was last updated */ + updated_at_block_height: Option(BlockHeight), + /** The epoch at which the contract was created. */ + created_at_epoch: Option(EpochIndex), + /** The epoch at which the contract was last updated. */ + updated_at_epoch: Option(EpochIndex), + /** Groups that allow for specific multiparty actions on the contract */ + groups: Map(GroupContractPosition, Group), + /** The tokens on the contract. */ + tokens: Map(TokenContractPosition, TokenConfiguration), +}); +export const BatchTransitionV1 = Struct("BatchTransitionV1", { + owner_id: Identifier, + transitions: Vec(BatchedTransition), + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +export const DataContractInSerializationFormat = Enum("DataContractInSerializationFormat", /** @type {const} */ ({ + V0: [DataContractInSerializationFormatV0], + V1: [DataContractInSerializationFormatV1], +})); +export const DataContractUpdateTransitionV0 = Struct("DataContractUpdateTransitionV0", { + identity_contract_nonce: IdentityNonce, + data_contract: DataContractInSerializationFormat, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.batch_state_transition" + */ +export const BatchTransition = Enum("BatchTransition", /** @type {const} */ ({ + V0: [BatchTransitionV0], + V1: [BatchTransitionV1], +})); +/** DataContractCreateTransitionV0 has the same encoding structure */ +export const DataContractCreateTransitionV0 = Struct("DataContractCreateTransitionV0", { + data_contract: DataContractInSerializationFormat, + identity_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signature_public_key_id: NotSignable(KeyID), + signature: NotSignable(BinaryData), +}); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_update_state_transition" + */ +export const DataContractUpdateTransition = Enum("DataContractUpdateTransition", /** @type {const} */ ({ + V0: [DataContractUpdateTransitionV0], +})); +/** + * platform_serialize unversioned + * platform_version_path_bounds "dpp.state_transition_serialization_versions.contract_create_state_transition" + */ +export const DataContractCreateTransition = Enum("DataContractCreateTransition", /** @type {const} */ ({ + V0: [DataContractCreateTransitionV0], +})); +/** + * platform_serialize unversioned + * platform_serialize limit = 100000 + */ +export const StateTransition = Enum("StateTransition", /** @type {const} */ ({ + DataContractCreate: [DataContractCreateTransition], + DataContractUpdate: [DataContractUpdateTransition], + Batch: [BatchTransition], + IdentityCreate: [IdentityCreateTransition], + IdentityTopUp: [IdentityTopUpTransition], + IdentityCreditWithdrawal: [IdentityCreditWithdrawalTransition], + IdentityUpdate: [IdentityUpdateTransition], + IdentityCreditTransfer: [IdentityCreditTransferTransition], + MasternodeVote: [MasternodeVoteTransition], +})); +// NOT NEEDED: ActionGoal +// NOT NEEDED: ActionTaker +// NOT NEEDED: AddOperation +// NOT NEEDED: AddrV2 +// NOT NEEDED: AddrV2Message +// NOT NEEDED: DUPLICATE_Address +// NOT NEEDED: AddressEncoding +// NOT NEEDED: AddressInner +// NOT NEEDED: AddressType +// NOT NEEDED: All +// NOT NEEDED: AllowedCurrency +// NOT NEEDED: Amount +// NOT NEEDED: Annex +// NOT NEEDED: ArrayDeserializer +// NOT NEEDED: ArrayItemType +// NOT NEEDED: AssetLockOutputNotFoundError +// NOT NEEDED: AssetLockProofType +// NOT NEEDED: AssetLockTransactionIsNotFoundError +// NOT NEEDED: AssetLockValue +// NOT NEEDED: AssetLockValueV0 +// NOT NEEDED: AssetUnlockBasePayload +// NOT NEEDED: AssetUnlockBaseTransactionInfo +// NOT NEEDED: AssetUnlockPayload +// NOT NEEDED: AssetUnlockRequestInfo +// NOT NEEDED: BLSPublicKey +// NOT NEEDED: BLSSignature +// NOT NEEDED: BalanceChange +// NOT NEEDED: BalanceChangeForIdentity +// NOT NEEDED: BalanceIsNotEnoughError +// NOT NEEDED: BasicBLSError +// NOT NEEDED: BasicECDSAError +// NOT NEEDED: BasicError +// NOT NEEDED: BatchedTransitionMutRef +// NOT NEEDED: BatchedTransitionRef +// NOT NEEDED: BinVisitor +// NOT NEEDED: BinWriter +// NOT NEEDED: Bip34Error +// NOT NEEDED: BitStreamReader +// NOT NEEDED: BitStreamWriter +// NOT NEEDED: Block +// NOT NEEDED: BlockFilter +// NOT NEEDED: BlockFilterReader +// NOT NEEDED: BlockFilterWriter +// NOT NEEDED: DUPLICATE_BlockHash +// NOT NEEDED: BlockInfo +// NOT NEEDED: BlockTransactions +// NOT NEEDED: BlockTransactionsRequest +// NOT NEEDED: BlockTxn +// NOT NEEDED: BloomFlags +// NOT NEEDED: BorrowedPair +// NOT NEEDED: Builder +// NOT NEEDED: ByteArrayKeyword +// NOT NEEDED: ByteArrayPropertySizes +// NOT NEEDED: Bytes +// NOT NEEDED: Bytes20 +// NOT NEEDED: Bytes32 +// NOT NEEDED: Bytes36 +// NOT NEEDED: BytesPerEpoch +// NOT NEEDED: BytesPerEpochByIdentifier +// NOT NEEDED: CFCheckpt +// NOT NEEDED: CFHeaders +// NOT NEEDED: CFilter +// NOT NEEDED: CachedEpochIndexFeeVersions +// NOT NEEDED: CachedEpochIndexFeeVersionsFieldsBeforeVersion4 +// NOT NEEDED: CborCanonicalMap +// NOT NEEDED: ChainCode +// NOT NEEDED: ChainHash +// NOT NEEDED: ChainLock +// NOT NEEDED: CheckedData +// NOT NEEDED: ChildNumber +// NOT NEEDED: ChoosingTokenMintRecipientNotAllowedError +// NOT NEEDED: Class +// NOT NEEDED: ClassifyContext +// NOT NEEDED: ClientDataRetrievalError +// NOT NEEDED: CmpctBlock +// NOT NEEDED: CoinbasePayload +// NOT NEEDED: CommandString +// NOT NEEDED: CommandStringError +// NOT NEEDED: CommonCache +// NOT NEEDED: CompactTarget +// NOT NEEDED: CompatibleProtocolVersionIsNotDefinedError +// NOT NEEDED: ConfirmedHash +// NOT NEEDED: ConfirmedHashHashedWithProRegTx +// NOT NEEDED: ConsensusError +// NOT NEEDED: ConsensusValidationResult +// NOT NEEDED: Contender +// NOT NEEDED: ContenderV0 +// NOT NEEDED: ContenderWithSerializedDocument +// NOT NEEDED: ContenderWithSerializedDocumentV0 +// NOT NEEDED: ContestedDocumentVotePollStatus +// NOT NEEDED: ContestedDocumentVotePollStoredInfo +// NOT NEEDED: ContestedDocumentVotePollStoredInfoV0 +// NOT NEEDED: ContestedDocumentVotePollStoredInfoVoteEventV0 +// NOT NEEDED: ContestedDocumentVotePollWinnerInfo +// NOT NEEDED: ContestedDocumentsTemporarilyNotAllowedError +// NOT NEEDED: ContestedIndexFieldMatch +// NOT NEEDED: ContestedIndexInformation +// NOT NEEDED: ContestedIndexResolution +// NOT NEEDED: ContestedUniqueIndexOnMutableDocumentTypeError +// NOT NEEDED: ContestedUniqueIndexWithUniqueIndexError +// NOT NEEDED: ContractBoundsType +// NOT NEEDED: ContractHasNoTokensError +// NOT NEEDED: ControlBlock +// NOT NEEDED: ConversionError +// NOT NEEDED: CopyOperation +// NOT NEEDED: DUPLICATE_CoreBlockHeight +// NOT NEEDED: CreatedDataContract +// NOT NEEDED: CreatedDataContractInSerializationFormat +// NOT NEEDED: CreatedDataContractInSerializationFormatV0 +// NOT NEEDED: CreatedDataContractV0 +// NOT NEEDED: CreationRestrictionMode +// NOT NEEDED: CreditsPerEpoch +// NOT NEEDED: CreditsPerEpochByIdentifier +// NOT NEEDED: CycleHash +// NOT NEEDED: DKGParams +// NOT NEEDED: DPPError +// NOT NEEDED: DUPLICATE_DashPlatformProtocol +// NOT NEEDED: DashPlatformProtocolInitError +// NOT NEEDED: DataBuilder +// NOT NEEDED: DataContract +// NOT NEEDED: DataContractAlreadyPresentError +// NOT NEEDED: DataContractBoundsNotPresentError +// NOT NEEDED: DataContractConfigUpdateError +// NOT NEEDED: DataContractCreateTransitionLatest +// NOT NEEDED: DataContractError +// NOT NEEDED: DataContractFacade +// NOT NEEDED: DataContractFactory +// NOT NEEDED: DataContractFactoryV0 +// NOT NEEDED: DataContractHaveNewUniqueIndexError +// NOT NEEDED: DataContractImmutablePropertiesUpdateError +// NOT NEEDED: DataContractInvalidIndexDefinitionUpdateError +// NOT NEEDED: DataContractIsReadonlyError +// NOT NEEDED: DataContractMaxDepthExceedError +// NOT NEEDED: DUPLICATE_DataContractNotPresentError +// NOT NEEDED: DataContractTokenConfigurationUpdateError +// NOT NEEDED: DataContractUniqueIndicesChangedError +// NOT NEEDED: DataContractUpdateActionNotAllowedError +// NOT NEEDED: DataContractUpdatePermissionError +// NOT NEEDED: DataContractUpdateTransitionLatest +// NOT NEEDED: DataContractV0 +// NOT NEEDED: DataContractV1 +// NOT NEEDED: DataTriggerConditionError +// NOT NEEDED: DataTriggerError +// NOT NEEDED: DataTriggerExecutionError +// NOT NEEDED: DataTriggerInvalidResultError +// NOT NEEDED: DUPLICATE_DecodeError +// NOT NEEDED: DecodeInitError +// NOT NEEDED: DecodeProtocolIdentity +// NOT NEEDED: Decoder +// NOT NEEDED: DecodingError +// NOT NEEDED: DefaultEntropyGenerator +// NOT NEEDED: DeletedQuorum +// NOT NEEDED: Denomination +// NOT NEEDED: DerivationPath +// NOT NEEDED: DerivationPathIterator +// NOT NEEDED: DerivationPathReference +// NOT NEEDED: Deserializer +// NOT NEEDED: DestinationIdentityForTokenMintingNotSetError +// NOT NEEDED: DisablingKeyIdAlsoBeingAddedInSameTransitionError +// NOT NEEDED: Display +// NOT NEEDED: DisplayExpected +// NOT NEEDED: DisplayStyle +// NOT NEEDED: DisplayUnchecked +// NOT NEEDED: DisplayWrapper +// NOT NEEDED: DistributionAmount +// NOT NEEDED: DistributionLeftovers +// NOT NEEDED: Document +// NOT NEEDED: DocumentAlreadyPresentError +// NOT NEEDED: DocumentBatchIterator +// NOT NEEDED: DocumentBatchV1Iterator +// NOT NEEDED: DocumentContestCurrentlyLockedError +// NOT NEEDED: DocumentContestDocumentWithSameIdAlreadyPresentError +// NOT NEEDED: DocumentContestIdentityAlreadyContestantError +// NOT NEEDED: DocumentContestNotJoinableError +// NOT NEEDED: DocumentContestNotPaidForError +// NOT NEEDED: DocumentCreationNotAllowedError +// NOT NEEDED: DocumentError +// NOT NEEDED: DocumentFacade +// NOT NEEDED: DocumentFactory +// NOT NEEDED: DocumentFactoryV0 +// NOT NEEDED: DocumentFieldFillSize +// NOT NEEDED: DocumentFieldFillType +// NOT NEEDED: DocumentFieldMaxSizeExceededError +// NOT NEEDED: DocumentForCbor +// NOT NEEDED: DocumentIncorrectPurchasePriceError +// NOT NEEDED: DocumentNotForSaleError +// NOT NEEDED: DocumentNotFoundError +// NOT NEEDED: DocumentOwnerIdMismatchError +// NOT NEEDED: DocumentPatch +// NOT NEEDED: DocumentProperty +// NOT NEEDED: DocumentPropertyType +// NOT NEEDED: DocumentPropertyTypeParsingOptions +// NOT NEEDED: DocumentTimestampWindowViolationError +// NOT NEEDED: DocumentTimestampsAreEqualError +// NOT NEEDED: DocumentTimestampsMismatchError +// NOT NEEDED: DocumentTransitionActionType +// NOT NEEDED: DocumentTransitionsAreAbsentError +// NOT NEEDED: DocumentType +// NOT NEEDED: DocumentTypeMutRef +// NOT NEEDED: DocumentTypeRef +// NOT NEEDED: DocumentTypeUpdateError +// NOT NEEDED: DocumentTypeV0 +// NOT NEEDED: DocumentTypeV1 +// NOT NEEDED: DocumentTypesAreMissingError +// NOT NEEDED: DocumentV0 +// NOT NEEDED: Duffs +// NOT NEEDED: DuplicateDocumentTransitionsWithIdsError +// NOT NEEDED: DuplicateDocumentTransitionsWithIndicesError +// NOT NEEDED: DuplicateIndexError +// NOT NEEDED: DuplicateIndexNameError +// NOT NEEDED: DuplicateUniqueIndexError +// NOT NEEDED: DuplicatedIdentityPublicKeyBasicError +// NOT NEEDED: DuplicatedIdentityPublicKeyIdBasicError +// NOT NEEDED: DuplicatedIdentityPublicKeyIdStateError +// NOT NEEDED: DuplicatedIdentityPublicKeyStateError +// NOT NEEDED: DUPLICATE_EcdsaSighashType +// NOT NEEDED: EmptyWrite +// NOT NEEDED: EncodeSigningDataResult +// NOT NEEDED: Encoder +// NOT NEEDED: Encoding +// NOT NEEDED: EntryMasternodeType +// NOT NEEDED: Epoch +// NOT NEEDED: EpochIndexFeeVersionsForStorage +// NOT NEEDED: DUPLICATE_Error +// NOT NEEDED: ErrorTrackingWriter +// NOT NEEDED: ExpectedDocumentsData +// NOT NEEDED: ExtendedBlockInfo +// NOT NEEDED: ExtendedBlockInfoV0 +// NOT NEEDED: ExtendedDocument +// NOT NEEDED: ExtendedDocumentV0 +// NOT NEEDED: ExtendedDocumentVisitor +// NOT NEEDED: ExtendedEpochInfo +// NOT NEEDED: ExtendedEpochInfoV0 +// NOT NEEDED: ExtendedPrivKey +// NOT NEEDED: ExtendedPubKey +// NOT NEEDED: FeeError +// NOT NEEDED: FeeMultiplier +// NOT NEEDED: FeeRate +// NOT NEEDED: FeeRefunds +// NOT NEEDED: FeeResult +// NOT NEEDED: FetchAndValidateDataContract +// NOT NEEDED: FieldMinMaxBounds +// NOT NEEDED: FieldType +// NOT NEEDED: FieldTypeWeights +// NOT NEEDED: FilterAdd +// NOT NEEDED: FilterHash +// NOT NEEDED: FilterHeader +// NOT NEEDED: FilterLoad +// NOT NEEDED: FinalizedContender +// NOT NEEDED: FinalizedContenderWithSerializedDocument +// NOT NEEDED: FinalizedEpochInfo +// NOT NEEDED: FinalizedEpochInfoV0 +// NOT NEEDED: FinalizedResourceVoteChoicesWithVoterInfo +// NOT NEEDED: Fingerprint +// NOT NEEDED: FormatOptions +// NOT NEEDED: FromHexError +// NOT NEEDED: FrozenIdentifier +// NOT NEEDED: FutureLeafVersion +// NOT NEEDED: GcsFilter +// NOT NEEDED: GcsFilterReader +// NOT NEEDED: GcsFilterWriter +// NOT NEEDED: GetBlockTxn +// NOT NEEDED: GetBlocksMessage +// NOT NEEDED: GetCFCheckpt +// NOT NEEDED: GetCFHeaders +// NOT NEEDED: GetCFilters +// NOT NEEDED: GetDataContractSecurityLevelRequirementFn +// NOT NEEDED: GetHeadersMessage +// NOT NEEDED: GetKeyError +// NOT NEEDED: GetMnListDiff +// NOT NEEDED: GetQRInfo +// NOT NEEDED: GroupAction +// NOT NEEDED: GroupActionAlreadyCompletedError +// NOT NEEDED: GroupActionAlreadySignedByIdentityError +// NOT NEEDED: GroupActionDoesNotExistError +// NOT NEEDED: GroupActionEvent +// NOT NEEDED: GroupActionNotAllowedOnTransitionError +// NOT NEEDED: GroupActionStatus +// NOT NEEDED: GroupActionV0 +// NOT NEEDED: GroupExceedsMaxMembersError +// NOT NEEDED: GroupMemberHasPowerOfZeroError +// NOT NEEDED: GroupMemberHasPowerOverLimitError +// NOT NEEDED: GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError +// NOT NEEDED: GroupPositionDoesNotExistError +// NOT NEEDED: GroupStateTransitionInfoStatus +// NOT NEEDED: GroupStateTransitionResolvedInfo +// NOT NEEDED: GroupSumPower +// NOT NEEDED: GroupTotalPowerLessThanRequiredError +// NOT NEEDED: HRVisitor +// NOT NEEDED: Header +// NOT NEEDED: HeaderAndShortIds +// NOT NEEDED: HeaderDeserializationWrapper +// NOT NEEDED: HeaderSerializationWrapper +// NOT NEEDED: DUPLICATE_Height +// NOT NEEDED: Hex +// NOT NEEDED: HiddenNodes +// NOT NEEDED: IHeader +// NOT NEEDED: IdentitiesContractKeys +// NOT NEEDED: Identity +// NOT NEEDED: IdentityAlreadyExistsError +// NOT NEEDED: IdentityAssetLockProofLockedTransactionMismatchError +// NOT NEEDED: IdentityAssetLockStateTransitionReplayError +// NOT NEEDED: IdentityAssetLockTransactionIsNotFoundError +// NOT NEEDED: IdentityAssetLockTransactionOutPointAlreadyConsumedError +// NOT NEEDED: IdentityAssetLockTransactionOutPointNotEnoughBalanceError +// NOT NEEDED: IdentityAssetLockTransactionOutputNotFoundError +// NOT NEEDED: IdentityCreateTransitionLatest +// NOT NEEDED: IdentityCreateTransitionV0Inner +// NOT NEEDED: IdentityCreditTransferToSelfError +// NOT NEEDED: IdentityCreditTransferTransitionLatest +// NOT NEEDED: IdentityCreditWithdrawalTransitionLatest +// NOT NEEDED: IdentityCreditWithdrawalTransitionV01 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV010 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV02 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV03 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV04 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV05 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV06 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV07 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV08 +// NOT NEEDED: IdentityCreditWithdrawalTransitionV09 +// NOT NEEDED: IdentityDoesNotHaveEnoughTokenBalanceError +// NOT NEEDED: IdentityFacade +// NOT NEEDED: IdentityFactory +// NOT NEEDED: IdentityInsufficientBalanceError +// NOT NEEDED: IdentityNotFoundError +// NOT NEEDED: IdentityNotMemberOfGroupError +// NOT NEEDED: IdentityNotPresentError +// NOT NEEDED: IdentityPublicKeyAlreadyExistsForUniqueContractBoundsError +// NOT NEEDED: IdentityPublicKeyIsDisabledError +// NOT NEEDED: IdentityPublicKeyIsReadOnlyError +// NOT NEEDED: IdentityTokenAccountAlreadyFrozenError +// NOT NEEDED: IdentityTokenAccountFrozenError +// NOT NEEDED: IdentityTokenAccountNotFrozenError +// NOT NEEDED: IdentityTokenInfo +// NOT NEEDED: IdentityTokenInfoV0 +// NOT NEEDED: IdentityV0 +// NOT NEEDED: IncompatibleDataContractSchemaError +// NOT NEEDED: IncompatibleDocumentTypeSchemaError +// NOT NEEDED: IncompatibleJsonSchemaOperation +// NOT NEEDED: IncompatibleProtocolVersionError +// NOT NEEDED: IncompatibleRe2PatternError +// NOT NEEDED: IncompleteBuilder +// NOT NEEDED: InconsistentCompoundIndexDataError +// NOT NEEDED: Index +// NOT NEEDED: IndexConstPath +// NOT NEEDED: IndexLevel +// NOT NEEDED: IndexLevelTypeInfo +// NOT NEEDED: IndexName +// NOT NEEDED: IndexOrderDirection +// NOT NEEDED: IndexProperties +// NOT NEEDED: IndexProperty +// NOT NEEDED: IndexPropertyName +// NOT NEEDED: IndexType +// NOT NEEDED: Input +// NOT NEEDED: InputWeightPrediction +// NOT NEEDED: InputsHash +// NOT NEEDED: DUPLICATE_InstantLock +// NOT NEEDED: Instruction +// NOT NEEDED: InstructionIndices +// NOT NEEDED: Instructions +// NOT NEEDED: IntegerReplacementType +// NOT NEEDED: InvalidActionIdError +// NOT NEEDED: InvalidAssetLockProofCoreChainHeightError +// NOT NEEDED: InvalidAssetLockProofTransactionHeightError +// NOT NEEDED: InvalidAssetLockTransactionOutputReturnSizeError +// NOT NEEDED: InvalidCompoundIndexError +// NOT NEEDED: InvalidDataContractIdError +// NOT NEEDED: InvalidDataContractVersionError +// NOT NEEDED: InvalidDocumentRevisionError +// NOT NEEDED: InvalidDocumentTransitionActionError +// NOT NEEDED: InvalidDocumentTransitionIdError +// NOT NEEDED: DUPLICATE_InvalidDocumentTypeError +// NOT NEEDED: InvalidDocumentTypeNameError +// NOT NEEDED: InvalidDocumentTypeRequiredSecurityLevelError +// NOT NEEDED: InvalidGroupPositionError +// NOT NEEDED: InvalidIdentifierError +// NOT NEEDED: InvalidIdentityAssetLockProofChainLockValidationError +// NOT NEEDED: InvalidIdentityAssetLockTransactionError +// NOT NEEDED: InvalidIdentityAssetLockTransactionOutputError +// NOT NEEDED: InvalidIdentityCreditTransferAmountError +// NOT NEEDED: InvalidIdentityCreditWithdrawalTransitionAmountError +// NOT NEEDED: InvalidIdentityCreditWithdrawalTransitionCoreFeeError +// NOT NEEDED: InvalidIdentityCreditWithdrawalTransitionOutputScriptError +// NOT NEEDED: InvalidIdentityKeySignatureError +// NOT NEEDED: InvalidIdentityNonceError +// NOT NEEDED: InvalidIdentityPublicKeyDataError +// NOT NEEDED: InvalidIdentityPublicKeyIdError +// NOT NEEDED: InvalidIdentityPublicKeySecurityLevelError +// NOT NEEDED: DUPLICATE_InvalidIdentityPublicKeyTypeError +// NOT NEEDED: InvalidIdentityRevisionError +// NOT NEEDED: InvalidIdentityUpdateTransitionDisableKeysError +// NOT NEEDED: InvalidIdentityUpdateTransitionEmptyError +// NOT NEEDED: InvalidIndexPropertyTypeError +// NOT NEEDED: InvalidIndexedPropertyConstraintError +// NOT NEEDED: InvalidInstantAssetLockProofError +// NOT NEEDED: InvalidInstantAssetLockProofSignatureError +// NOT NEEDED: InvalidJsonSchemaRefError +// NOT NEEDED: InvalidSignaturePublicKeyError +// NOT NEEDED: InvalidSignaturePublicKeyPurposeError +// NOT NEEDED: InvalidSignaturePublicKeySecurityLevelError +// NOT NEEDED: InvalidStateTransitionSignatureError +// NOT NEEDED: InvalidStateTransitionTypeError +// NOT NEEDED: InvalidTokenAmountError +// NOT NEEDED: InvalidTokenBaseSupplyError +// NOT NEEDED: InvalidTokenClaimNoCurrentRewards +// NOT NEEDED: InvalidTokenClaimPropertyMismatch +// NOT NEEDED: InvalidTokenClaimWrongClaimant +// NOT NEEDED: InvalidTokenConfigUpdateNoChangeError +// NOT NEEDED: InvalidTokenDistributionFunctionDivideByZeroError +// NOT NEEDED: InvalidTokenDistributionFunctionIncoherenceError +// NOT NEEDED: InvalidTokenDistributionFunctionInvalidParameterError +// NOT NEEDED: InvalidTokenDistributionFunctionInvalidParameterTupleError +// NOT NEEDED: InvalidTokenIdError +// NOT NEEDED: InvalidTokenNoteTooBigError +// NOT NEEDED: InvalidTokenPositionError +// NOT NEEDED: InvalidVectorSizeError +// NOT NEEDED: Inventory +// NOT NEEDED: IoWrapper +// NOT NEEDED: IsIndexUnique +// NOT NEEDED: Iter +// NOT NEEDED: IterReader +// NOT NEEDED: JsonPath +// NOT NEEDED: JsonPathLiteral +// NOT NEEDED: JsonPathStep +// NOT NEEDED: JsonSchema +// NOT NEEDED: JsonSchemaCompilationError +// NOT NEEDED: DUPLICATE_JsonSchemaError +// NOT NEEDED: JsonSchemaErrorData +// NOT NEEDED: DUPLICATE_JsonSchemaValidator +// NOT NEEDED: JsonStateTransitionSerializationOptions +// NOT NEEDED: Key +// NOT NEEDED: KeyCount +// NOT NEEDED: KeyDerivationType +// NOT NEEDED: KeyRequest +// NOT NEEDED: KeySource +// NOT NEEDED: Keys +// NOT NEEDED: KnownCostItem +// NOT NEEDED: LLMQEntryVerificationSkipStatus +// NOT NEEDED: LLMQEntryVerificationStatus +// NOT NEEDED: LLMQModifierType +// NOT NEEDED: LLMQParams +// NOT NEEDED: LLMQQuarterReconstructionType +// NOT NEEDED: LLMQQuarterType +// NOT NEEDED: LLMQQuarterUsageType +// NOT NEEDED: LLMQType +// NOT NEEDED: LazyRegex +// NOT NEEDED: LeafNode +// NOT NEEDED: LeafNodes +// NOT NEEDED: LeafVersion +// NOT NEEDED: LegacySighash +// NOT NEEDED: DUPLICATE_LockTime +// NOT NEEDED: LockTimeUnit +// NOT NEEDED: LockedVotePollCounter +// NOT NEEDED: Lower +// NOT NEEDED: MNSkipListMode +// NOT NEEDED: MapKeySerializer +// NOT NEEDED: MasterPublicKeyUpdateError +// NOT NEEDED: MasternodeIncorrectVoterIdentityIdError +// NOT NEEDED: MasternodeIncorrectVotingAddressError +// NOT NEEDED: MasternodeList +// NOT NEEDED: MasternodeListBuilder +// NOT NEEDED: MasternodeListEngine +// NOT NEEDED: MasternodeListEntry +// NOT NEEDED: MasternodeNotFoundError +// NOT NEEDED: MasternodeVoteAlreadyPresentError +// NOT NEEDED: MasternodeVoteTransitionLatest +// NOT NEEDED: MasternodeVotedTooManyTimesError +// NOT NEEDED: MaxDepthValidationResult +// NOT NEEDED: MaxDocumentsTransitionsExceededError +// NOT NEEDED: MaxIdentityPublicKeyLimitReachedError +// NOT NEEDED: MergeIdentityNonceResult +// NOT NEEDED: MerkleBlock +// NOT NEEDED: MerkleBlockError +// NOT NEEDED: MerkleRootMasternodeList +// NOT NEEDED: MerkleRootQuorums +// NOT NEEDED: MessageSignature +// NOT NEEDED: MessageSignatureError +// NOT NEEDED: MessageVerificationError +// NOT NEEDED: Metadata +// NOT NEEDED: MissingDataContractIdBasicError +// NOT NEEDED: MissingDefaultLocalizationError +// NOT NEEDED: MissingDocumentTransitionActionError +// NOT NEEDED: MissingDocumentTransitionTypeError +// NOT NEEDED: MissingDocumentTypeError +// NOT NEEDED: MissingIdentityPublicKeyIdsError +// NOT NEEDED: MissingMasterPublicKeyError +// NOT NEEDED: MissingPositionsInDocumentTypePropertiesError +// NOT NEEDED: MissingPublicKeyError +// NOT NEEDED: MissingStateTransitionTypeError +// NOT NEEDED: MissingTransferKeyError +// NOT NEEDED: MnListDiff +// NOT NEEDED: MoveOperation +// NOT NEEDED: NativeBlsModule +// NOT NEEDED: Network +// NOT NEEDED: NetworkChecked +// NOT NEEDED: NetworkMessage +// NOT NEEDED: NetworkUnchecked +// NOT NEEDED: NewAuthorizedActionTakerGroupDoesNotExistError +// NOT NEEDED: NewAuthorizedActionTakerIdentityDoesNotExistError +// NOT NEEDED: NewAuthorizedActionTakerMainGroupNotSetError +// NOT NEEDED: NewTokensDestinationIdentityDoesNotExistError +// NOT NEEDED: NoTransferKeyForCoreWithdrawalAvailableError +// NOT NEEDED: NodeInfo +// NOT NEEDED: NonConsensusError +// NOT NEEDED: NonContiguousContractGroupPositionsError +// NOT NEEDED: NonContiguousContractTokenPositionsError +// NOT NEEDED: DUPLICATE_NonStandardSighashType +// NOT NEEDED: NonceOutOfBoundsError +// NOT NEEDED: NotImplementedIdentityCreditWithdrawalTransitionPoolingError +// NOT NEEDED: OperationError +// NOT NEEDED: OperatorPublicKey +// NOT NEEDED: OrderBy +// NOT NEEDED: Output +// NOT NEEDED: OutputType +// NOT NEEDED: OverflowError +// NOT NEEDED: OwnedPair +// NOT NEEDED: Pair +// NOT NEEDED: Params +// NOT NEEDED: ParentDocumentOptions +// NOT NEEDED: ParseAmountError +// NOT NEEDED: ParseIntError +// NOT NEEDED: ParseNetworkError +// NOT NEEDED: ParseOutPointError +// NOT NEEDED: PartialIdentity +// NOT NEEDED: PartialMerkleTree +// NOT NEEDED: PartiallySignedTransaction +// NOT NEEDED: PastAssetLockStateTransitionHashes +// NOT NEEDED: Patch +// NOT NEEDED: PatchDiffer +// NOT NEEDED: PatchError +// NOT NEEDED: PatchErrorKind +// NOT NEEDED: PatchOperation +// NOT NEEDED: Payload +// NOT NEEDED: PlatformItemKey +// NOT NEEDED: PreferredKeyPurposeForSigningWithdrawal +// NOT NEEDED: PrefilledTransaction +// NOT NEEDED: PrefundedSpecializedBalanceIdentifier +// NOT NEEDED: PrefundedSpecializedBalanceInsufficientError +// NOT NEEDED: PrefundedSpecializedBalanceNotFoundError +// NOT NEEDED: Prevouts +// NOT NEEDED: PrivateKey +// NOT NEEDED: ProTxHash +// NOT NEEDED: PropertyPath +// NOT NEEDED: ProprietaryKey +// NOT NEEDED: ProprietaryType +// NOT NEEDED: ProtocolError +// NOT NEEDED: ProtocolValidationOperation +// NOT NEEDED: ProtocolVersion +// NOT NEEDED: ProtocolVersionParsingError +// NOT NEEDED: ProtocolVersionVoteCount +// NOT NEEDED: ProviderMasternodeType +// NOT NEEDED: ProviderRegistrationPayload +// NOT NEEDED: ProviderUpdateRegistrarPayload +// NOT NEEDED: ProviderUpdateRevocationPayload +// NOT NEEDED: ProviderUpdateServicePayload +// NOT NEEDED: Psbt +// NOT NEEDED: PsbtHash +// NOT NEEDED: PsbtParseError +// NOT NEEDED: PsbtSighashType +// NOT NEEDED: PubkeyHash +// NOT NEEDED: PublicKey +// NOT NEEDED: PublicKeyIsDisabledError +// NOT NEEDED: PublicKeyMismatchError +// NOT NEEDED: DUPLICATE_PublicKeySecurityLevelNotMetError +// NOT NEEDED: PublicKeyValidationError +// NOT NEEDED: PushBytes +// NOT NEEDED: PushBytesBuf +// NOT NEEDED: DUPLICATE_PushBytesError +// NOT NEEDED: PushDataLenLen +// NOT NEEDED: QRInfo +// NOT NEEDED: QualifiedMasternodeListEntry +// NOT NEEDED: QualifiedQuorumEntry +// NOT NEEDED: QuorumCLSigObject +// NOT NEEDED: QuorumCommitmentHash +// NOT NEEDED: QuorumCommitmentPayload +// NOT NEEDED: QuorumEntry +// NOT NEEDED: QuorumEntryHash +// NOT NEEDED: QuorumHash +// NOT NEEDED: QuorumModifierHash +// NOT NEEDED: QuorumOrderingHash +// NOT NEEDED: QuorumSigningRequestId +// NOT NEEDED: QuorumSigningSignId +// NOT NEEDED: QuorumSnapshot +// NOT NEEDED: QuorumVVecHash +// NOT NEEDED: QuorumValidationError +// NOT NEEDED: RandomDocumentTypeParameters +// NOT NEEDED: RawAssetLockProof +// NOT NEEDED: RawNetworkMessage +// NOT NEEDED: ReadBytesFromFiniteReaderOpts +// NOT NEEDED: RecipientIdentifier +// NOT NEEDED: RecipientIdentityDoesNotExistError +// NOT NEEDED: Reject +// NOT NEEDED: RejectReason +// NOT NEEDED: RemoveOperation +// NOT NEEDED: ReplaceOperation +// NOT NEEDED: ReplacementType +// NOT NEEDED: RequiredSigners +// NOT NEEDED: RewardDistributionMoment +// NOT NEEDED: RewardRatio +// NOT NEEDED: SMLEntry +// NOT NEEDED: SMLStore +// NOT NEEDED: Script +// NOT NEEDED: ScriptHash +// NOT NEEDED: ScriptLeaf +// NOT NEEDED: ScriptLeaves +// NOT NEEDED: ScriptMerkleProofMap +// NOT NEEDED: ScriptPath +// NOT NEEDED: SegwitCache +// NOT NEEDED: SegwitV0Sighash +// NOT NEEDED: SendCmpct +// NOT NEEDED: SeqIterator +// NOT NEEDED: SerdeParsingError +// NOT NEEDED: SerializeBytesAsHex +// NOT NEEDED: SerializeMap +// NOT NEEDED: SerializeStructVariant +// NOT NEEDED: SerializeTupleVariant +// NOT NEEDED: SerializeVec +// NOT NEEDED: SerializedObjectParsingError +// NOT NEEDED: SerializedSignature +// NOT NEEDED: Serializer +// NOT NEEDED: ServiceFlags +// NOT NEEDED: Sha256dHash +// NOT NEEDED: ShortId +// NOT NEEDED: ShouldInsertWithAllNull +// NOT NEEDED: SigHashCache +// NOT NEEDED: SigHashType +// NOT NEEDED: SighashCache +// NOT NEEDED: SighashComponents +// NOT NEEDED: DUPLICATE_SighashTypeParseError +// NOT NEEDED: SignError +// NOT NEEDED: SignableBytesHasher +// NOT NEEDED: DUPLICATE_Signature +// NOT NEEDED: SignatureError +// NOT NEEDED: SignatureShouldNotBePresentError +// NOT NEEDED: SignedAmount +// NOT NEEDED: SignedCredits +// NOT NEEDED: SignedCreditsPerEpoch +// NOT NEEDED: SignedTokenAmount +// NOT NEEDED: SigningAlgorithm +// NOT NEEDED: SigningErrors +// NOT NEEDED: SigningKeys +// NOT NEEDED: SimpleConsensusValidationResult +// NOT NEEDED: SimpleValidationResult +// NOT NEEDED: SimplifiedMNList +// NOT NEEDED: Sink +// NOT NEEDED: SmallVec +// NOT NEEDED: SmlError +// NOT NEEDED: SortKey +// NOT NEEDED: SpecialTransactionPayloadHash +// NOT NEEDED: SpecializedDocumentFactory +// NOT NEEDED: SpecializedDocumentFactoryV0 +// NOT NEEDED: SplitFeatureVersionOutcome +// NOT NEEDED: StartAtIncluded +// NOT NEEDED: StateError +// NOT NEEDED: StateTransitionError +// NOT NEEDED: StateTransitionFactory +// NOT NEEDED: StateTransitionIsNotSignedError +// NOT NEEDED: StateTransitionMaxSizeExceededError +// NOT NEEDED: StateTransitionProofResult +// NOT NEEDED: StateTransitionType +// NOT NEEDED: StatelessJsonSchemaLazyValidator +// NOT NEEDED: StorageAndProcessingPoolCredits +// NOT NEEDED: StoredAssetLockInfo +// NOT NEEDED: StringPropertySizes +// NOT NEEDED: SubValidator +// NOT NEEDED: SumTokenAmount +// NOT NEEDED: SystemPropertyIndexAlreadyPresentError +// NOT NEEDED: TapLeaf +// NOT NEEDED: TapSighashType +// NOT NEEDED: TapTree +// NOT NEEDED: TaprootBuilder +// NOT NEEDED: TaprootBuilderError +// NOT NEEDED: TaprootCache +// NOT NEEDED: TaprootError +// NOT NEEDED: TaprootMerkleBranch +// NOT NEEDED: TaprootSpendInfo +// NOT NEEDED: Target +// NOT NEEDED: TestConsensusError +// NOT NEEDED: DUPLICATE_TestData +// NOT NEEDED: TestOperation +// NOT NEEDED: DUPLICATE_Time +// NOT NEEDED: TimestampIncluded +// NOT NEEDED: TokenAlreadyPausedError +// NOT NEEDED: TokenCosts +// NOT NEEDED: TokenCostsV0 +// NOT NEEDED: TokenDistributionInfo +// NOT NEEDED: TokenDistributionKey +// NOT NEEDED: TokenDistributionResolvedRecipient +// NOT NEEDED: TokenDistributionTypeWithResolvedRecipient +// NOT NEEDED: TokenDistributionWeight +// NOT NEEDED: TokenError +// NOT NEEDED: TokenEvent +// NOT NEEDED: TokenEventPersonalEncryptedNote +// NOT NEEDED: TokenEventPublicNote +// NOT NEEDED: TokenEventSharedEncryptedNote +// NOT NEEDED: TokenIsPausedError +// NOT NEEDED: TokenMintPastMaxSupplyError +// NOT NEEDED: TokenName +// NOT NEEDED: TokenNotPausedError +// NOT NEEDED: TokenSettingMaxSupplyToLessThanCurrentSupplyError +// NOT NEEDED: TokenStatus +// NOT NEEDED: TokenStatusV0 +// NOT NEEDED: TokenTransferRecipientIdentityNotExistError +// NOT NEEDED: TokenTransferToOurselfError +// NOT NEEDED: TokenTransitionActionType +// NOT NEEDED: TooManyMasterPublicKeyError +// NOT NEEDED: TotalCreditsBalance +// NOT NEEDED: TotalSingleTokenBalance +// NOT NEEDED: TotalTokensBalance +// NOT NEEDED: TradeMode +// NOT NEEDED: TransactionPayload +// NOT NEEDED: TransactionType +// NOT NEEDED: Transferable +// NOT NEEDED: TransitionFingerprint +// NOT NEEDED: TryFromError +// NOT NEEDED: TweakedKeyPair +// NOT NEEDED: TweakedPublicKey +// NOT NEEDED: TxIn +// NOT NEEDED: TxIndexOutOfRangeError +// NOT NEEDED: TxMerkleNode +// NOT NEEDED: Type +// NOT NEEDED: U256 +// NOT NEEDED: UintError +// NOT NEEDED: UnauthorizedTokenActionError +// NOT NEEDED: UndefinedIndexPropertyError +// NOT NEEDED: UniqueIndicesLimitReachedError +// NOT NEEDED: UnknownAssetLockProofTypeError +// NOT NEEDED: UnknownChainHash +// NOT NEEDED: UnknownDocumentCreationRestrictionModeError +// NOT NEEDED: UnknownSecurityLevelError +// NOT NEEDED: UnknownStorageKeyRequirementsError +// NOT NEEDED: UnknownTradeModeError +// NOT NEEDED: UnknownTransferableTypeError +// NOT NEEDED: UnsupportedFeatureError +// NOT NEEDED: UnsupportedProtocolVersionError +// NOT NEEDED: UnsupportedVersionError +// NOT NEEDED: UntweakedKeyPair +// NOT NEEDED: UntweakedPublicKey +// NOT NEEDED: Upper +// NOT NEEDED: UpperWriter +// NOT NEEDED: DUPLICATE_UsedKeyMatrix +// NOT NEEDED: ValidationResult +// NOT NEEDED: Validator +// NOT NEEDED: ValidatorSet +// NOT NEEDED: ValidatorSetV0 +// NOT NEEDED: ValidatorV0 +// NOT NEEDED: ValueError +// NOT NEEDED: ValueMapDeserializer +// NOT NEEDED: VarInt +// NOT NEEDED: Version +// NOT NEEDED: VersionError +// NOT NEEDED: VersionMessage +// NOT NEEDED: Visitor +// NOT NEEDED: VotePollNotAvailableForVotingError +// NOT NEEDED: VotePollNotFoundError +// NOT NEEDED: WPubkeyHash +// NOT NEEDED: WScriptHash +// NOT NEEDED: Weight +// NOT NEEDED: With +// NOT NEEDED: WithdrawalOutputScriptNotAllowedWhenSigningWithOwnerKeyError +// NOT NEEDED: WithdrawalTransactionIndex +// NOT NEEDED: WithdrawalTransactionIndexAndBytes +// NOT NEEDED: Witness +// NOT NEEDED: WitnessCommitment +// NOT NEEDED: WitnessMerkleNode +// NOT NEEDED: WitnessProgram +// NOT NEEDED: WitnessVersion +// NOT NEEDED: Work +// NOT NEEDED: DUPLICATE_WrongPublicKeyPurposeError +// NOT NEEDED: Wtxid +// NOT NEEDED: XpubIdentifier +// NOT NEEDED: YesNoAbstainVoteChoice diff --git a/built/DashPlatform.js/3-data-contract.d.ts b/built/DashPlatform.js/3-data-contract.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/built/DashPlatform.js/3-data-contract.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/built/DashPlatform.js/3-data-contract.js b/built/DashPlatform.js/3-data-contract.js new file mode 100644 index 0000000..6b0a219 --- /dev/null +++ b/built/DashPlatform.js/3-data-contract.js @@ -0,0 +1,63 @@ +import * as Bincode from "./src/bincode.js"; +import * as DashBincode from "./1.8.1/generated_bincode.js"; +import * as KeyUtils from "./src/key-utils.js"; +import { loadWallet } from "./src/cli.ts"; +import { deriveAllCreateIdentityKeys } from "./src/asset_lock.js"; +import { toHex } from "./src/hex.js"; +const walletKey = await loadWallet(); +let identityIndex = parseInt(process.argv[2], 10); +if (isNaN(identityIndex)) { + console.error(""); + console.error("USAGE"); + console.error(` ${process.argv[0]} ${process.argv[1]} `); + console.error(""); + console.error("EXAMPLE"); + console.error(` ${process.argv[0]} ${process.argv[1]} 0`); + console.error(""); + process.exit(1); +} +let hdOpts = { version: "testnet" }; // TODO +let { regFundKey, topupKey, // TODO next change key from wallet +assetWif, assetInfo, assetKey, masterKey, otherKey, } = await deriveAllCreateIdentityKeys(hdOpts, walletKey, identityIndex); +// TODO: GetIdentityByPublicKeyHashRequestV0 +// get the identity id +const owner_id = "TODO"; +const documentSchemas = new Map(); +documentSchemas.set("x", DashBincode.Value.Map([ +// [DashBincode.Value.Text("key"), DashBincode.Value.Text("value")], +])); +const dataContract = DashBincode.DataContractInSerializationFormatV0({ + id: DashBincode.Identifier(DashBincode.IdentifierBytes32(new Uint8Array)), // TODO + config: DashBincode.DataContractConfig.V0({ + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false + }), + version: 0, + owner_id: DashBincode.Identifier(DashBincode.IdentifierBytes32(new Uint8Array)), + document_schemas: documentSchemas, + // schema_defs: , +}); +const createDataContract = DashBincode.DataContractCreateTransitionV0({ + data_contract: DashBincode.DataContractInSerializationFormat.V0(dataContract), + identity_nonce: 0n, // TODO: https://docs.dash.org/en/latest/docs/core/dips/dip-0030.html#identity-contract-nonce + user_fee_increase: 0, + signature_public_key_id: 0, + signature: DashBincode.BinaryData(new Uint8Array), +}); +const stateTransition = DashBincode.StateTransition.DataContractCreate(DashBincode.DataContractCreateTransition.V0(createDataContract)); +{ + const signableBytes = new Uint8Array(Bincode.encode(DashBincode.StateTransition, stateTransition, { signable: true })); + const signableHash = await KeyUtils.doubleSha256(signableBytes); + const signatureBytes = await KeyUtils.magicSign({ + privKeyBytes: assetKey.privateKey, + doubleSha256Bytes: signableHash, + }); + createDataContract.signature[0] = signatureBytes; +} +const signedBytes = new Uint8Array(Bincode.encode(DashBincode.StateTransition, stateTransition)); +console.log("Signed"); +console.log(toHex(signedBytes)); diff --git a/built/DashPlatform.js/4-document.d.ts b/built/DashPlatform.js/4-document.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/built/DashPlatform.js/4-document.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/built/DashPlatform.js/4-document.js b/built/DashPlatform.js/4-document.js new file mode 100644 index 0000000..785c8aa --- /dev/null +++ b/built/DashPlatform.js/4-document.js @@ -0,0 +1,62 @@ +// import DashHd from "dashhd"; +// import * as DashHdUtils from "./dashhd-utils.ts"; +// import DashKeys from "dashkeys"; +// import * as DashTx from "dashtx"; +// import * as DashPlatform from "./dashplatform.js"; +import * as Bincode from "./src/bincode.js"; +import * as DashBincode from "./1.8.1/generated_bincode.js"; +import * as KeyUtils from "./src/key-utils.js"; +import { loadWallet } from "./src/cli.ts"; +import { deriveAllCreateIdentityKeys } from "./src/asset_lock.js"; +import { toHex } from "./src/hex.js"; +async function main() { + const walletKey = await loadWallet(); + let identityIndex = parseInt(process.argv[2], 10); + if (isNaN(identityIndex)) { + console.error(""); + console.error("USAGE"); + console.error(` ${process.argv[0]} ${process.argv[1]} `); + console.error(""); + console.error("EXAMPLE"); + console.error(` ${process.argv[0]} ${process.argv[1]} 0`); + console.error(""); + process.exit(1); + } + let hdOpts = { version: "testnet" }; // TODO + let { regFundKey, topupKey, // TODO next change key from wallet + assetWif, assetInfo, assetKey, masterKey, otherKey, } = await deriveAllCreateIdentityKeys(hdOpts, walletKey, identityIndex); + const data = new Map(); + const documentCreate = DashBincode.DocumentCreateTransitionV0({ + base: DashBincode.DocumentBaseTransition.V0(DashBincode.DocumentBaseTransitionV0({ + id: DashBincode.Identifier(DashBincode.IdentifierBytes32(new Uint8Array)), // TODO + identity_contract_nonce: 0n, + document_type_name: "", + data_contract_id: DashBincode.Identifier(DashBincode.IdentifierBytes32(new Uint8Array)), // TODO + })), + entropy: new Uint8Array, // TODO + data: data, + }); + const documentsBatch = DashBincode.DocumentsBatchTransitionV0({ + owner_id: DashBincode.Identifier(DashBincode.IdentifierBytes32(new Uint8Array)), // TODO + transitions: [ + DashBincode.DocumentTransition.Create(DashBincode.DocumentCreateTransition.V0(documentCreate)) + ], + user_fee_increase: 0, + signature_public_key_id: 0, + signature: DashBincode.BinaryData(new Uint8Array), // TODO + }); + const stateTransition = DashBincode.StateTransition.DocumentsBatch(DashBincode.DocumentsBatchTransition.V0(documentsBatch)); + { + const signableBytes = new Uint8Array(Bincode.encode(DashBincode.StateTransition, stateTransition, { signable: true })); + const signableHash = await KeyUtils.doubleSha256(signableBytes); + const signatureBytes = await KeyUtils.magicSign({ + privKeyBytes: assetKey.privateKey, + doubleSha256Bytes: signableHash, + }); + documentsBatch.signature[0] = signatureBytes; + } + const signedBytes = new Uint8Array(Bincode.encode(DashBincode.StateTransition, stateTransition)); + console.log("Signed"); + console.log(toHex(signedBytes)); +} +main(); diff --git a/built/DashPlatform.js/demo-static.d.ts b/built/DashPlatform.js/demo-static.d.ts new file mode 100644 index 0000000..c872a34 --- /dev/null +++ b/built/DashPlatform.js/demo-static.d.ts @@ -0,0 +1,44 @@ +export type EvoKey = { + id: Uint8; + /** + * - TODO constrain to members of KEY_TYPES + */ + type: Uint8; + /** + * - TODO constrain to members of KEY_PURPOSES + */ + purpose: Uint8; + /** + * - TODO constrain to members of KEY_LEVELS + */ + securityLevel: Uint8; + readOnly: boolean; + publicKey: Uint8Array; + privateKey: Uint8Array; +}; +export type STKey = { + id: Uint8; + /** + * - TODO constrain to members of KEY_TYPES + */ + type: Uint8; + /** + * - TODO constrain to members of KEY_PURPOSES + */ + purpose: Uint8; + /** + * - base64-encoded publicKey (compact) + */ + data: Base64; + /** + * - TODO constrain to members of KEY_LEVELS + */ + securityLevel: Uint8; + readOnly: boolean; +}; +export type Base58 = string; +export type Base64 = string; +export type Hex = string; +export type Uint53 = number; +export type Uint32 = number; +export type Uint8 = number; diff --git a/built/DashPlatform.js/demo-static.js b/built/DashPlatform.js/demo-static.js new file mode 100644 index 0000000..1d75ac0 --- /dev/null +++ b/built/DashPlatform.js/demo-static.js @@ -0,0 +1,695 @@ +"use strict"; +import Dotenv from "dotenv"; +import DashPhrase from "dashphrase"; +import DashHd from "./src/dashhd-utils.ts"; +import DashKeys from "dashkeys"; +import * as DashTx from "dashtx"; +import * as DashPlatform from "./src/dashplatform.js"; +import * as Bincode from "./src/bincode.js"; +import * as DashBincode from "./1.8.1/generated_bincode.js"; +import * as QRCode from "./src/_qr.js"; +import * as KeyUtils from "./src/key-utils.js"; +Dotenv.config({ path: ".env" }); +let RPC_AUTH_URL = "https://api:null@trpc.digitalcash.dev"; +// const L1_VERSION_PLATFORM = 3; +const L1_VERSION_PLATFORM = 0; +const TYPE_ASSET_LOCK = 8; +// const L2_VERSION_PLATFORM = 1; // actually constant "0" ?? +const ST_CREATE_IDENTITY = 2; +let KEY_LEVELS = { + 0: "MASTER", + 1: "CRITICAL", + 2: "HIGH", + 3: "MEDIUM", + MASTER: 0, + CRITICAL: 1, + HIGH: 2, + MEDIUM: 3, +}; +let KEY_PURPOSES = { + 0: "AUTHENTICATION", + 1: "ENCRYPTION", + 2: "DECRYPTION", + 3: "TRANSFER", + 4: "SYSTEM", + 5: "VOTING", + AUTHENTICATION: 0, + ENCRYPTION: 1, + DECRYPTION: 2, + TRANSFER: 3, + SYSTEM: 4, + VOTING: 5, +}; +let KEY_TYPES = { + 0: "ECDSA_SECP256K1", + ECDSA_SECP256K1: 0, +}; +let network = "testnet"; +let coinType = 5; // DASH +if (network === "testnet") { + coinType = 1; // testnet +} +//coinType = 1; +let identityEcdsaPath = ""; +{ + // m/purpose'/coin_type'/feature'/subfeature'/keytype'/identityindex'/keyindex' + // ex: m/9'/5'/5'/0'/0'// + let purposeDip13 = 9; + let featureId = 5; + let subfeatureKey = 0; + let keyType = KEY_TYPES.ECDSA_SECP256K1; + identityEcdsaPath = `m/${purposeDip13}'/${coinType}'/${featureId}'/${subfeatureKey}'/${keyType}'`; +} +const hdOpts = { version: "testnet" }; +async function createPlatformIdentity(walletKey, coinType, identityIndex) { + let authWalletPath = `m/9'/${coinType}'/5'/0'/0'/${identityIndex}'`; + //@ts-expect-error - monkey patch + let authWallet = await DashHd.deriveIdentAuthWalletPath(walletKey, authWalletPath); + let authMasterAddress = await authWallet.deriveAuthKey(0); + let authOtherAddress = await authWallet.deriveAuthKey(1); + let regFundAddressPath = `m/9'/${coinType}'/5'/1'/${identityIndex}`; + //@ts-expect-error - monkey patch + let regFundAddress = await DashHd.deriveIdentRegFundKeyPath(walletKey, regFundAddressPath); + let assetAddress = await DashHd.deriveChild(regFundAddress, 0, DashHd.HARDENED); + let topupAddressPath = `m/9'/${coinType}'/5'/2'/0`; + //@ts-expect-error - monkey patch + let topupAddress = await DashHd.deriveIdentTopupKeyPath(walletKey, topupAddressPath); + console.log(); + console.log(`Identity Index: ${identityIndex}, Topup Index: 0`); + console.log("Funding WIF", await DashHd.toWif(regFundAddress.privateKey, hdOpts)); + console.log("Asset WIF", await DashHd.toWif(assetAddress.privateKey, hdOpts), "(would be ephemeral, non-hd)"); + console.log("Auth master WIF", await DashHd.toWif(authMasterAddress.privateKey, hdOpts)); + console.log("Auth other WIF", await DashHd.toWif(authOtherAddress.privateKey, hdOpts)); + console.log("Topup WIF", await DashHd.toWif(topupAddress.privateKey, hdOpts), "(will be used for change)"); + console.log(); + return regFundAddress; +} +async function main() { + let walletPhrase = process.env.DASH_WALLET_PHRASE; + let walletSalt = process.env.DASH_WALLET_SALT ?? ""; + if (!walletPhrase) { + console.error(""); + console.error("ERROR"); + console.error(" 'DASH_WALLET_PHRASE' is not set"); + console.error(""); + console.error("SOLUTION"); + let newPhrase = await DashPhrase.generate(); + console.error(` echo 'DASH_WALLET_PHRASE="${newPhrase}"' >> .env`); + console.error(` echo 'DASH_WALLET_SALT=""' >> .env`); + console.error(""); + process.exit(1); + return; + } + let identityIndexStr = process.argv[2]; + let identityIndex = parseInt(identityIndexStr, 10); + if (isNaN(identityIndex)) { + console.error(""); + console.error("USAGE"); + console.error(" ./demo.js "); + console.error(""); + console.error("EXAMPLE"); + console.error(" ./demo.js 0"); + console.error(""); + process.exit(1); + return; + } + let coinType = 5; + let testnet = true; + if (testnet) { + coinType = 1; + } + let seed = await DashPhrase.toSeed(walletPhrase, walletSalt); + let walletKey = await DashHd.fromSeed(seed); + let regFundAddress = await createPlatformIdentity(walletKey, coinType, identityIndex); + let fundingAddress = await DashHd.toAddr(regFundAddress.publicKey, hdOpts); + let [oldDeltas, newDeltas] = await Promise.all([ + DashTx.utils.rpc(RPC_AUTH_URL, "getaddressdeltas", { + addresses: [fundingAddress], + }), + DashTx.utils.rpc(RPC_AUTH_URL, "getaddressmempool", { + addresses: [fundingAddress], + }), + ]); + let deltas = oldDeltas.concat(newDeltas); + let total = DashTx.sum(deltas); + let minimum = 100000000 + 10000 + 200; + let needed = minimum - total; + if (needed > 0) { + let dashAmount = DashTx.toDash(needed); + let content = `dash:${fundingAddress}?amount=${dashAmount}`; + let ascii = QRCode.ascii(content, { + indent: 3, + padding: 4, + width: 256, + height: 256, + color: "#000000", + background: "#ffffff", + ecl: "M", + }); + console.error(); + console.error(`ERROR`); + console.error(` not enough DASH at funding address (including instant send)`); + console.error(); + console.error(`SOLUTION`); + console.error(` send ${dashAmount} to ${fundingAddress}`); + console.error(``); + console.error(ascii); + console.error(); + process.exit(1); + } + deltas.reverse(); + // console.log(deltas); + let fundingUtxos = []; + for (let delta of deltas) { + if (delta.satoshis < 0) { + // TODO pair the inputs and outputs + // (this check only works for exact-match, sequenced debits and credits) + break; + } + fundingUtxos.push(delta); + } + console.log(`fundingUtxos:`); + console.log(fundingUtxos); + // void (await WasmDpp.default()); + let dashTx = DashTx.create(KeyUtils); + let fundingPkh = await DashKeys.pubkeyToPkh(regFundAddress.publicKey); + let fundingPkhHex = DashKeys.utils.bytesToHex(fundingPkh); + //@ts-expect-error - incorrect type on version + let fundingAddr = await DashKeys.pkhToAddr(fundingPkh, hdOpts); + console.log(`# DEBUG funding (${fundingPkhHex}):\ntouch ./${fundingAddr}.wif`); + for (let utxo of fundingUtxos) { + // satoshis: 100010200, + // txid: 'd17ef0f2b5093f7be6582b964f911946665a022e0c64fc084ce9955dfbe56171', + // index: 0, + // blockindex: 1, + // height: 1215439, + // address: 'yLqCzEXH2w3HH95sKrzy78d2mt9d1eP8BD' + Object.assign(utxo, { + txId: utxo.txid, + txidHex: DashTx.utils.reverseHex(utxo.txid), + outputIndexHex: utxo.index.toString(16).padStart(8, "0"), + outputIndex: utxo.index, + scriptSizeHex: "19", + scriptSize: 25, + script: `76a914${fundingPkhHex}88ac`, + // sequence: "00000000", + // sigHashType: DashTx.SIGHASH_ALL, + }); + } + process.exit(1); + let assetLockPrivateKeyHex = "33a9f0603ba69b97dff83e08b4ee36cebbc987739e9749615e1727754f2bf2d2"; + let assetLockPrivateKey = DashKeys.utils.hexToBytes(assetLockPrivateKeyHex); + let assetLockWif = await DashKeys.privKeyToWif(assetLockPrivateKey); + let assetLockPublicKey = await KeyUtils.toPublicKey(assetLockPrivateKey); + let assetLockPkh = await DashKeys.pubkeyToPkh(assetLockPublicKey); + // 271c99481ce1460e4fd62d5a11eecc123d78ee32 + let assetLockPkhHex = DashKeys.utils.bytesToHex(assetLockPkh); + // yPtFTm5svi9DFp3yLXf2HV4N5WF9ePLHFs + let assetLockAddr = await DashKeys.pkhToAddr(assetLockPkh, { + version: "testnet", + }); + console.log(`# DEBUG asset lock (${assetLockPkhHex}):\necho '${assetLockWif}' > ./${assetLockAddr}.wif`); + // KeyUtils.set(fundingAddr, { + // address: fundingAddr, + // privateKey: fundingPrivateKey, + // publicKey: fundingPublicKey, + // pubKeyHash: fundingPkhHex, + // }); + // using junk key because we're missing the funding private key + KeyUtils.set(fundingAddr, { + address: fundingAddr, + privateKey: assetLockPrivateKey, // TODO + publicKey: assetLockPublicKey, // TODO + pubKeyHash: fundingPkhHex, + }); + // the test fixture was quick'n'dirty / unhygienic, hence the reuse of keys + let changePkhHex = fundingPkhHex; + let changePkh = fundingPkh; + // yYo3PeSBv2rMnJeyLUCCzx4Y8VhPppZKkC + let changeAddr = fundingAddr; + await DashKeys.pkhToAddr(changePkh, { version: "testnet" }); + console.log(`DEBUG change address: ${changeAddr} (${changePkhHex})`); + let masterPrivateKeyHex = "6c554775029f960891e3edf2d36b26a30d9a4b10034bb49f3a6c4617f557f7bc"; + let masterPrivateKey = DashKeys.utils.hexToBytes(masterPrivateKeyHex); + let masterWif = await DashKeys.privKeyToWif(masterPrivateKey); + let masterPublicKey = await KeyUtils.toPublicKey(masterPrivateKey); + let masterPkh = await DashKeys.pubkeyToPkh(masterPublicKey); + // 98f913d35dd0508e3a6b8bb0c4250221c831f3f8 + let masterPkhHex = DashKeys.utils.bytesToHex(masterPkh); + // yaGHwZkYKSjkMnqX5N1MwrByRxv1Pb8fNY + let masterAddr = await DashKeys.pkhToAddr(masterPkh, { + version: "testnet", + }); + console.log(`# DEBUG master key (${masterPkhHex}):\necho '${masterWif}' > ./${masterAddr}.wif`); + let otherPrivateKeyHex = "426ae4838204206cacdfc7a2e04ac6a2d9e3c2e94df935878581c552f22b0096"; + let otherPrivateKey = DashKeys.utils.hexToBytes(otherPrivateKeyHex); + let otherWif = await DashKeys.privKeyToWif(otherPrivateKey); + let otherPublicKey = await KeyUtils.toPublicKey(otherPrivateKey); + let otherPkh = await DashKeys.pubkeyToPkh(otherPublicKey); + // d8d7386f71d85c85d46ebc06680571d4e0fb4263 + let otherPkhHex = DashKeys.utils.bytesToHex(otherPkh); + // yg5zdRAgB6EYFSownkupECHyJfuwghbuLA + let otherAddr = await DashKeys.pkhToAddr(otherPkh, { + version: "testnet", + }); + console.log(`# DEBUG other key (${otherPkhHex}):\necho '${otherWif}' > ./${otherAddr}.wif`); + // let totalSats = 100005200; // 200 for fee + let transferSats = 100000000; + let changeSats = 5000; + let burnOutput = { memo: "", satoshis: transferSats }; + let changeOutput = { satoshis: changeSats, pubKeyHash: changePkhHex }; + let assetExtraOutput = { + satoshis: transferSats, + pubKeyHash: assetLockPkhHex, + }; + //@ts-expect-error - TODO add types + let assetLockScript = DashPlatform.Tx.packAssetLock({ + version: 0, + creditOutputs: [assetExtraOutput], + }); + let txDraft = { + version: L1_VERSION_PLATFORM, + type: TYPE_ASSET_LOCK, + inputs: fundingUtxos, + outputs: [burnOutput, changeOutput], + extraPayload: assetLockScript, + }; + console.log(); + console.log(`txDraft:`); + console.log(txDraft); + // txDraft.inputs.sort(DashTx.sortInputs); + // txDraft.outputs.sort(DashTx.sortOutputs); + let vout = txDraft.outputs.indexOf(burnOutput); + let txProof = DashTx.createRaw(txDraft); + txProof.inputs[0].script = + "76a91488d9931ea73d60eaf7e5671efc0552b912911f2a88ac"; + txProof.inputs[0].sequence = "00000000"; // Non-final DashTx.NON_FINAL = "00000000" + //@ts-expect-error + let txProofHex = await DashTx.serialize(txProof, null); + console.log(`txProof:`, txProof); + console.log(txProofHex); + let txSigned = await dashTx.hashAndSignAll(txDraft); + // console.log(); + // console.log(`txSigned:`); + // console.log(txSigned); + // let txid = await DashTx.utils.rpc( + // RPC_AUTH_URL, + // "sendrawtransaction", + // txSigned.transaction, + // ); + // const INSTANT_ALP = 0; + // const CHAIN_ALP = 1; + // let blockchaininfo = await DashTx.utils.rpc(RPC_AUTH_URL, "getblockchaininfo"); + // let nextBlock = blockchaininfo.blocks + 1; + // TODO - AJ is here + console.log(`DEBUG funding outpoint`); + let outpoint = await getFundingOutPoint(txSigned.transaction, vout); + console.log(outpoint); + let fundingOutPointHex = `${outpoint.txid}${outpoint.voutHex}`; + console.log(fundingOutPointHex); + let identityId = await createIdentityId(fundingOutPointHex); + console.log(identityId); + /** + * @param {any} magicZmqEmitter + * @returns {Promise} + */ + async function getAssetLockInstantProof(magicZmqEmitter) { + let assetLockInstantProof = { + // type: INSTANT_ALP, + // ex: 01 v1 + // 01 1 input + // 1dbbda5861b12d7523f20aa5e0d42f52de3dcd2d5c2fe919ba67b59f050d206e prev txid + // 00000000 prev vout + // 58c444dd0957767db2c0adea69fd861792bfa75c7e364d83fe85bebebc2a08b4 txid + // 36a56617591a6a89237bada6af1f9b46eba47b5d89a8c4e49ff2d0236182307c cycle hash + // 8967c46529a967b3822e1ba8a173066296d02593f0f59b3a LLMQ BLS Sig + // 78a30a7eef9c8a120847729e62e4a32954339286b79fe759 + // 0221331cd28d576887a263f45b595d499272f656c3f51769 + // 87c976239cac16f972d796ad82931d532102a4f95eec7d80 + // instant_lock: await magicZmqEmitter.once( + // "zmqpubrawtxlocksig", + // /** @param {any} instantLock */ + // function (instantLock) { + // return instantLock.toBase64(); + // }, + // ), + // not sure what "previous outpoint" this refers to, as its not the one in the transaction + instant_lock: DashBincode.BinaryData(DashTx.utils.hexToBytes("01011dbbda5861b12d7523f20aa5e0d42f52de3dcd2d5c2fe919ba67b59f050d206e0000000058c444dd0957767db2c0adea69fd861792bfa75c7e364d83fe85bebebc2a08b436a56617591a6a89237bada6af1f9b46eba47b5d89a8c4e49ff2d0236182307c8967c46529a967b3822e1ba8a173066296d02593f0f59b3a78a30a7eef9c8a120847729e62e4a32954339286b79fe7590221331cd28d576887a263f45b595d499272f656c3f5176987c976239cac16f972d796ad82931d532102a4f95eec7d80")), + transaction: DashBincode.BinaryData(DashTx.utils.hexToBytes(txProofHex)), + // output_index: DashTx.utils.hexToBytes(vout), + output_index: vout, + }; + return DashBincode.AssetLockProof.Instant(assetLockInstantProof); + } + /** + * @returns {Promise} + */ + async function getAssetLockChainProof() { + return DashBincode.AssetLockProof.Chain({ + // type: CHAIN_ALP, + core_chain_locked_height: nextBlock, + // out_point: fundingOutPointHex, + out_point: { + txid: DashBincode.Txid(DashTx.utils.hexToBytes(outpoint.txid)), + vout: vout, + }, + }); + } + let assetLockProof; + let weEvenKnowHowToGetIsdlock = true; + if (weEvenKnowHowToGetIsdlock) { + assetLockProof = await getAssetLockInstantProof(null); + } + else { + assetLockProof = await getAssetLockChainProof(); + } + // let idIndex = 0; // increment to first unused + // let identityKeys = await getIdentityKeys(walletKey, idIndex); + let identityKeys = await getKnownIdentityKeys({ privateKey: masterPrivateKey, publicKey: masterPublicKey }, { privateKey: otherPrivateKey, publicKey: otherPublicKey }); + let stKeys = await getIdentityTransitionKeys(identityKeys); + // { + // '$version': '0', + // public_keys: [ + // { + // '$version': '0', + // id: 0, + // type: 0, + // purpose: 0, + // security_level: 0, + // contract_bounds: null, + // read_only: false, + // data: [Uint8Array], + // signature: [Uint8Array] + // }, + // { + // '$version': '0', + // id: 1, + // type: 0, + // purpose: 0, + // security_level: 1, + // contract_bounds: null, + // read_only: false, + // data: [Uint8Array], + // signature: [Uint8Array] + // } + // ], + // asset_lock_proof: { + // instant_lock: Uint8Array(198) [ + // 1, 1, 29, 187, 218, 88, 97, 177, 45, 117, 35, 242, + // 10, 165, 224, 212, 47, 82, 222, 61, 205, 45, 92, 47, + // 233, 25, 186, 103, 181, 159, 5, 13, 32, 110, 0, 0, + // 0, 0, 88, 196, 68, 221, 9, 87, 118, 125, 178, 192, + // 173, 234, 105, 253, 134, 23, 146, 191, 167, 92, 126, 54, + // 77, 131, 254, 133, 190, 190, 188, 42, 8, 180, 54, 165, + // 102, 23, 89, 26, 106, 137, 35, 123, 173, 166, 175, 31, + // 155, 70, 235, 164, 123, 93, 137, 168, 196, 228, 159, 242, + // 208, 35, 97, 130, + // ... 98 more items + // ], + // transaction: Uint8Array(158) [ + // 0, 0, 8, 0, 1, 88, 132, 229, 219, 157, 226, 24, + // 35, 134, 113, 87, 35, 64, 178, 7, 238, 133, 182, 40, + // 7, 78, 126, 70, 112, 150, 194, 103, 38, 107, 175, 119, + // 164, 0, 0, 0, 0, 25, 118, 169, 20, 136, 217, 147, + // 30, 167, 61, 96, 234, 247, 229, 103, 30, 252, 5, 82, + // 185, 18, 145, 31, 42, 136, 172, 0, 0, 0, 0, 2, + // 0, 225, 245, 5, 0, 0, 0, 0, 2, 106, 0, 136, + // 19, 0, 0, 0, 0, 0, 0, 25, 118, 169, 20, 136, + // 217, 147, 30, 167, + // ... 58 more items + // ], + // output_index: 0 + // }, + // user_fee_increase: 0, + // signature: Uint8Array(65) [ + // 31, 234, 28, 94, 59, 12, 146, 200, 208, 47, 213, + // 44, 71, 254, 95, 33, 90, 130, 141, 5, 195, 23, + // 169, 151, 164, 163, 65, 154, 23, 185, 38, 11, 151, + // 23, 204, 238, 38, 3, 191, 90, 228, 17, 187, 161, + // 171, 142, 29, 11, 188, 49, 203, 215, 61, 125, 111, + // 239, 205, 180, 254, 179, 70, 87, 178, 229, 9 + // ], + // identity_id: Uint8Array(32) [ + // 61, 201, 8, 89, 158, 248, 165, 163, + // 197, 16, 196, 48, 162, 125, 66, 17, + // 200, 5, 85, 109, 153, 229, 192, 111, + // 252, 60, 168, 106, 95, 235, 85, 195 + // ] + // } + let stateTransition = { + //protocolVersion: L2_VERSION_PLATFORM, + $version: "0", + type: ST_CREATE_IDENTITY, + // ecdsaSig(assetLockPrivateKey, CBOR(thisStateTransition)) + // "signature":"IBTTgge+/VDa/9+n2q3pb4tAqZYI48AX8X3H/uedRLH5dN8Ekh/sxRRQQS9LaOPwZSCVED6XIYD+vravF2dhYOE=", + asset_lock_proof: assetLockProof, + // publicKeys: stKeys, + public_keys: stKeys, + // [ + // { + // id: 0, + // type: 0, + // purpose: 0, + // securityLevel: 0, + // data: "AkWRfl3DJiyyy6YPUDQnNx5KERRnR8CoTiFUvfdaYSDS", + // readOnly: false, + // }, + // ], + user_fee_increase: 0, + }; + console.log(`stKeys:`); + console.log(stKeys); + let bcAb = Bincode.encode(DashBincode.StateTransition, stateTransition, { + signable: true, + }); + console.log(`bc (ready-to-sign) AB:`, bcAb); + let bc = new Uint8Array(bcAb); + console.log(`bc (ready-to-sign):`); + console.log(DashTx.utils.bytesToHex(bc)); + console.log(bytesToBase64(bc)); + let sigBytes = new Uint8Array(65); + sigBytes[0] = 0x1f; + let p1363Bytes = sigBytes.subarray(1); + void (await KeyUtils.signP1363(assetLockPrivateKey, bc, p1363Bytes)); + // let sigHex = DashTx.utils.bytesToHex(sigBytes); + Object.assign(stateTransition, { + identity_id: identityId, + // signature: sigHex, + signature: sigBytes, + }); + for (let i = 0; i < identityKeys.length; i += 1) { + let key = identityKeys[i]; + let stPub = stateTransition.public_keys[i]; + let sigBytes = new Uint8Array(65); + let p1363Bytes = sigBytes.subarray(1); + // This isn't ASN.1, P1363, or SEC1. + // Not sure what it is (possibly bespoke), but 1f seems to be a magic byte + sigBytes[0] = 0x1f; + void (await KeyUtils.signP1363(key.privateKey, bc, p1363Bytes)); + // let sigHex = DashTx.utils.bytesToHex(sigBytes); + Object.assign(stPub, { + // signature: sigHex, + signature: sigBytes, + }); + } + console.log(JSON.stringify(stateTransition, null, 2)); + { + let bcAb = Bincode.encode(Bincode.StateTransition, stateTransition, { + signable: false, + }); + let bc = new Uint8Array(bcAb); + console.log(`bc (signed):`); + console.log(DashTx.utils.bytesToHex(bc)); + console.log(bytesToBase64(bc)); + } + // let identityId = assetLockProof.createIdentifier(); + // let identity = Dpp.identity.create(identityId, dppKeys); + // let signedTransition = signTransition( + // identity, + // assetLockProof, + // assetLockPrivateKeyBuffer, + // ); + console.log(""); + console.log("TODO"); + console.log(` - how to serialize and broadcast transition via grpc?`); +} +/** + * @param {Hex} txSignedHex + * @param {Uint32} outputIndex + */ +async function getFundingOutPoint(txSignedHex, outputIndex) { + let txBytes = DashTx.utils.hexToBytes(txSignedHex); + let txidBytes = await DashTx.doubleSha256(txBytes); + let txidBE = DashTx.utils.bytesToHex(txidBytes); + let voutLE = DashTx.utils.toUint32LE(outputIndex); + return { txid: txidBE, voutHex: voutLE, vout: outputIndex }; +} +/** + * @param {Hex} fundingOutPointHex + */ +function createIdentityId(fundingOutPointHex) { + let fundingOutPointBytes = DashTx.utils.hexToBytes(fundingOutPointHex); + let identityHashBytes = DashTx.doubleSha256(fundingOutPointBytes); + // let identityId = b58.encode(identityHashBytes); + // return identityId; + return identityHashBytes; +} +/** + * @param {Required>} masterKey + * @param {Required>} otherKey + * @returns {Promise>} + */ +async function getKnownIdentityKeys(masterKey, otherKey) { + if (!masterKey.privateKey) { + throw new Error("linter fail"); + } + if (!otherKey.privateKey) { + throw new Error("linter fail"); + } + let keyDescs = [ + // {"$version":"0","id":0,"purpose":0,"securityLevel":0,"contractBounds":null,"type":0,"readOnly":false,"data":[3,58,154,139,30,76,88,26,25,135,114,76,102,151,19,93,49,192,126,231,172,130,126,106,89,206,192,34,176,77,81,5,95],"disabledAt":null} + { + id: 0, + type: KEY_TYPES.ECDSA_SECP256K1, + purpose: KEY_PURPOSES.AUTHENTICATION, + securityLevel: KEY_LEVELS.MASTER, + readOnly: false, + publicKey: masterKey.publicKey, + privateKey: masterKey.privateKey, + data: "", + }, + // {"$version":"0","id":1,"purpose":0,"securityLevel":1,"contractBounds":null,"type":0,"readOnly":false,"data":[2,1,70,3,1,141,196,55,100,45,218,22,244,199,252,80,228,130,221,35,226,70,128,188,179,165,150,108,59,52,56,72,226],"disabledAt":null} + { + id: 1, + type: KEY_TYPES.ECDSA_SECP256K1, + purpose: KEY_PURPOSES.AUTHENTICATION, + securityLevel: KEY_LEVELS.CRITICAL, + readOnly: false, + privateKey: otherKey.privateKey, + publicKey: otherKey.publicKey, + data: "", + }, + ]; + return keyDescs; + // let privKeyDescs = []; + // for (let keyDesc of keyDescs) { + // let key = await DashHd.deriveChild( + // identityKey, + // keyDesc.id, + // DashHd.HARDENED, + // ); + // let privKeyDesc = Object.assign(keyDesc, key); + // privKeyDescs.push(privKeyDesc); // for type info + // let dppKey = new WasmDpp.IdentityPublicKey(L2_VERSION_PLATFORM); + // dppKey.setId(keyDesc.id); + // dppKey.setData(key.publicKey); + // if (keyDesc.purpose) { + // dppKey.setPurpose(keyDesc.purpose); + // } + // dppKey.setSecurityLevel(keyDesc.securityLevel); + // dppKeys.push(dppKey); + // } + // return privKeyDescs; +} +/** + * @typedef EvoKey + * @prop {Uint8} id + * @prop {Uint8} type - TODO constrain to members of KEY_TYPES + * @prop {Uint8} purpose - TODO constrain to members of KEY_PURPOSES + * @prop {Uint8} securityLevel - TODO constrain to members of KEY_LEVELS + * @prop {Boolean} readOnly + * @prop {Uint8Array} publicKey + * @prop {Uint8Array} privateKey + */ +/** + * @typedef STKey + * @prop {Uint8} id + * @prop {Uint8} type - TODO constrain to members of KEY_TYPES + * @prop {Uint8} purpose - TODO constrain to members of KEY_PURPOSES + * @prop {Base64} data - base64-encoded publicKey (compact) + * @prop {Uint8} securityLevel - TODO constrain to members of KEY_LEVELS + * @prop {Boolean} readOnly + */ +/** + * @param {Array} identityKeys - TODO + */ +function getIdentityTransitionKeys(identityKeys) { + let stKeys = []; + for (let key of identityKeys) { + // let data = bytesToBase64(key.publicKey); + let stKey = { + $version: "0", + id: key.id, + type: key.type, + purpose: key.purpose, + security_level: key.securityLevel, + contract_bounds: null, + // readOnly: key.readOnly, + read_only: key.readOnly || false, + // data: data, + data: key.publicKey, + // signature: "TODO", + }; + // if ("readOnly" in key) { + // Object.assign(stKey, { readOnly: key.readOnly }); + // } + stKeys.push(stKey); + } + return stKeys; +} +/** + * @param {Uint8Array} bytes + */ +function bytesToBase64(bytes) { + let binstr = ""; + for (let i = 0; i < bytes.length; i += 1) { + binstr += String.fromCharCode(bytes[i]); + } + return btoa(binstr); +} +function signTransition(identity, assetLockProof, assetLockPrivateKey) { + // TODO is assetLockProof the same as txoutproof? + // Create ST + const identityCreateTransition = WasmDpp.identity.createIdentityCreateTransition(identity, assetLockProof); + // Create key proofs + const [stMasterKey, stHighAuthKey, stCriticalAuthKey, stTransferKey] = identityCreateTransition.getPublicKeys(); + // Sign master key + identityCreateTransition.signByPrivateKey(identityMasterPrivateKey.toBuffer(), Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1); + stMasterKey.setSignature(identityCreateTransition.getSignature()); + identityCreateTransition.setSignature(undefined); + // Sign high auth key + identityCreateTransition.signByPrivateKey(identityHighAuthPrivateKey.toBuffer(), Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1); + stHighAuthKey.setSignature(identityCreateTransition.getSignature()); + identityCreateTransition.setSignature(undefined); + // Sign critical auth key + identityCreateTransition.signByPrivateKey(identityCriticalAuthPrivateKey.toBuffer(), Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1); + stCriticalAuthKey.setSignature(identityCreateTransition.getSignature()); + identityCreateTransition.setSignature(undefined); + // Sign transfer key + identityCreateTransition.signByPrivateKey(identityTransferPrivateKey.toBuffer(), Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1); + stTransferKey.setSignature(identityCreateTransition.getSignature()); + identityCreateTransition.setSignature(undefined); + // Set public keys back after updating their signatures + identityCreateTransition.setPublicKeys([ + stMasterKey, + stHighAuthKey, + stCriticalAuthKey, + stTransferKey, + ]); + // Sign and validate state transition + identityCreateTransition.signByPrivateKey(assetLockPrivateKey, Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1); + // TODO(versioning): restore + // @ts-ignore + // const result = await Dpp.stateTransition.validateBasic( + // identityCreateTransition, + // // TODO(v0.24-backport): get rid of this once decided + // // whether we need execution context in wasm bindings + // new StateTransitionExecutionContext(), + // ); + // if (!result.isValid()) { + // const messages = result.getErrors().map((error) => error.message); + // throw new Error(`StateTransition is invalid - ${JSON.stringify(messages)}`); + // } + return identityCreateTransition; +} +main(); diff --git a/built/DashPlatform.js/demo.d.ts b/built/DashPlatform.js/demo.d.ts new file mode 100644 index 0000000..c872a34 --- /dev/null +++ b/built/DashPlatform.js/demo.d.ts @@ -0,0 +1,44 @@ +export type EvoKey = { + id: Uint8; + /** + * - TODO constrain to members of KEY_TYPES + */ + type: Uint8; + /** + * - TODO constrain to members of KEY_PURPOSES + */ + purpose: Uint8; + /** + * - TODO constrain to members of KEY_LEVELS + */ + securityLevel: Uint8; + readOnly: boolean; + publicKey: Uint8Array; + privateKey: Uint8Array; +}; +export type STKey = { + id: Uint8; + /** + * - TODO constrain to members of KEY_TYPES + */ + type: Uint8; + /** + * - TODO constrain to members of KEY_PURPOSES + */ + purpose: Uint8; + /** + * - base64-encoded publicKey (compact) + */ + data: Base64; + /** + * - TODO constrain to members of KEY_LEVELS + */ + securityLevel: Uint8; + readOnly: boolean; +}; +export type Base58 = string; +export type Base64 = string; +export type Hex = string; +export type Uint53 = number; +export type Uint32 = number; +export type Uint8 = number; diff --git a/built/DashPlatform.js/demo.js b/built/DashPlatform.js/demo.js new file mode 100644 index 0000000..20649a2 --- /dev/null +++ b/built/DashPlatform.js/demo.js @@ -0,0 +1,406 @@ +"use strict"; +let DashPhrase = require("dashphrase"); +let DashHd = require("dashhd"); +let DashKeys = require("dashkeys"); +let DashTx = require("dashtx"); +let DashPlatform = require("./src/dashplatform.js"); +let CBOR = require("cbor"); +let KeyUtils = require("./src/key-utils.js"); +// let DapiGrpc = require("@dashevo/dapi-grpc"); +let WasmDpp = require("@dashevo/wasm-dpp"); +let Dpp = WasmDpp.DashPlatformProtocol; +//@ts-ignore - sssssh, yes Base58 does exist +let b58 = DashKeys.Base58.create(); +let RPC_AUTH_URL = "https://api:null@trpc.digitalcash.dev"; +const L1_VERSION_PLATFORM = 3; +const TYPE_ASSET_LOCK = 8; +const L2_VERSION_PLATFORM = 1; +const ST_CREATE_IDENTITY = 2; +let KEY_LEVELS = { + 0: "MASTER", + 1: "CRITICAL", + 2: "HIGH", + 3: "MEDIUM", + MASTER: 0, + CRITICAL: 1, + HIGH: 2, + MEDIUM: 3, +}; +let KEY_PURPOSES = { + 0: "AUTHENTICATION", + 1: "ENCRYPTION", + 2: "DECRYPTION", + 3: "TRANSFER", + 4: "SYSTEM", + 5: "VOTING", + AUTHENTICATION: 0, + ENCRYPTION: 1, + DECRYPTION: 2, + TRANSFER: 3, + SYSTEM: 4, + VOTING: 5, +}; +let KEY_TYPES = { + 0: "ECDSA_SECP256K1", + ECDSA_SECP256K1: 0, +}; +let network = "testnet"; +let coinType = 5; // DASH +if (network === "testnet") { + coinType = 1; // testnet +} +//coinType = 1; +let identityEcdsaPath = ""; +{ + // m/purpose'/coin_type'/feature'/subfeature'/keytype'/identityindex'/keyindex' + // ex: m/9'/5'/5'/0'/0'// + let purposeDip13 = 9; + let featureId = 5; + let subfeatureKey = 0; + let keyType = KEY_TYPES.ECDSA_SECP256K1; + identityEcdsaPath = `m/${purposeDip13}'/${coinType}'/${featureId}'/${subfeatureKey}'/${keyType}'`; +} +async function main() { + void (await WasmDpp.default()); + let dashTx = DashTx.create(KeyUtils); + // let phrase = await DashPhrase.generate(); + let phrase = "wool panel expand embrace try lab rescue reason drop fog stand kangaroo"; + console.log(`Phrase:`); + console.log(phrase); + let salt = ""; + let seedBytes = await DashPhrase.toSeed(phrase, salt); + console.log("Seed:"); + console.log(DashTx.utils.bytesToHex(seedBytes)); + let walletKey = await DashHd.fromSeed(seedBytes, { coinType }); + let walletId = await DashHd.toId(walletKey); + console.log(`Wallet ID:`); + console.log(walletId); + let accountIndex = 0; // pick the desired account for paying the fee + let addressIndex = 0; // pick an address with funds + let accountKey; + for (let a = 0; a <= accountIndex; a += 1) { + accountKey = await walletKey.deriveAccount(a); + for (let usage of [DashHd.RECEIVE, DashHd.CHANGE]) { + let xprvKey = await accountKey.deriveXKey(usage); + let addressKey; + let addr; + let pkh; + let wif; + for (let i = 0; i <= addressIndex; i += 1) { + addressKey = await xprvKey.deriveAddress(i); + if (!addressKey.privateKey) { + throw new Error("not an error, just a lint hack"); + } + addr = await DashHd.toAddr(addressKey.publicKey, { version: network }); + let pkhBytes = await DashKeys.addrToPkh(addr, { + //@ts-ignore + version: network, + }); + pkh = DashKeys.utils.bytesToHex(pkhBytes); + wif = await DashHd.toWif(addressKey.privateKey, { version: network }); + console.log(); + console.log(`[m/44'/${coinType}'/${a}'/${usage}/${i}] Address: ${addr}`); + // TODO is _this_ the assetLockPrivateKey?? + console.log(`[m/44'/${coinType}'/${a}/${usage}/${i}] WIF: ${wif}`); + } + } + } + process.exit(1); + KeyUtils.set(addr, { + address: addr, + publicKey: addressKey.publicKey, + privateKey: addressKey.privateKey, + pubKeyHash: pkh, + }); + let utxos = await DashTx.utils.rpc(RPC_AUTH_URL, "getaddressutxos", { + addresses: [addr], + }); + let total = DashTx.sum(utxos); + console.log(); + console.log(`utxos (${total})`); + console.log(utxos); + // TODO which hd paths to use for which addresses? + let creditOutputs = [{ satoshis: total - 10000, pubKeyHash: pkh }]; + let totalCredits = DashTx.sum(creditOutputs); + let burnOutput = { satoshis: totalCredits, pubKeyHash: pkh }; + //@ts-ignore - TODO add types + let assetLockScript = DashPlatform.Tx.packAssetLock({ + creditOutputs, + }); + let txDraft = { + version: L1_VERSION_PLATFORM, + type: TYPE_ASSET_LOCK, + inputs: utxos, + outputs: [burnOutput], + extraPayload: assetLockScript, + }; + console.log(); + console.log(`txDraft:`); + console.log(txDraft); + txDraft.inputs.sort(DashTx.sortInputs); + txDraft.outputs.sort(DashTx.sortOutputs); + let vout = txDraft.outputs.indexOf(burnOutput); + let txSigned = await dashTx.hashAndSignAll(txDraft); + console.log(); + console.log(`txSigned:`); + console.log(txSigned); + // let txid = await DashTx.utils.rpc( + // RPC_AUTH_URL, + // "sendrawtransaction", + // txSigned.transaction, + // ); + const INSTANT_ALP = 0; + const CHAIN_ALP = 1; + let blockchaininfo = await DashTx.utils.rpc(RPC_AUTH_URL, "getblockchaininfo"); + let nextBlock = blockchaininfo.blocks + 1; + let fundingOutPointHex = await getFundingOutPointHex(txSigned.transaction, vout); + let identityId = createIdentityId(fundingOutPointHex); + /** @param {any} magicZmqEmitter */ + async function getAssetLockInstantProof(magicZmqEmitter) { + let assetLockInstantProof = { + type: INSTANT_ALP, + instantLock: await magicZmqEmitter.once("zmqpubrawtxlocksig", + /** @param {any} instantLock */ + function (instantLock) { + return instantLock.toBase64(); + }), + transaction: txSigned.transaction, + outputIndex: vout, + }; + return assetLockInstantProof; + } + async function getAssetLockChainProof() { + let assetLockChainProof = { + type: CHAIN_ALP, + coreChainLockedHeight: nextBlock, + outPoint: fundingOutPointHex, + }; + return assetLockChainProof; + } + let assetLockProof; + let weEvenKnowHowToGetIsdlock = false; + if (weEvenKnowHowToGetIsdlock) { + assetLockProof = await getAssetLockInstantProof(null); + } + else { + assetLockProof = await getAssetLockChainProof(); + } + let idIndex = 0; // increment to first unused + let identityKeys = await getIdentityKeys(walletKey, idIndex); + let stKeys = await getIdentityTransitionKeys(identityKeys); + let stateTransition = { + protocolVersion: L2_VERSION_PLATFORM, + type: ST_CREATE_IDENTITY, + // ecdsaSig(assetLockPrivateKey, CBOR(thisStateTransition)) + // "signature":"IBTTgge+/VDa/9+n2q3pb4tAqZYI48AX8X3H/uedRLH5dN8Ekh/sxRRQQS9LaOPwZSCVED6XIYD+vravF2dhYOE=", + assetLockProof: assetLockProof, + publicKeys: stKeys, + // [ + // { + // id: 0, + // type: 0, + // purpose: 0, + // securityLevel: 0, + // data: "AkWRfl3DJiyyy6YPUDQnNx5KERRnR8CoTiFUvfdaYSDS", + // readOnly: false, + // }, + // ], + }; + console.log(`stKeys:`); + console.log(stKeys); + let cbor = CBOR.encodeCanonical(stateTransition); + console.log(`cbor:`); + console.log(DashTx.utils.bytesToHex(cbor)); + console.log(bytesToBase64(cbor)); + let sigBytes = await KeyUtils.sign(addressKey.privateKey, cbor); + let sigHex = DashTx.utils.bytesToHex(sigBytes); + Object.assign(stateTransition, { + signature: sigHex, + }); + console.log(JSON.stringify(stateTransition, null, 2)); + // let identityId = assetLockProof.createIdentifier(); + // let identity = Dpp.identity.create(identityId, dppKeys); + // let signedTransition = signTransition( + // identity, + // assetLockProof, + // assetLockPrivateKeyBuffer, + // ); + console.log(""); + console.log("TODO"); + console.log(` - how to serialize and broadcast transition via grpc?`); +} +/** + * @param {Hex} txSignedHex + * @param {Uint32} outputIndex + */ +async function getFundingOutPointHex(txSignedHex, outputIndex) { + let txBytes = DashTx.utils.hexToBytes(txSignedHex); + let txidBytes = await DashTx.doubleSha256(txBytes); + let txidBE = DashTx.utils.bytesToHex(txidBytes); + let voutLE = DashTx.utils.toUint32LE(outputIndex); + let fundingOutPointHex = `${txidBE}${voutLE}`; + return fundingOutPointHex; +} +/** + * @param {Hex} fundingOutPointHex + */ +function createIdentityId(fundingOutPointHex) { + let fundingOutPointBytes = DashTx.utils.hexToBytes(fundingOutPointHex); + let identityHashBytes = DashTx.doubleSha256(fundingOutPointBytes); + let identityId = b58.encode(identityHashBytes); + return identityId; +} +/** + * @param {DashHd.HDKey} walletKey + * @param {Uint53} idIndex + * @returns {Promise>} + */ +async function getIdentityKeys(walletKey, idIndex) { + let identityEcdsaKey = await DashHd.derivePath(walletKey, identityEcdsaPath); + let identityKey = await DashHd.deriveChild(identityEcdsaKey, idIndex, DashHd.HARDENED); + let keyDescs = [ + { + id: 0, + type: KEY_TYPES.ECDSA_SECP256K1, + purpose: KEY_PURPOSES.AUTHENTICATION, + data: "", + securityLevel: KEY_LEVELS.MASTER, + // readOnly: false, + }, + { + id: 1, + type: KEY_TYPES.ECDSA_SECP256K1, + purpose: KEY_PURPOSES.AUTHENTICATION, + data: "", + securityLevel: KEY_LEVELS.HIGH, + // readOnly: false, + }, + { + id: 2, + type: KEY_TYPES.ECDSA_SECP256K1, + purpose: KEY_PURPOSES.AUTHENTICATION, + data: "", + securityLevel: KEY_LEVELS.CRITICAL, + // readOnly: false, + }, + { + id: 3, + type: KEY_TYPES.ECDSA_SECP256K1, + purpose: KEY_PURPOSES.TRANSFER, + data: "", + securityLevel: KEY_LEVELS.CRITICAL, + // readOnly: false, + }, + ]; + for (let keyDesc of keyDescs) { + let key = await DashHd.deriveChild(identityKey, keyDesc.id, DashHd.HARDENED); + Object.assign(keyDesc, key); + // let dppKey = new WasmDpp.IdentityPublicKey(L2_VERSION_PLATFORM); + // dppKey.setId(keyDesc.id); + // dppKey.setData(key.publicKey); + // if (keyDesc.purpose) { + // dppKey.setPurpose(keyDesc.purpose); + // } + // dppKey.setSecurityLevel(keyDesc.securityLevel); + // dppKeys.push(dppKey); + } + return keyDescs; +} +/** + * @typedef EvoKey + * @prop {Uint8} id + * @prop {Uint8} type - TODO constrain to members of KEY_TYPES + * @prop {Uint8} purpose - TODO constrain to members of KEY_PURPOSES + * @prop {Uint8} securityLevel - TODO constrain to members of KEY_LEVELS + * @prop {Boolean} readOnly + * @prop {Uint8Array} publicKey + * @prop {Uint8Array} privateKey + */ +/** + * @typedef STKey + * @prop {Uint8} id + * @prop {Uint8} type - TODO constrain to members of KEY_TYPES + * @prop {Uint8} purpose - TODO constrain to members of KEY_PURPOSES + * @prop {Base64} data - base64-encoded publicKey (compact) + * @prop {Uint8} securityLevel - TODO constrain to members of KEY_LEVELS + * @prop {Boolean} readOnly + */ +/** + * @param {Array} identityKeys - TODO + */ +function getIdentityTransitionKeys(identityKeys) { + let stKeys = []; + for (let key of identityKeys) { + let data = bytesToBase64(key.publicKey); + let stKey = { + id: key.id, + type: key.type, + purpose: key.purpose, + securityLevel: key.securityLevel, + data: data, + // readOnly: key.readOnly, + }; + if ("readOnly" in key) { + Object.assign(stKey, { readOnly: key.readOnly }); + } + stKeys.push(stKey); + } + return stKeys; +} +/** + * @param {Uint8Array} bytes + */ +function bytesToBase64(bytes) { + let binstr = ""; + for (let i = 0; i < bytes.length; i += 1) { + binstr += String.fromCharCode(bytes[i]); + } + return btoa(binstr); +} +function signTransition(identity, assetLockProof, assetLockPrivateKey) { + // TODO is assetLockProof the same as txoutproof? + // Create ST + const identityCreateTransition = WasmDpp.identity.createIdentityCreateTransition(identity, assetLockProof); + // Create key proofs + const [stMasterKey, stHighAuthKey, stCriticalAuthKey, stTransferKey] = identityCreateTransition.getPublicKeys(); + // Sign master key + identityCreateTransition.signByPrivateKey(identityMasterPrivateKey.toBuffer(), Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1); + stMasterKey.setSignature(identityCreateTransition.getSignature()); + identityCreateTransition.setSignature(undefined); + // Sign high auth key + identityCreateTransition.signByPrivateKey(identityHighAuthPrivateKey.toBuffer(), Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1); + stHighAuthKey.setSignature(identityCreateTransition.getSignature()); + identityCreateTransition.setSignature(undefined); + // Sign critical auth key + identityCreateTransition.signByPrivateKey(identityCriticalAuthPrivateKey.toBuffer(), Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1); + stCriticalAuthKey.setSignature(identityCreateTransition.getSignature()); + identityCreateTransition.setSignature(undefined); + // Sign transfer key + identityCreateTransition.signByPrivateKey(identityTransferPrivateKey.toBuffer(), Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1); + stTransferKey.setSignature(identityCreateTransition.getSignature()); + identityCreateTransition.setSignature(undefined); + // Set public keys back after updating their signatures + identityCreateTransition.setPublicKeys([ + stMasterKey, + stHighAuthKey, + stCriticalAuthKey, + stTransferKey, + ]); + // Sign and validate state transition + identityCreateTransition.signByPrivateKey(assetLockPrivateKey, Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1); + // TODO(versioning): restore + // @ts-ignore + // const result = await Dpp.stateTransition.validateBasic( + // identityCreateTransition, + // // TODO(v0.24-backport): get rid of this once decided + // // whether we need execution context in wasm bindings + // new StateTransitionExecutionContext(), + // ); + // if (!result.isValid()) { + // const messages = result.getErrors().map((error) => error.message); + // throw new Error(`StateTransition is invalid - ${JSON.stringify(messages)}`); + // } + return identityCreateTransition; +} +main(); +export {}; diff --git a/built/DashPlatform.js/identity_create.d.ts b/built/DashPlatform.js/identity_create.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/built/DashPlatform.js/identity_create.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/built/DashPlatform.js/identity_create.js b/built/DashPlatform.js/identity_create.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/built/DashPlatform.js/identity_create.js @@ -0,0 +1 @@ +export {}; diff --git a/built/DashPlatform.js/rpc-test.d.ts b/built/DashPlatform.js/rpc-test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/built/DashPlatform.js/rpc-test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/built/DashPlatform.js/rpc-test.js b/built/DashPlatform.js/rpc-test.js new file mode 100644 index 0000000..62d6042 --- /dev/null +++ b/built/DashPlatform.js/rpc-test.js @@ -0,0 +1,56 @@ +// import * as DashTx from "dashtx" +import { toHex } from "./src/hex.js"; +import { connectToNode } from "./src/rpc.js"; +import BloomFilter from 'bloom-filter'; +import * as DashTx from "dashtx"; +const NODE_ADDRESS = "https://seed-2.testnet.networks.dash.org:1443"; +const node = connectToNode(NODE_ADDRESS); +const coreStatus = await node.core.getBlockchainStatus({}); +console.log('core status', coreStatus.response); +const platformStatus = await node.platform.getStatus({ version: { oneofKind: "v0", v0: {} } }); +console.log('platform status', platformStatus.response.version); +// const pstatus = platformStatus.response.version +let latestHeight = coreStatus.response.chain.blocksCount; +// if (pstatus.oneofKind == 'v0') { +// latestHeight = +pstatus.v0.chain!.latestBlockHeight +// } +const numElements = 1; // number of elements we will insert into the BloomFilter??? +const falsePositiveRate = 1.0; // match everything +const bloomFilter = BloomFilter.create(numElements, falsePositiveRate); +const bloomFilterSerialized = bloomFilter.toObject(); +const transactionStream = node.core.subscribeToTransactionsWithProofs({ + fromBlock: { + oneofKind: "fromBlockHeight", + fromBlockHeight: latestHeight, + }, + count: 0, // means new incoming transactions + sendTransactionHashes: true, + bloomFilter: { + vData: bloomFilterSerialized.vData, + nHashFuncs: bloomFilterSerialized.nHashFuncs, + nTweak: bloomFilterSerialized.nTweak ?? 0, + nFlags: bloomFilterSerialized.nFlags ?? 0, // don't update + } +}); +let count = 0; +// const foundTxs: Record = {}; +for await (const resp of transactionStream.responses) { + count += 1; + switch (resp.responses.oneofKind) { + case "rawMerkleBlock": + continue; + case "rawTransactions": + for (const tx of resp.responses.rawTransactions.transactions) { + const txHex = toHex(tx); + // if (foundTxs[txHex]) continue; + // foundTxs[txHex] = true; + console.log('tx', toHex((await DashTx.doubleSha256(tx)).reverse())); + } + break; + case "instantSendLockMessages": + console.log(count, 'resp', resp.responses.instantSendLockMessages.messages); + throw new Error("YAY! WE GOT ONE!"); // this never happens :( + } +} +console.log('counted', count); +console.log('transactionStream', await transactionStream.status); diff --git a/built/DashPlatform.js/src/_qr.d.ts b/built/DashPlatform.js/src/_qr.d.ts new file mode 100644 index 0000000..144e62d --- /dev/null +++ b/built/DashPlatform.js/src/_qr.d.ts @@ -0,0 +1,21 @@ +/** + * @param {String} data + * @param {QrOpts} opts + */ +export function quadAscii(data: string, opts: QrOpts): string; +/** + * @param {String} data + * @param {QrOpts} opts + */ +export function ascii(data: string, opts: QrOpts): string; +export type QrOpts = { + background?: string | undefined; + color?: string | undefined; + ecl?: string | undefined; + height?: number | undefined; + indent?: number | undefined; + padding?: number | undefined; + size?: "full" | "mini" | "micro" | undefined; + width?: number | undefined; +}; +export type BlockMap = any; diff --git a/built/DashPlatform.js/src/_qr.js b/built/DashPlatform.js/src/_qr.js new file mode 100644 index 0000000..8dc68be --- /dev/null +++ b/built/DashPlatform.js/src/_qr.js @@ -0,0 +1,148 @@ +"use strict"; +import QrCode from "qrcode-svg"; +/** + * @typedef QrOpts + * @property {String} [background] + * @property {String} [color] + * @property {String} [ecl] + * @property {Number} [height] + * @property {Number} [indent] + * @property {Number} [padding] + * @property {"full" | "mini" | "micro"} [size] + * @property {Number} [width] + */ +/** + * @param {String} data + * @param {QrOpts} opts + */ +function _create(data, opts) { + //@ts-ignore + return new QrCode({ + content: data, + padding: opts?.padding || 4, + width: opts?.width || 256, + height: opts?.height || 256, + color: opts?.color || "#000000", + background: opts?.background || "#ffffff", + ecl: opts?.ecl || "M", + }); +} +; +/** + * @typedef {Object.} BlockMap + */ +/** + * Encoded as top-left, top-right, bottom-left, bottom-right + * @type {Object.<"mini" | "micro", BlockMap>} + */ +let charMaps = { + micro: { + 0b0000: " ", + 0b0001: "▗", + 0b0010: "▖", + 0b0011: "▄", + 0b0100: "▝", + 0b0101: "▐", + 0b0110: "▞", + 0b0111: "▟", + 0b1000: "▘", + 0b1001: "▚", + 0b1010: "▌", + 0b1011: "▙", + 0b1100: "▀", + 0b1101: "▜", + 0b1110: "▛", + 0b1111: "█", + }, + mini: { + 0b0000: " ", + 0b0001: " ▄", + 0b0010: "▄ ", + 0b0011: "▄▄", + 0b0100: " ▀", + 0b0101: " █", + 0b0110: "▄▀", + 0b0111: "▄█", + 0b1000: "▀ ", + 0b1001: "▀▄", + 0b1010: "█ ", + 0b1011: "█▄", + 0b1100: "▀▀", + 0b1101: "▀█", + 0b1110: "█▀", + 0b1111: "██", + }, +}; +/** + * @param {String} data + * @param {QrOpts} opts + */ +export function quadAscii(data, opts) { + let charMap = charMaps[opts.size || "mini"]; + let qrcode = _create(data, opts); + let indent = opts?.indent ?? 4; + let modules = qrcode.qrcode.modules; + let lines = []; + let length = modules.length; + for (let y = 0; y < length; y += 2) { + let line = ``.padStart(indent, " "); + for (let x = 0; x < length; x += 2) { + let count = 0; + // qr codes can be odd numbers + if (x >= length) { + line += charMap[count]; + continue; + } + if (modules[x][y]) { + count += 8; + } + if (modules[x][y + 1]) { + count += 2; + } + if (x + 1 >= length) { + line += charMap[count]; + continue; + } + if (modules[x + 1][y]) { + count += 4; + } + if (modules[x + 1][y + 1]) { + count += 1; + } + line += charMap[count]; + } + lines.push(line); + } + return lines.join("\n"); +} +; +/** + * @param {String} data + * @param {QrOpts} opts + */ +export function ascii(data, opts) { + if (!opts.size) { + opts.size = "mini"; + } + if (["mini", "micro"].includes(opts.size)) { + return quadAscii(data, opts); + } + let qrcode = _create(data, opts); + let indent = opts?.indent ?? 4; + let modules = qrcode.qrcode.modules; + let lines = []; + let length = modules.length; + for (let y = 0; y < length; y += 1) { + let line = ``.padStart(indent, " "); + for (let x = 0; x < length; x += 1) { + let block = " "; + if (modules[x][y]) { + block = "██"; + } + line += block; + } + lines.push(line); + } + return lines.join("\n"); +} +; diff --git a/built/DashPlatform.js/src/asset_lock.d.ts b/built/DashPlatform.js/src/asset_lock.d.ts new file mode 100644 index 0000000..1f47fb8 --- /dev/null +++ b/built/DashPlatform.js/src/asset_lock.d.ts @@ -0,0 +1,146 @@ +/** + * @param {{version: string}} hdOpts + * @param {import("dashhd").HDWallet} walletKey + * @param {number} identityIndex + */ +export function deriveAllCreateIdentityKeys(hdOpts: { + version: string; +}, walletKey: any, identityIndex: number): Promise<{ + regFundKey: any; + topupKey: any; + assetWif: any; + assetInfo: { + wif: string; + privateKey: any; + privateKeyHex: any; + publicKey: any; + publicKeyHex: any; + pubKeyHash: any; + pubKeyHashHex: any; + address: any; + }; + assetKey: any; + masterKey: any; + otherKey: any; +}>; +/** + * @param {import('dashhd').HDToAddressOpts} hdOpts + * @param {import('dashhd').HDKey} regFundKey + * @param {import('dashhd').HDKey} changeKey + * @param {{publicKey: Uint8Array}} assetInfo + */ +export function createPlatformAssetLock(hdOpts: any, regFundKey: any, changeKey: any, assetInfo: { + publicKey: Uint8Array; +}): Promise<{ + txidHex: any; + identityIdHex: string; + assetProof: DashBincode.AssetLockProof; +}>; +export function TODOgetUtxos(addresses: Array): Promise; +export type TransactionJson = { + /** + * - Whether specified block is in the active chain or not (only present with explicit "blockhash" argument) + */ + in_active_chain: boolean | null; + /** + * - The serialized, hex-encoded data for 'txid' + */ + hex: string; + /** + * - The transaction id (same as provided) + */ + txid: string; + /** + * - The transaction hash (differs from txid for witness transactions) + */ + hash: string; + /** + * - The serialized transaction size + */ + size: number; + /** + * - The virtual transaction size (differs from size for witness transactions) + */ + vsize: number; + /** + * - The transaction's weight (between vsize*4-3 and vsize*4) + */ + weight: number; + /** + * - The version + */ + version: number; + /** + * - The lock time + */ + locktime: number; + /** + * - The transaction inputs + */ + vin: Array<{ + txid?: string; + vout?: number; + scriptSig?: { + asm: string; + hex: string; + }; + sequence: number; + txinwitness?: Array; + }>; + /** + * - The transaction outputs + */ + vout: Array<{ + value: number; + n: number; + scriptPubKey: { + asm: string; + hex: string; + reqSigs?: number; + type: string; + addresses?: Array; + }; + }>; + /** + * - If the transaction has been included in a block on the local best block chain, this is the block height where the transaction was mined. Otherwise, this is -1. Not shown for mempool transactions. + */ + height: number | null; + /** + * - The block hash + */ + blockhash: string | null; + /** + * - The confirmations + */ + confirmations: number | null; + /** + * - The block time expressed in UNIX epoch time + */ + blocktime: number | null; + /** + * - Same as "blocktime" + */ + time: number | null; +}; +export type TransactionMetadata = { + /** + * - The block height or index + */ + height: number; +}; +export type TransactionJsonMetadata = TransactionJson & TransactionMetadata; +export type CheckData = (message: unknown) => message is T; +export type Delta = { + txid: string; + index: Uint32; + pubKeyHash: string; + address: string; + satoshis: Uint32; +}; +export type Base58 = string; +export type Base64 = string; +export type HexString = string; +export type Uint53 = number; +export type Uint32 = number; +export type Uint8 = number; +import * as DashBincode from "../1.8.1/generated_bincode.js"; diff --git a/built/DashPlatform.js/src/asset_lock.js b/built/DashPlatform.js/src/asset_lock.js new file mode 100644 index 0000000..f2e51bf --- /dev/null +++ b/built/DashPlatform.js/src/asset_lock.js @@ -0,0 +1,635 @@ +import DashHd from "dashhd"; +import * as DashHdUtils from "./dashhd-utils.ts"; +import * as DashBincode from "../1.8.1/generated_bincode.js"; +import DashKeys from "dashkeys"; +import * as DashTx from "dashtx"; +import * as DashPlatform from "./dashplatform.js"; +import * as KeyUtils from "./key-utils.js"; +import { COIN_TYPE, L1_VERSION_PLATFORM, RPC_AUTH_URL, TYPE_ASSET_LOCK, VERSION_ASSET_LOCK, VERSIONS_TESTNET, ZMQ_AUTH_URL } from "./constants.ts"; +import { promptQr } from "./cli.ts"; +import EventSourcePackage from "launchdarkly-eventsource"; +const EventSourceShim = EventSourcePackage.EventSource; +/** + * @param {{version: string}} hdOpts + * @param {import("dashhd").HDWallet} walletKey + * @param {number} identityIndex + */ +export async function deriveAllCreateIdentityKeys(hdOpts, walletKey, identityIndex) { + let regFundAddressPath = `m/9'/${COIN_TYPE}'/5'/1'/${identityIndex}`; + let regFundKey = await DashHdUtils.deriveIdentRegFundKeyPath(walletKey, regFundAddressPath); + let topupAddressPath = `m/9'/${COIN_TYPE}'/5'/2'/0`; + let topupKey = await DashHdUtils.deriveIdentTopupKeyPath(walletKey, topupAddressPath); + let assetKey = await DashHd.deriveChild(regFundKey, 0, DashHd.HARDENED); + let assetWif = await DashHd.toWif(assetKey.privateKey, hdOpts); + let assetInfo = await wifToInfo(assetWif, "testnet"); + let authWalletPath = `m/9'/${COIN_TYPE}'/5'/0'/0'/${identityIndex}'`; + let authWallet = await DashHdUtils.deriveIdentAuthWalletPath(walletKey, authWalletPath); + let masterKey = await authWallet.deriveAuthKey(0); + let otherKey = await authWallet.deriveAuthKey(1); + return { + // these are used to create the AssetLock + regFundKey, + topupKey, // TODO next change key from wallet + assetWif, + assetInfo, + // these are used to create the Identity with the lock proof + assetKey, + masterKey, + otherKey, + }; +} +/** + * @param {import('dashhd').HDToAddressOpts} hdOpts + * @param {import('dashhd').HDKey} regFundKey + * @param {import('dashhd').HDKey} changeKey + * @param {{publicKey: Uint8Array}} assetInfo + */ +export async function createPlatformAssetLock(hdOpts, regFundKey, changeKey, assetInfo) { + let dashTx = DashTx.create(KeyUtils); + if (!regFundKey.privateKey) { + throw new Error("'regFundKey' is missing 'privateKey'"); + } + let fundingWif = await DashHd.toWif(regFundKey.privateKey, hdOpts); + let fundingInfo = await wifToInfo(fundingWif, "testnet"); + { + let fundingDeltas = await DashTx.utils.rpc(RPC_AUTH_URL, "getaddressdeltas", { + addresses: [fundingInfo.address], + }); + let memDeltas = await DashTx.utils.rpc(RPC_AUTH_URL, "getaddressmempool", { + addresses: [fundingInfo.address], + }); + let totalUses = fundingDeltas.length + memDeltas.length; + // if (totalUses >= 2) { + // throw new Error(`funding key has been used 2+ times`) + // } + } + KeyUtils.set(fundingInfo.address, { + address: fundingInfo.address, + privateKey: fundingInfo.privateKey, + publicKey: fundingInfo.publicKey, + pubKeyHash: fundingInfo.pubKeyHashHex, + }); + if (!changeKey.privateKey) { + throw new Error("'topupKey' is missing 'privateKey'"); + } + let changeWif = await DashHd.toWif(changeKey.privateKey, hdOpts); + let changeInfo = await wifToInfo(changeWif, "testnet"); + let fundingUtxos = await TODOgetUtxos([fundingInfo.address]); + for (let utxo of fundingUtxos) { + utxo.squence = "00000000"; // ?? + } + // TODO list transactions from funding address and check for + // - check the funding address for transactions + let fundingTotal = DashTx.sum(fundingUtxos); + console.log(); + console.log(`funding utxos (${fundingTotal})`); + console.log(fundingUtxos); + let transferSats = 100000000; + let feeSats = 500; // enough for 1 input and 2 outputs + extrapayload + let changeSats = fundingTotal + -transferSats + -feeSats; + let burnOutput = { memo: "", satoshis: transferSats }; + /** @type {Array} */ + let outputs = [burnOutput]; + if (changeSats >= 10000) { + outputs.push({ + satoshis: changeSats, + pubKeyHash: changeInfo.pubKeyHashHex, + }); + } + else if (changeSats < 250) { + let needSats = 250 - changeSats; + promptQr(fundingInfo.address, needSats); + process.exit(1); + // throw new Error( + // `too few sats for test: ${fundingTotal} (needs at least 100000000 + 250 + 10000)`, + // ); + } + // Comes from new_p2pkh + // TODO: hash160?! + let pubkeyhash = await KeyUtils.pubkeyHash(assetInfo.publicKey); + // let script = Scripts.makeP2PKH(pubkeyhash) + // console.log('assetInfo.publicKey', toHex(assetInfo.publicKey)); + // console.log('pubkeyhash', toHex(pubkeyhash)); + // console.log('p2pkh script', toHex(script)); + // let assetLockPayload = DashBincode.AssetLockPayload({ + // version: VERSION_ASSET_LOCK, + // credit_outputs: [DashBincode.TxOut({ + // value: BigInt(transferSats), + // script_pubkey: DashBincode.ScriptBuf(script), + // })] + // }) + // let assetLockPayloadBytes = Bincode.encode(DashBincode.AssetLockPayload, assetLockPayload); + // let assetLockPayloadHex = DashTx.utils.bytesToHex(new Uint8Array(assetLockPayloadBytes)); + /** @type {DashTx.TxOutput} */ + let assetExtraOutput = { + satoshis: transferSats, + pubKeyHash: DashTx.utils.bytesToHex(pubkeyhash), + }; + let assetLockScript = DashPlatform.packAssetLock({ + version: VERSION_ASSET_LOCK, + creditOutputs: [assetExtraOutput], + }); + console.log('assetLockScript ', assetLockScript); + // console.log('assetLockPayloadBytes', assetLockPayloadHex); + let txDraft = { + version: L1_VERSION_PLATFORM, + type: TYPE_ASSET_LOCK, + inputs: fundingUtxos, + outputs: outputs, // burnOutput, changeOutput + extraPayload: assetLockScript, + }; + console.log(); + console.log(`Transaction Draft:`); + console.log(txDraft); + // to guarantee order + // txDraft.inputs.sort(DashTx.sortInputs); + // txDraft.outputs.sort(DashTx.sortOutputs); + let vout = txDraft.outputs.indexOf(burnOutput); + console.log(`DEBUG fundingInfo`, fundingInfo); + console.log(); + let txProof = DashTx.createRaw(txDraft); + // // @ts-expect-error - TxInputRaw is returned, transform to TxInputForSig? + // txProof.inputs[0].script = DashTx.utils.bytesToHex(new Uint8Array([OP.OP_RETURN])); //`76a914${fundingInfo.pubKeyHashHex}88ac`; + txProof.inputs[0].sequence = "00000000"; // Non-final DashTx.NON_FINAL = "00000000" + console.log(`Transaction Proof:`); + console.log(txProof); + console.log(); + let txProofHex = await DashTx.serialize(txProof, null); + console.log(`Transaction Proof Hex:`); + console.log(txProofHex); + console.log(); + console.log(`Ready-to-Broadcast (Signed) Transaction:`); + console.log(`('sendrawtransaction' via https://rpc.digitalcash.dev or https://trpc.digitalcash.dev)`); + let txSigned = await dashTx.hashAndSignAll(txDraft); + console.log(txSigned.transaction); + console.log(); + console.log(`Funding Outpoint Info (BE, internal)`); + let outpoint = await getFundingOutPoint(txSigned.transaction, vout); + console.log(outpoint); + let txidHex = await DashTx.utils.rpc(RPC_AUTH_URL, "sendrawtransaction", txSigned.transaction); + console.log("DEBUG send result (txidHex) (LE, for RPC)", txidHex); + /** @type {DashBincode.AssetLockProof} */ + let assetProof; + { + // TODO: These are commented out to help debugging the ChainProof version + let assetInstantEvent = startEventSource(ZMQ_AUTH_URL, "rawtxlocksig", createCheckDataIsProof(txSigned)); + let assetChainPoll = pollAssetLockChainProof(txidHex); + assetProof = await Promise.race([ + assetInstantEvent.promise, + assetChainPoll.promise, + ]); + console.error('assetProof', assetProof); + assetInstantEvent.source.close(); + assetChainPoll.source.close(); + } + console.log(); + console.log(`Funding Outpoint Hex`); + let fundingOutPointHex = `${outpoint.txid}${outpoint.voutHex}`; + console.log(fundingOutPointHex); + let identityId = await createIdentityId(fundingOutPointHex); + let identityIdHex = DashTx.utils.bytesToHex(identityId); + return { + txidHex, + identityIdHex, + assetProof, + }; +} +/** + * @param {String} wif + * @param {DashKeys.VERSION_PRIVATE} version - mainnet, testnet + */ +async function wifToInfo(wif, version) { + let privateKey = await DashKeys.wifToPrivKey(wif, { version }); + let publicKey = await KeyUtils.toPublicKey(privateKey); + let pubKeyHash = await DashKeys.pubkeyToPkh(publicKey); + let address = await DashKeys.pkhToAddr(pubKeyHash, { + version, + }); + let privateKeyHex = DashKeys.utils.bytesToHex(privateKey); + let publicKeyHex = DashKeys.utils.bytesToHex(publicKey); + let pubKeyHashHex = DashKeys.utils.bytesToHex(pubKeyHash); + let info = { + wif, + privateKey, + privateKeyHex, + publicKey, + publicKeyHex, + pubKeyHash, + pubKeyHashHex, + address, + }; + // console.log(info); + // process.exit(1); + return info; +} +/** + * @param {import("dashkeys").HexString} txSignedHex + * @param {import("dashhd").Uint32} outputIndex + */ +async function getFundingOutPoint(txSignedHex, outputIndex) { + let txBytes = DashTx.utils.hexToBytes(txSignedHex); + let txidBytes = await DashTx.doubleSha256(txBytes); + let txidBE = DashTx.utils.bytesToHex(txidBytes); + let voutLE = DashTx.utils.toUint32LE(outputIndex); + return { txid: txidBE, voutHex: voutLE, vout: outputIndex }; +} +/** + * @param {import("dashkeys").HexString} fundingOutPointHex + */ +function createIdentityId(fundingOutPointHex) { + let fundingOutPointBytes = DashTx.utils.hexToBytes(fundingOutPointHex); + let identityHashBytes = DashTx.doubleSha256(fundingOutPointBytes); + // let identityId = b58.encode(identityHashBytes); + // return identityId; + return identityHashBytes; +} +/** + * @param {import('dashtx').TxInfoSigned} txProofSigned + * @returns {CheckData<{raw: string}>} + */ +function createCheckDataIsProof(txProofSigned) { + /** + * @param {unknown} txlocksig + * @returns {txlocksig is {raw: string}} + */ + function checkDataIsProof(txlocksig) { + // @ts-expect-error + const raw = txlocksig?.raw; + console.log("checkDataIsProof", txlocksig, raw, 'startsWith?', txProofSigned.transaction.slice(0, 16)); + if (typeof raw !== 'string') { + console.warn(`unknown data:`, txlocksig); + return false; + } + return raw.startsWith(txProofSigned.transaction); + } + return checkDataIsProof; +} +/** + * @param {String} txidHex + */ +function pollAssetLockChainProof(txidHex) { + let isActive = true; + /** @type {any} */ + let timeoutToken; + /** + * @param {any} token + */ + function setTimeoutToken(token) { + timeoutToken = token; + } + /** + * @type {Promise} + */ + let promise = new Promise(async function (resolve, reject) { + let timeout = 1000; + for (;;) { + console.log(`pollAssetLockChainProof: sleeping for ${(timeout / 1000) | 0}s...`); + await sleep(timeout, setTimeoutToken); + timeout = Math.min(15000, timeout * 2); // exponential backoff. + if (!isActive) { + reject("cancelled"); + return; + } + let txCore = await getTransactionJson(txidHex); + if (!txCore) + continue; + const txInfo = txCore; + let vout = txInfo.vout.findIndex(voutInfo => voutInfo.scriptPubKey?.hex === "6a00" // TODO match the burn + ); + let assetLockChainProof = DashBincode.ChainAssetLockProof({ + core_chain_locked_height: txInfo.height, + out_point: { + // The hex encoding of a transaction id is reversed for some unknown reason. + txid: DashBincode.Txid(DashTx.utils.hexToBytes(DashTx.utils.reverseHex(txidHex))), + vout: vout, + }, + }); + console.log("assetLockChainProof", assetLockChainProof); + const proof = DashBincode.AssetLockProof.Chain(assetLockChainProof); + resolve(proof); + return; + } + }); + let source = { + close: function () { + isActive = false; + clearTimeout(timeoutToken); + }, + }; + return { + promise, + source, + }; +} +/** + * @typedef {Object} TransactionJson + * @property {boolean?} in_active_chain - Whether specified block is in the active chain or not (only present with explicit "blockhash" argument) + * @property {string} hex - The serialized, hex-encoded data for 'txid' + * @property {string} txid - The transaction id (same as provided) + * @property {string} hash - The transaction hash (differs from txid for witness transactions) + * @property {number} size - The serialized transaction size + * @property {number} vsize - The virtual transaction size (differs from size for witness transactions) + * @property {number} weight - The transaction's weight (between vsize*4-3 and vsize*4) + * @property {number} version - The version + * @property {number} locktime - The lock time + * @property {Array<{ + * txid?: string, + * vout?: number, + * scriptSig?: { asm: string, hex: string }, + * sequence: number, + * txinwitness?: Array + * }>} vin - The transaction inputs + * @property {Array<{ + * value: number, + * n: number, + * scriptPubKey: { + * asm: string, + * hex: string, + * reqSigs?: number, + * type: string, + * addresses?: Array + * } + * }>} vout - The transaction outputs + * @property {number?} height - If the transaction has been included in a block on the local best block chain, this is the block height where the transaction was mined. Otherwise, this is -1. Not shown for mempool transactions. + * @property {string?} blockhash - The block hash + * @property {number?} confirmations - The confirmations + * @property {number?} blocktime - The block time expressed in UNIX epoch time + * @property {number?} time - Same as "blocktime" + */ +/** + * @typedef {Object} TransactionMetadata + * @property {number} height - The block height or index + */ +/** + * @typedef {TransactionJson & TransactionMetadata} TransactionJsonMetadata + */ +/** + * @param {import("dashkeys").HexString} txidHex + * @returns {Promise} + */ +async function getTransactionJson(txidHex) { + const E_NO_TX = -5; + let getJson = true; + console.log('getTransactionJson: Looking for transaction...', txidHex); + /** @type {TransactionJson | null} */ + let txInfo = await DashTx.utils + .rpc(RPC_AUTH_URL, "getrawtransaction", txidHex, getJson) + .catch( + /** @param {Error} err */ + function (err) { + //@ts-expect-error - it may have .code + if (err.code === E_NO_TX) { + return null; + } + throw err; + }); + // console.log('getTransactionJson: txInfo', txInfo) + if (!txInfo?.vout || txInfo?.blockhash == undefined || txInfo?.height == undefined) { + return null; + } + // console.log('getTransactionJson: Getting block height...') + // /** + // * @type {{ + // * height: number, + // * }} + // */ + // let blockInfo = await DashTx.utils + // .rpc(RPC_AUTH_URL, "getblock", txInfo.blockhash, "1" /* verbosity */) + // .catch( + // /** @param {Error & {code?: number}} err */ + // function (err) { + // // TODO: is this the right error code for getblock? + // console.error("getblock error", err.code, err); + // // if (err.code === E_NO_TX) { + // // return null + // // } + // throw err + // }, + // ) + // return { + // ...txInfo, + // height: blockInfo.height, + // } + // @ts-expect-error - we know height is set now + return txInfo; +} +// TODO: This sleep with setTimeoutToken is an obnoxious leaky abstraction. And is unref() really +// the right thing to do? +/** + * @param {import("dashhd").Uint32} ms + * @param {Function} setTimeoutToken + */ +async function sleep(ms, setTimeoutToken) { + return await new Promise(function (resolve) { + let token = setTimeout(resolve, ms); + // if (token.unref) { + // token.unref() + // } + if (setTimeoutToken) { + setTimeoutToken(token); + } + }); +} +/** + * @template T + * @callback CheckData + * @param {unknown} message + * @returns {message is T} + */ +/** + * @template T + * @param {String} url + * @param {String} eventName + * @param {CheckData} checkData + */ +function startEventSource(url, eventName, checkData) { + let isActive = true; + let tickerHeartbeatMs = 5 * 1000; + // in case of a network hiccup lasting several seconds + let tickerHeartbeatTimeout = 3 * tickerHeartbeatMs; + let source = new EventSourceShim(url, { + readTimeoutMillis: tickerHeartbeatTimeout, + }); + /** @type {Promise} */ + let promise = new Promise(async function (resolve, reject) { + let basicAuth = btoa(`api:null`); + let resp = await fetch(ZMQ_AUTH_URL, { + method: "PUT", + headers: { + Authorization: `Basic ${basicAuth}`, + "Content-Type": "application/json", + }, + body: JSON.stringify({ topics: ["debug:ticker", eventName] }), + }).catch(reject); + if (!resp) { + // rejected; + return null; + } + let result = await resp.text(); + console.log(`[DEBUG] status: ${result}`); + /** @param {MessageEvent} event */ + async function onMessage(event) { + if (!isActive) { + console.log("EventSource: received message after close"); + source.close(); + return; + } + console.log(`DEBUG MessageEvent`, event); + /** @type {T} */ + let data = JSON.parse(event.data); + try { + let isValidData = checkData(data); + if (!isValidData) { + return; + } + } + catch (err) { + console.error(`error checking event source data`); + console.error(err); + return false; + } + const txlocksigHex = data.raw; + { + let len = txlocksigHex.length / 2; + console.log(); + console.log(`Tx Lock Sig Hex (${len}):`); + console.log(txlocksigHex); + } + let vout = -1; + let instantLockTxHex = ""; + let instantLockSigHex = ""; + { + let txlocksig = DashTx.parseUnknown(txlocksigHex); + vout = 0; + //vout = txlocksig.extraPayload.outputs.findIndex(function (output) { + // //@ts-expect-error + // return output.script === "6a00"; + //}); + // console.log(txlocksig.extraPayload.outputs); + //@ts-expect-error + instantLockSigHex = txlocksig.sigHashTypeHex; + let isLen = instantLockSigHex.length / 2; + let len = txlocksigHex.length / 2; + len -= isLen; + instantLockTxHex = txlocksigHex.slice(0, len * 2); + console.log(); + console.log(`Tx Hex (${len})`); + console.log(instantLockTxHex); + console.log(); + console.log(`Tx Lock Sig Instant Lock Hex (${isLen})`); + //@ts-expect-error + console.log(txlocksig.sigHashTypeHex); + } + let assetLockInstantProof = DashBincode.RawInstantLockProof({ + instant_lock: DashBincode.BinaryData(DashTx.utils.hexToBytes(instantLockSigHex)), + transaction: DashBincode.BinaryData(DashTx.utils.hexToBytes(instantLockTxHex)), // TODO this may need the proof, not the signed tx + output_index: vout, + }); + const proof = DashBincode.AssetLockProof.Instant(assetLockInstantProof); + resolve(proof); + source.close(); + } + console.log(`EventSource: listening for debug:ticker`); + source.addEventListener("debug:ticker", function (/** @type {any} */ event) { + console.log("EventSource: ticker", event); + }); + if (eventName) { + console.log(`EventSource: listening for ${eventName}`); + source.addEventListener(eventName, onMessage); + } + else { + console.log(`EventSource: listening for all messages`); + source.addEventListener("message", onMessage); + } + source.addEventListener("error", function (/** @type {any} */ err) { + if (!isActive) { + console.log("EventSource: received error after close (probably okay)"); + source.close(); + return; + } + console.error("error: disconnected from EventSource", err); + // TODO reconnect? + }); + source.addEventListener("close", function () { + console.log("DEBUG: closed EventSource"); + }); + }); + return { + promise: promise, + source: { + close: function () { + isActive = false; + source.close(); + }, + }, + }; +} +/** + * @typedef Delta + * @prop {String} txid + * @prop {Uint32} index + * @prop {String} pubKeyHash + * @prop {String} address + * @prop {Uint32} satoshis + */ +/** + * THIS IS PROBABLY WRONG + * We'd actually need to do getaddresstxids, getrawtransaction, getaddressutxos, getaddressmempool to get all of the data to pair the coins properly + * @param {Array} addresses + */ +export const TODOgetUtxos = async function (addresses) { + // let oldDeltas = await DashTx.utils.rpc(RPC_AUTH_URL, "getaddressdeltas", { + let utxos = await DashTx.utils.rpc(RPC_AUTH_URL, "getaddressutxos", { + addresses: addresses, + }); + console.log(`DEBUG utxos`); + console.log(utxos); + let memDeltas = await DashTx.utils.rpc(RPC_AUTH_URL, "getaddressmempool", { + addresses: addresses, + }); + let oldTotal = DashTx.sum(utxos); + let newTotal = DashTx.sum(memDeltas); + let total = newTotal + oldTotal; + if (total === 0) { + return []; + } + else if (total < 0) { + throw new Error("sanity fail: double spend detected"); + } + for (let delta of memDeltas) { + if (delta.satoshis < 0) { + throw new Error("dev error: reconciling instant-send debits is not yet supported"); + } + // TODO expose decodeUnchecked(), rename 'pubKeyHash' (data) to 'hex' + let pubKeyHashCheck = DashKeys._dash58check.decode(delta.address, { + //@ts-expect-error + versions: VERSIONS_TESTNET, + }); + let utxo = { + address: delta.address, + //@ts-expect-error - needs better abstraction + pubKeyHash: pubKeyHashCheck.pubKeyHash, + txid: delta.txid, + outputIndex: delta.index, + satoshis: delta.satoshis, + //@ts-expect-error - needs better abstraction + script: `76a914${pubKeyHashCheck.pubKeyHash}88ac`, + }; + utxos.push(utxo); + } + return utxos; +}; +// /** +// * @param {String} path +// */ +// async function readWif(path) { +// let wif = await Fs.readFile(path, "utf8"); +// wif = wif.trim(); +// return wif; +// } +/** @typedef {String} Base58 */ +/** @typedef {String} Base64 */ +/** @typedef {String} HexString */ +/** @typedef {Number} Uint53 */ +/** @typedef {Number} Uint32 */ +/** @typedef {Number} Uint8 */ diff --git a/built/DashPlatform.js/src/bincode.d.ts b/built/DashPlatform.js/src/bincode.d.ts new file mode 100644 index 0000000..8f751e2 --- /dev/null +++ b/built/DashPlatform.js/src/bincode.d.ts @@ -0,0 +1,223 @@ +/** + * The interface an object must conform to in order to be used by Bincode or + * in another BinCode-able type. + */ +export interface BinCodeable { + /** The name of this type, used in error messages. */ + name: string; + /** Return true if the given value is valid and can be encoded/decoded by this type. */ + isValid: (value: unknown) => boolean; + /** Encode the given value into the BinCode stream. */ + encode: (bc: BinCode, value: T) => void; + /** Decode the expected value from the BinCode stream. */ + decode: (bc: BinCode) => T; +} +/** Extra options can be passed to modify encoding/decoding behavior. */ +export interface BinCodeOptions { + signable?: Boolean; +} +/** Encode a BinCodeable value returning an ArrayBuffer of bytes */ +export declare function encode(_type: BinCodeable, value: T, options?: BinCodeOptions): ArrayBuffer; +/** Decode the given type from the given buffer. */ +export declare function decode(_type: BinCodeable, value: ArrayBuffer, options?: {}): T; +/** + * BinCode is a wrapper around a DataView to make it easier to use as a stream. + * It is only used inside the encode/decode implementations for a particular type. + * If you are looking to just encode/decode some array of bytes then look at {@link encode} or {@link decode}. + * It also holds the BinCodeOptions passed to encode/decode. + */ +export declare class BinCode { + dataview: DataView; + idx: number; + options: BinCodeOptions; + constructor(dataview: DataView, idx?: number, options?: BinCodeOptions); + /** + * Returns the slice from 0 to the current index, when done writing. + */ + slice(): ArrayBuffer; + _idxThenAdd(add: number): number; + /** + * Returns the current index, before advancing it by `add`. If there are not enough + * bytes in the current dataview, replaces it a new one twice the size. + */ + _idxThenAddExtend(add: number): number; + _debug(msg: any): void; +} +export declare function Vec(inner: BinCodeable): BinCodeable; +export declare function Tuple[]>(...inners: T): BinCodeable; +declare const BincodeMap: (keyType: BinCodeable, valueType: BinCodeable) => BinCodeable>; +export { BincodeMap as Map }; +type BinCodeableStructTuple[]> = { + (...data: UnBinCodeable): UnBinCodeable & { + readonly $$type: N; + }; + fields: T; +}; +/** + * A BinCodeable type that is a struct with named fields. + */ +type BinCodeableStruct; +} | BinCodeable[]> = BinCodeable> & (T extends BinCodeable[] ? BinCodeableStructTuple : { + (data: UnBinCodeable): UnBinCodeable & { + readonly $$type: N; + }; + fields: T; +}); +export declare function Struct; +}>(name: N, fields: T): BinCodeableStruct; +export declare function StructTuple[]>(name: N, ...fields: T): BinCodeableStruct; +/** + * Extract the object type from a Record of BinCodeable types. + */ +type UnBinCodeable; +} | BinCodeable[]> = { + [k in keyof T]: T[k] extends BinCodeable ? U : never; +}; +/** + * Extract the union type from a Record of Variants of Bincodeable types. + */ +type EnumType; + } | BinCodeable[]; +}> = { + [k in keyof T]: UnBinCodeable; +}[keyof T]; +type EnumVariantStruct; +}> = { + (data: UnBinCodeable): UnBinCodeable & { + [ENUM]: N; + [VARIANT]: V; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: T; +}; +type EnumVariantTuple[]> = { + (...data: UnBinCodeable): UnBinCodeable & { + [ENUM]: N; + [VARIANT]: V; + [DISCRIMINANT]: number; + }; + discriminant: number; + fields: T; +}; +type EnumVariant[] | { + [f: string]: BinCodeable; +}> = T extends BinCodeable[] ? EnumVariantTuple : T extends { + [f: string]: BinCodeable; +} ? EnumVariantStruct : never; +type BinCodeableEnum; + } | BinCodeable[]; +}> = BinCodeable> & { + $$type: { + [ENUM]: N; + }; + variants: T; +} & { + [V in keyof T & string]: EnumVariant; +}; +export declare const ENUM: unique symbol; +export declare const VARIANTS: unique symbol; +export declare const VARIANT: unique symbol; +export declare const VARIANT_NAME: unique symbol; +export declare const DISCRIMINANT: unique symbol; +type MatchFns = { + [k in keyof Variants]: (x: Variants[k] extends (data: any) => infer V ? V : never) => R; +}; +export declare function match(value: Enum, fns: Enum extends { + [VARIANTS]: any; +} ? MatchFns : never): T; +export declare function Enum; + } | BinCodeable[]; +}>(name: N, definitions: T): BinCodeableEnum; +export declare function VariantDiscriminant(v: T, discriminant: number): T; +export declare const TODO: BinCodeable; +export declare const Nothing: BinCodeable; +export declare function Option(inner: BinCodeable): ((data: T | undefined) => T | undefined) & { + isValid(data: unknown): boolean; + encode(bc: BinCode, data: T | undefined | null): void; + decode(bc: BinCode): T | undefined; +}; +export declare function Lazy(name: string, makeBincodeable: () => BinCodeable): BinCodeable & { + unlazy: () => BinCodeable; +}; +export declare namespace Lazy { + var unlazy: (val: BinCodeable) => BinCodeable; +} +export declare const Null: BinCodeable; +export declare const Uint8: BinCodeable; +export declare const Uint16: BinCodeable; +export declare const Uint32: BinCodeable; +export declare const Uint64: BinCodeable; +export declare const Uint128: BinCodeable; +export declare const Int8: BinCodeable; +/** @type {BinCodeable} */ +export declare const Int16: BinCodeable; +export declare const Int32: BinCodeable; +export declare const Int64: BinCodeable; +export declare const Int128: BinCodeable; +export declare const Float64: BinCodeable; +export declare const VarUint: BinCodeable; +export declare const VarInt: BinCodeable; +export declare const Bool: BinCodeable; +export declare const Bytes: BinCodeable; +export declare const String: BinCodeable; +export declare function FixedBytes(length: number): BinCodeable; +/** + * @template T + * @param {BinCodeable} inner + * @returns {BinCodeable} + */ +export declare function NotSignable(inner: BinCodeable): BinCodeable; +/** + * @template T + * @param {BinCodeable} inner + */ +export declare function Range(inner: BinCodeable): BinCodeable<[BinCodeable, BinCodeable]>; +export declare const Ipv4Addr: BinCodeableStruct<"Ipv4Addr", { + octets: BinCodeable>; +}>; +export declare const SocketAddrV4: BinCodeableStruct<"SocketAddrV4", { + ip: BinCodeableStruct<"Ipv4Addr", { + octets: BinCodeable>; + }>; + port: BinCodeable; +}>; +export declare const Ipv6Addr: BinCodeableStruct<"Ipv6Addr", { + octets: BinCodeable>; +}>; +export declare const SocketAddrV6: BinCodeableStruct<"SocketAddrV6", { + ip: BinCodeableStruct<"Ipv6Addr", { + octets: BinCodeable>; + }>; + port: BinCodeable; + flowinfo: BinCodeable; + scope_id: BinCodeable; +}>; +export declare const SocketAddr: BinCodeableEnum<"SocketAddr", { + /** An IPv4 socket address. */ + V4: BinCodeableStruct<"SocketAddrV4", { + ip: BinCodeableStruct<"Ipv4Addr", { + octets: BinCodeable>; + }>; + port: BinCodeable; + }>[]; + /** An IPv6 socket address. */ + V6: BinCodeableStruct<"SocketAddrV6", { + ip: BinCodeableStruct<"Ipv6Addr", { + octets: BinCodeable>; + }>; + port: BinCodeable; + flowinfo: BinCodeable; + scope_id: BinCodeable; + }>[]; +}>; diff --git a/built/DashPlatform.js/src/bincode.js b/built/DashPlatform.js/src/bincode.js new file mode 100644 index 0000000..9c81827 --- /dev/null +++ b/built/DashPlatform.js/src/bincode.js @@ -0,0 +1,1005 @@ +/** + * This is the core of an implementation of Rust's [Bincode](https://github.com/bincode-org/bincode) in Typescript. + * If you are looking for how to use this module, your entry point is the {@link encode} and {@link decode} functions. + * @module + * + * @example + * ```js + * import * as Bincode from 'dashplatform/bincode' + * + * let input = -42 + * let encoded_bytes = Bincode.encode(Bincode.VarInt, input) + * let decoded_value = Bincode.decode(Bincode.VarInt, encoded_bytes) + * console.assert(input === decoded_value) + * ``` + */ +import { toHex } from "./hex.js"; +const DEBUG = false; +const LITTLE_ENDIAN = false; +/** Encode a BinCodeable value returning an ArrayBuffer of bytes */ +export function encode(_type, value, options = {}) { + let ab = new ArrayBuffer(16); + let dv = new DataView(ab); + const bc = new BinCode(dv, 0, options); + _type.encode(bc, value); + return bc.slice(); +} +/** Decode the given type from the given buffer. */ +export function decode(_type, value, options = {}) { + const bc = new BinCode(new DataView(value), 0, options); + return _type.decode(bc); +} +/** + * BinCode is a wrapper around a DataView to make it easier to use as a stream. + * It is only used inside the encode/decode implementations for a particular type. + * If you are looking to just encode/decode some array of bytes then look at {@link encode} or {@link decode}. + * It also holds the BinCodeOptions passed to encode/decode. + */ +export class BinCode { + dataview; + idx; + options; + constructor(dataview, idx = 0, options = {}) { + this.dataview = dataview; + this.idx = idx; + this.options = options; + } + /** + * Returns the slice from 0 to the current index, when done writing. + */ + slice() { + return this.dataview.buffer.slice(0, this.idx); + } + _idxThenAdd(add) { + let idx = this.idx; + this.idx += add; + return idx; + } + /** + * Returns the current index, before advancing it by `add`. If there are not enough + * bytes in the current dataview, replaces it a new one twice the size. + */ + _idxThenAddExtend(add) { + let idx = this.idx; + this.idx += add; + if (this.idx > this.dataview.byteLength) { + // not enough space, extend the dataview + let newlen = Math.max(this.dataview.byteLength * 2, this.idx + add); + newlen = newlen < 16 ? 32 : newlen; + let newab = new ArrayBuffer(newlen); + new Uint8Array(newab).set(new Uint8Array(this.dataview.buffer), 0); + // console.log("Extending BinCode dataview: ", this.idx, add, this.dataview.byteLength, this.dataview.buffer, ' -> ', newab); + this.dataview = new DataView(newab); + } + return idx; + } + _debug(msg) { + console.log("DEBUG: " + + msg + + " at " + + this.idx + + ": " + + toHex(this.dataview.buffer.slice(0, this.idx)) + + " " + + toHex(this.dataview.buffer.slice(this.idx))); + } +} +export function Vec(inner) { + return { + name: "Vec<" + inner.name + ">", + isValid(value) { + return Array.isArray(value); + }, + encode(bc, val) { + VarUint.encode(bc, val.length); + for (let i = 0; i < val.length; i++) { + inner.encode(bc, val[i]); + } + }, + decode(bc) { + let len = VarUint.decode(bc); + /** @type {any[]} */ + let val = new Array(len); + for (let i = 0; i < len; i++) { + val[i] = inner.decode(bc); + } + return val; + }, + }; +} +export function Tuple(...inners) { + return { + name: "(" + inners.map(t => t.name).join(', ') + ")", + isValid(value) { + return Array.isArray(value); + }, + encode(bc, val) { + for (let i = 0; i < inners.length; i++) { + inners[i].encode(bc, val[i]); + } + }, + decode(bc) { + /** @type {*} */ + let val = new Array(inners.length); + for (let i = 0; i < inners.length; i++) { + val[i] = inners[i].decode(bc); + } + return val; + }, + }; +} +const BincodeMap = function BincodeMap(keyType, valueType) { + return { + name: "Map<" + keyType.name + ", " + valueType.name + ">", + isValid(value) { + return Array.isArray(value); + }, + encode(bc, val) { + VarUint.encode(bc, val.size); + for (const [k, v] of val.entries()) { + keyType.encode(bc, k); + valueType.encode(bc, v); + } + }, + decode(bc) { + let len = VarUint.decode(bc); + const val = new globalThis.Map(); + for (let i = 0; i < len; i++) { + const key = keyType.decode(bc); + const value = valueType.decode(bc); + val.set(key, value); + } + return val; + }, + }; +}; +export { BincodeMap as Map }; +function testIt() { + let Test = StructTuple("Foo", Uint8, String); + let Test2 = StructTuple("Foo", Uint8, String); + let test = Test(1, "hello"); + let test2 = Test2(1, "hello"); +} +export function Struct(name, fields) { + /** @type {BinCodeableStruct} */ + // @ts-ignore + const strct = { + [name]: function (data) { + // if (!(this instanceof strct)) { + // return new strct(data); + // } + const instance = Object.create(strct.prototype); + for (const key in fields) { + if (!(key in data) && !fields[key].isValid(undefined)) { + throw new Error("Struct " + name + " missing key: " + key); + } + instance[key] = data[key]; + } + return instance; + } + }[name]; + strct.prototype = Object.create(Object.prototype, { + constructor: { + enumerable: false, + configurable: true, + writable: true, + value: strct, + }, + "$$type": { + value: name, + writable: false, + enumerable: false, + configurable: false, + }, + }); + strct.fields = fields; + strct.isValid = function isValid(value) { + if (!value || typeof value !== 'object') + return false; + for (const innerKey in fields) { + // @ts-ignore + if (!fields[innerKey].isValid(value[innerKey])) { + return false; + } + } + return true; + }; + strct.encode = { [name + "_encode"]: function (bc, val) { + for (const innerKey in fields) { + fields[innerKey].encode(bc, val[innerKey]); + } + } }[name + "_encode"]; + strct.decode = function decode(bc) { + /** @type {any} */ + let val = {}; + for (const innerKey in fields) { + if (DEBUG) + bc._debug(` decoding ${name}.${innerKey} (${fields[innerKey].name})`); + val[innerKey] = fields[innerKey].decode(bc); + if (DEBUG) + bc._debug(` decoded ${name}.${innerKey} (${fields[innerKey].name}) to ${val[innerKey]}`); + } + // if (DEBUG) bc._debug(`decoded ${name} to ${JSON.stringify(val)}`) + return strct(val); + }; + return strct; +} +export function StructTuple(name, ...fields) { + /** @type {BinCodeableStruct} */ + // @ts-ignore + const strct = { + [name]: function (...data) { + if (!(this instanceof strct)) { + return new strct(...data); + } + // Array.call(this); + if (data.length !== fields.length) { + throw new Error("Struct " + name + " expected " + fields.length + " fields, got " + data.length); + } + // const instance = this; + // We have to explicitly set the length property since Array's don't really subclass well + this.length = data.length; + for (const key in fields) { + this[key] = data[key]; + } + // return instance; + } + }[name]; + strct.prototype = Object.create(Array.prototype, { + constructor: { + enumerable: false, + configurable: true, + writable: true, + value: strct, + }, + "$$type": { + value: name, + writable: false, + enumerable: false, + configurable: false, + }, + }); + strct.prototype.toJSON = function () { + return Array.from(this); + }; + strct.fields = fields; + strct.isValid = function isValid(value) { + if (!value || typeof value !== 'object') + return false; + for (const innerKey in fields) { + // @ts-ignore + if (!fields[innerKey].isValid(value[innerKey])) { + return false; + } + } + return true; + }; + strct.encode = { [name + "_encode"]: function (bc, val) { + for (let innerKey = 0; innerKey < fields.length; innerKey++) { + fields[innerKey].encode(bc, val[innerKey]); + } + } }[name + "_encode"]; + strct.decode = { [name + "_decode"]: function (bc) { + /** @type {any} */ + let val = []; + for (let innerKey = 0; innerKey < fields.length; innerKey++) { + if (DEBUG) + bc._debug(` decoding ${name}.${innerKey} (${fields[innerKey].name})`); + val[innerKey] = fields[innerKey].decode(bc); + // if (DEBUG) bc._debug(` decoded ${name}.${innerKey} (${fields[innerKey].name}) to ${JSON.stringify(val[innerKey])}`) + } + // if (DEBUG) bc._debug(`decoded ${name} to ${JSON.stringify(val)}`) + return strct(...val); + } }[name + "_decode"]; + return strct; +} +export const ENUM = Symbol("ENUM"); +export const VARIANTS = Symbol("VARIANTS"); +export const VARIANT = Symbol("VARIANT"); +export const VARIANT_NAME = Symbol("VARIANT_NAME"); +export const DISCRIMINANT = Symbol("DISCRIMINANT"); +export function match(value, fns) { + const anyValue = value; + const variantName = anyValue[VARIANT]; + const fn = fns[variantName]; + if (!fn) { + throw new Error("No match for " + variantName); + } + return fn(anyValue); +} +export function Enum(name, definitions) { + const enumClass = { [name]: function () { + // console.log("DEBUG:", "Enum", name, {this: this}); + } }[name]; + enumClass.variants = {}; + Object.defineProperties(enumClass.prototype, { + [ENUM]: { + value: name, + writable: false, + enumerable: false, + configurable: false, + }, + [VARIANTS]: enumClass.variants, + }); + enumClass.isValid = function isValid(value) { + // We need to check that exactly one of the definitions is valid + // if there are multiple valid definitions, the value is ambiguous + let valid = 0; + for (const key in definitions) { + if (enumClass.variants[key].isValid(value)) { + valid += 1; + } + } + return valid == 1; + }; + enumClass.encode = { [name + "_encode"]: function (bc, val) { + const variant = Object.getPrototypeOf(val).constructor; + const discriminant = variant.discriminant; + VarUint.encode(bc, discriminant); + variant.encode(bc, val); + } }[name + "_encode"]; + enumClass.decode = function decode(bc) { + const discriminant = Number(VarUint.decode(bc)); + const variantName = Object.keys(enumClass.variants)[discriminant]; + if (DEBUG) + bc._debug(`decoded ${name} variant: ${discriminant} ${variantName}`); + if (!variantName) + throw new Error("Enum " + this.name + " decode failed, bad discriminant: " + discriminant); + return enumClass.variants[variantName].decode(bc); + }; + let prevDiscriminant = 0; + for (const [variantName, fields] of Object.entries(definitions)) { + const theDiscriminant = fields[VARIANT_DISCRIMINANT] ?? prevDiscriminant; + prevDiscriminant = theDiscriminant + 1; + const variantClassName = name + '.' + variantName; + const fieldsKeys = Object.keys(fields); + const numFields = fieldsKeys.length; + const isTuple = Array.isArray(fields); + /** @type {*} */ + const variantClass = isTuple ? { + [variantClassName]: function (...data) { + // console.log("DEBUG:", "EnumVariant", variantName, {this: this}); + if (!(this instanceof variantClass)) { + // @ts-ignore + return new variantClass(...data); + } + enumClass.call(this); + if (data.length != numFields) { + throw new Error("Variant " + name + " expected " + numFields + " fields, got " + data.length + ": " + JSON.stringify(data)); + } + for (let i = 0; i < numFields; i++) { + this[i] = data[i]; + } + // console.log("DEBUG:", "EnumVariant done", variantName, this); + } + }[variantClassName] + : + { + [variantClassName]: function (data) { + // console.log("DEBUG:", "EnumVariant", variantName, {this: this}); + if (!(this instanceof variantClass)) { + // @ts-ignore + return new variantClass(data); + } + enumClass.call(this); + for (const key in fields) { + if (!(key in data)) { + throw new Error("Struct " + name + " missing key: " + key); + } + this[key] = data[key]; + } + // console.log("DEBUG:", "EnumVariant done", variantName, this); + } + }[variantClassName]; + // console.log('DEBUG:', variantClass, variantClass.prototype, Object.create(variantClass.prototype)); + variantClass.prototype = Object.create(enumClass.prototype, { + constructor: { + enumerable: false, + configurable: true, + writable: true, + value: variantClass, + }, + [VARIANT]: { + value: variantName, + writable: false, + enumerable: false, + configurable: false, + }, + [DISCRIMINANT]: { + value: theDiscriminant, + writable: false, + enumerable: false, + configurable: false, + }, + }); + // Object.defineProperty(variantClass.prototype, 'constructor', { + // enumerable: false, + // configurable: true, + // writable: true, + // value: variantClass, + // }); + // console.log('DEBUG:', variantClass, variantClass.prototype, Object.create(variantClass.prototype)) + // console.log('DEBUG:', 'vc.p', Object.getOwnPropertyDescriptors(variantClass.prototype)); + // console.log('DEBUG:', 'vc.p.p', Object.getOwnPropertyDescriptors(enumClass.prototype)); + variantClass.discriminant = theDiscriminant; + variantClass.prototype.toJSON = function () { + if (numFields == 0) { + return '' + theDiscriminant; + // return variantName; + } + if (isTuple) { + if (numFields == 1) { + // return {[variantName]: this[0]}; + return { $version: '' + theDiscriminant, ...this[0] }; + } + return { [variantName]: Array.from(this) }; + } + return { $version: '' + theDiscriminant, ...this }; + // return {[variantName]: {...this}} + }; + const variantStruct = isTuple ? StructTuple(name + '.' + variantName, ...fields) : Struct(name + '.' + variantName, fields); + variantClass.isValid = function isValid(val) { + return variantStruct.isValid(val); + }; + variantClass.decode = { [name + variantName + "_decode"]: function (bc) { + const data = variantStruct.decode(bc); + // if (DEBUG) bc._debug(`decoded ${name}.${variantName} to ${JSON.stringify(data)}`) + if (isTuple) + return variantClass(...data); + else + return variantClass(data); + } }[name + variantName + "_decode"]; + variantClass.encode = { [name + variantName + "_encode"]: function (bc, val) { + return variantStruct.encode(bc, val); + } }[name + variantName + "_encode"]; + enumClass[variantName] = variantClass; + enumClass.variants[variantName] = variantClass; + } + // console.log("Done constructing Enum", name, enumClass); + return enumClass; +} +const VARIANT_DISCRIMINANT = Symbol("VARIANT_DISCRIMINANT"); +// Wrap the variant in this to set a custom discriminant +export function VariantDiscriminant(v, discriminant) { + v[VARIANT_DISCRIMINANT] = discriminant; + return v; +} +export const TODO = { + name: "TODO", + // @ts-ignore + isValid(value) { + throw new Error("TODO"); + }, + // @ts-ignore + encode(bc, num) { + throw new Error("TODO"); + }, + // @ts-ignore + decode(bc) { + throw new Error("TODO"); + }, +}; +export const Nothing = { + name: "Nothing", + isValid(value) { + return value === undefined; + }, + encode(bc, num) { }, + decode(bc) { }, +}; +export function Option(inner) { + let name = `Option<${inner.name}>`; + return Object.assign({ [name]: function (data) { + return data; + } }[name], { + isValid(data) { + if (data === null || data === undefined) + return true; + return inner.isValid(data); + }, + encode(bc, data) { + if (data == null) { + Uint8.encode(bc, 0); + } + else { + Uint8.encode(bc, 1); + inner.encode(bc, data); + } + }, + decode(bc) { + const disc = Uint8.decode(bc); + if (disc == 0) { + return; + } + else if (disc == 1) { + return inner.decode(bc); + } + throw new Error("Bad discriminant for " + name + ": " + disc); + } + }); +} +export function Lazy(name, makeBincodeable) { + /** @type {BinCodeable | undefined} */ + let bincodeable = undefined; + function unlazy() { + if (!bincodeable) + bincodeable = makeBincodeable(); + return bincodeable; + } + return { + name, + unlazy, + isValid(value) { + return unlazy().isValid(value); + }, + encode(bc, val) { + unlazy().encode(bc, val); + }, + decode(bc) { + return unlazy().decode(bc); + }, + }; +} +Lazy.unlazy = function unlazy(val) { + // @ts-ignore + if ('unlazy' in val) + return val.unlazy(); + return val; +}; +export const Null = { + name: "Null", + isValid(value) { + return value === null || value === undefined; + }, + encode(bc, num) { }, + decode(bc) { + return null; + }, +}; +// /** +// * Constant expects to be a single number, but does not encode or decode any bytes. +// * @template T +// * @param {T} value +// * @returns {BinCodeable & {value: T}} +// */ +// export function Constant(value) { +// return { +// name: "Constant<" + value + ">", +// value, +// // @ts-ignore +// isValid(val){ +// return val === value; +// }, +// // @ts-ignore +// encode(bc, num) { +// }, +// // @ts-ignore +// decode(bc) { +// return value; +// }, +// }; +// } +export const Uint8 = { + name: "Uint8", + isValid(value) { + return typeof value === "number" && value >= 0 && value <= 0xFF && (value | 0) === value; + }, + encode(bc, num) { + const idx = bc._idxThenAddExtend(1); + bc.dataview.setUint8(idx, num); + }, + decode(bc) { + return bc.dataview.getUint8(bc._idxThenAdd(1)); + }, +}; +export const Uint16 = { + name: "Uint16", + isValid(value) { + return typeof value === "number" && value >= 0 && value <= 0xFFFF && (value | 0) === value; + }, + encode(bc, num) { + bc.dataview.setUint16(bc._idxThenAddExtend(2), num, LITTLE_ENDIAN); + }, + decode(bc) { + return bc.dataview.getUint16(bc._idxThenAdd(2), LITTLE_ENDIAN); + }, +}; +export const Uint32 = { + name: "Uint32", + isValid(value) { + return typeof value === "number" && value >= 0 && value <= 0xFFFFFFFF && (value | 0) === value; + }, + encode(bc, num) { + bc.dataview.setUint32(bc._idxThenAddExtend(4), num, LITTLE_ENDIAN); + }, + decode(bc) { + return bc.dataview.getUint32(bc._idxThenAdd(4), LITTLE_ENDIAN); + }, +}; +export const Uint64 = { + name: "Uint64", + isValid(value) { + if (typeof value === "bigint") + return value >= 0n && value <= 0xffffffffffffffffn; + return typeof value === "number" && value >= 0 && (value | 0) === value; + }, + encode(bc, num) { + const idx = bc._idxThenAddExtend(8); + bc.dataview.setBigUint64(idx, num, LITTLE_ENDIAN); + }, + decode(bc) { + return bc.dataview.getBigUint64(bc._idxThenAdd(8), LITTLE_ENDIAN); + }, +}; +export const Uint128 = { + name: "Uint128", + isValid(value) { + if (typeof value === "bigint") + return value >= 0n && value <= 0xffffffffffffffffffffffffffffffffn; + return typeof value === "number" && value >= 0 && (value | 0) === value; + }, + encode(bc, num) { + let a = BigInt.asUintN(64, num); + let b = BigInt.asUintN(64, num >> 64n); + // TODO: This probably isn't right when switching endian + let idx = bc._idxThenAddExtend(8); + bc.dataview.setBigUint64(idx, a, LITTLE_ENDIAN); + idx = bc._idxThenAddExtend(8); + bc.dataview.setBigUint64(idx, b, LITTLE_ENDIAN); + }, + decode(bc) { + // TODO: This probably isn't right when switching endian + let a = bc.dataview.getBigUint64(bc._idxThenAdd(8), LITTLE_ENDIAN); + let b = bc.dataview.getBigUint64(bc._idxThenAdd(8), LITTLE_ENDIAN); + return BigInt(a.toString() + b.toString()); + }, +}; +export const Int8 = { + name: "Int8", + isValid(value) { + return typeof value === "number" && value >= -0x8F && value <= 0x8F && (value | 0) === value; + }, + encode(bc, num) { + bc.dataview.setInt8(bc._idxThenAddExtend(1), num); + }, + decode(bc) { + return bc.dataview.getInt8(bc._idxThenAdd(1)); + }, +}; +/** @type {BinCodeable} */ +export const Int16 = { + name: "Int16", + isValid(value) { + return typeof value === "number" && value >= -0x8FFF && value <= 0x8FFF && (value | 0) === value; + }, + encode(bc, num) { + bc.dataview.setInt16(bc._idxThenAddExtend(2), num, LITTLE_ENDIAN); + }, + decode(bc) { + return bc.dataview.getInt16(bc._idxThenAdd(2), LITTLE_ENDIAN); + }, +}; +export const Int32 = { + name: "Int32", + isValid(value) { + return typeof value === "number" && value >= -0x8FFFFFFF && value <= 0x8FFFFFFF && (value | 0) === value; + }, + encode(bc, num) { + bc.dataview.setInt32(bc._idxThenAddExtend(4), num, LITTLE_ENDIAN); + }, + decode(bc) { + return bc.dataview.getInt32(bc._idxThenAdd(4), LITTLE_ENDIAN); + }, +}; +export const Int64 = { + name: "Int64", + isValid(value) { + if (typeof value === "bigint") + return value >= -0x8fffffffffffffffn && value <= 0x8fffffffffffffffn; + return typeof value === "number" && value >= 0 && (value | 0) === value; + }, + encode(bc, num) { + bc.dataview.setBigInt64(bc._idxThenAddExtend(8), num, LITTLE_ENDIAN); + }, + decode(bc) { + return bc.dataview.getBigInt64(bc._idxThenAdd(8), LITTLE_ENDIAN); + }, +}; +export const Int128 = { + name: "Int128", + isValid(value) { + if (typeof value === "bigint") + return value >= -0x8fffffffffffffffffffffffffffffffn && value <= 0x8fffffffffffffffffffffffffffffffn; + return typeof value === "number" && value >= 0 && (value | 0) === value; + }, + encode(bc, num) { + let a = BigInt.asIntN(64, num); + let b = BigInt.asIntN(64, num >> 64n); + // TODO: this probably isn't right when switching endian? + bc.dataview.setBigInt64(bc._idxThenAddExtend(8), a, LITTLE_ENDIAN); + bc.dataview.setBigInt64(bc._idxThenAddExtend(8), b, LITTLE_ENDIAN); + }, + decode(bc) { + // TODO: this probably isn't right when switching endian? + let a = bc.dataview.getBigInt64(bc._idxThenAdd(8), LITTLE_ENDIAN); + let b = bc.dataview.getBigInt64(bc._idxThenAdd(8), LITTLE_ENDIAN); + return BigInt(a.toString() + b.toString()); + }, +}; +export const Float64 = { + name: "Float64", + isValid(value) { + return typeof value === "number"; + }, + encode(bc, num) { + bc.dataview.setFloat64(bc._idxThenAddExtend(8), num, true); + }, + decode(bc) { + return bc.dataview.getFloat64(bc._idxThenAdd(8)); + }, +}; +function _zigzag(u) { + if (u == 0n) + return 0n; + // To avoid the edge case of Signed::min_value() + // !n is equal to `-n - 1`, so this is: + // !n * 2 + 1 = 2(-n - 1) + 1 = -2n - 2 + 1 = -2n - 1 + if (u < 0) + return (-u - 1n) * 2n - 1n; + if (u > 0) + return u * 2n; + throw new Error("_zigzag error: " + u); +} +function _unzigzag(u) { + if (u % 2n == 0n) { + // positive number + return u >> 1n; + } + else { + // negative number + // !m * 2 + 1 = u + // !m * 2 = u - 1 + // !m = (u - 1) / 2 + // m = !((u - 1) / 2) + // since we have u is odd, we have floor(u / 2) = floor((u - 1) / 2) + return (-u >> 1n) - 1n; + } +} +function _fitsInNumber(value) { + return value <= Number.MAX_SAFE_INTEGER && value >= Number.MIN_SAFE_INTEGER; +} +export const VarUint = { + name: "VarUint", + isValid(value) { + if (typeof value === "bigint") + return value >= 0n && value <= 0xffffffffffffffffffffffffffffffffn; + return typeof value === "number" && value >= 0 && (value | 0) === value; + }, + encode(bc, num) { + if (typeof num === "number" && !Number.isInteger(num)) + throw new Error("VarUint.encode: not an integer:" + num); + if (num < 0) + throw new Error("VarUint.encode: negative:" + num); + // console.log('DEBUG:', 'VarUint.encode', num); + if (num < 251) + Uint8.encode(bc, Number(num)); + else if (251 <= num && num < 2 ** 16) { + Uint8.encode(bc, 251); + Uint16.encode(bc, Number(num)); + } + else if (2 ** 16 <= num && num < 2 ** 32) { + Uint8.encode(bc, 252); + Uint32.encode(bc, Number(num)); + } + // TODO: Bignum for the rest of these + else if (2 ** 32 <= num && num < 2 ** 64) { + Uint8.encode(bc, 253); + Uint64.encode(bc, BigInt(num)); + } + else if (2 ** 64 <= num && num < 2 ** 128) { + Uint8.encode(bc, 254); + Uint128.encode(bc, BigInt(num)); + } + else { + throw new Error("VarUint.encode error: " + num); + } + }, + decode(bc) { + let u = BigInt(Uint8.decode(bc)); + if (u < 251) { + } + else if (u == 251n) + u = BigInt(Uint16.decode(bc)); + else if (u == 252n) + u = BigInt(Uint32.decode(bc)); + // TODO: Bignum for the rest of these + else if (u == 253n) + u = Uint64.decode(bc); + else if (u == 254n) + u = Uint128.decode(bc); + else + throw new Error("VarUint.decode error: " + u); + if (_fitsInNumber(u)) + return Number(u); + return u; + }, +}; +export const VarInt = { + name: "VarInt", + isValid(value) { + if (typeof value === "bigint") + return value >= -0xffffffffffffffffffffffffffffffffn && value <= 0xffffffffffffffffffffffffffffffffn; + return typeof value === "number" && (value | 0) === value; + }, + encode(bc, num) { + if (typeof num === "number" && (num | 0) !== num) + throw new Error("VarInt.encode: not an integer:" + num); + let bnum = BigInt(num); + bnum = _zigzag(bnum); + if (bnum < 251) + Uint8.encode(bc, Number(bnum)); + else if (251 <= bnum && bnum < 2 ** 16) { + Uint8.encode(bc, 251); + Uint16.encode(bc, Number(bnum)); + } + else if (2 ** 16 <= bnum && bnum < 2 ** 32) { + Uint8.encode(bc, 252); + Uint32.encode(bc, Number(bnum)); + } + // TODO: Bignum for the rest of these + else if (2 ** 32 <= bnum && bnum < 2 ** 64) { + Uint8.encode(bc, 253); + Uint64.encode(bc, bnum); + } + else if (2 ** 64 <= bnum && bnum < 2 ** 128) { + Uint8.encode(bc, 254); + Uint128.encode(bc, bnum); + } + else { + throw new Error("VarInt.encode error: " + bnum); + } + }, + decode(bc) { + let u = BigInt(Uint8.decode(bc)); + if (u < 251) { + } + else if (u == 251n) + u = BigInt(Uint16.decode(bc)); + else if (u == 252n) + u = BigInt(Uint32.decode(bc)); + // TODO: Bignum for the rest of these + else if (u == 253n) + u = Uint64.decode(bc); + else if (u == 254n) + u = Uint128.decode(bc); + else + throw new Error("VarInt.decode error: " + u); + u = _unzigzag(u); + if (_fitsInNumber(u)) + return Number(u); + return u; + }, +}; +export const Bool = { + name: "Bool", + isValid(value) { + return typeof value === "boolean"; + }, + encode(bc, val) { + return Uint8.encode(bc, val ? 1 : 0); + }, + decode(bc) { + const val = Uint8.decode(bc); + if (val !== 0 && val !== 1) + throw new Error("Bool decode error: " + val); + return !!val; + }, +}; +export const Bytes = { + name: "Bytes", + isValid(value) { + return value instanceof Uint8Array; + }, + encode(bc, val) { + VarUint.encode(bc, val.length); + let idx = bc._idxThenAddExtend(val.length); + new Uint8Array(bc.dataview.buffer).set(val, idx); + }, + decode(bc) { + let length = Number(VarUint.decode(bc)); + let idx = bc._idxThenAdd(length); + return new Uint8Array(bc.dataview.buffer, idx, length); + }, +}; +export const String = { + name: "String", + isValid(value) { + return typeof value === "string"; + }, + encode(bc, val) { + const bytes = new TextEncoder().encode(val); + Bytes.encode(bc, bytes); + }, + decode(bc) { + const bytes = Bytes.decode(bc); + return new TextDecoder().decode(bytes); + }, +}; +export function FixedBytes(length) { + return { + name: "FixedBytes<" + length + ">", + isValid(value) { + return value instanceof Uint8Array; + }, + encode(bc, val) { + if (val.length !== length) { + throw new Error(`Expected exactly ${length} bytes, got ${val.length}`); + } + let idx = bc._idxThenAddExtend(length); + let bytes = new Uint8Array(bc.dataview.buffer); + // console.log(`DEBUG val, idx`, val, idx); + bytes.set(val, idx); + }, + decode(bc) { + let idx = bc._idxThenAdd(length); + return new Uint8Array(bc.dataview.buffer, idx, length); + }, + }; +} +/** + * @template T + * @param {BinCodeable} inner + * @returns {BinCodeable} + */ +export function NotSignable(inner) { + return { + name: "NotSignable<" + inner.name + ">", + isValid(value) { + // TODO: Need options.signable to be passed in + return inner.isValid(value); + }, + encode(bc, value) { + // console.log(`DEBUG NotSignable<${inner.name}>`, bc, value) + if (!bc.options.signable) { + if (value === undefined) { + throw new Error("NotSignable.encode: undefined value"); + } + inner.encode(bc, value); + } + }, + decode(bc) { + if (!bc.options.signable) { + return inner.decode(bc); + } + }, + }; +} +/** + * @template T + * @param {BinCodeable} inner + */ +export function Range(inner) { + return Tuple(inner, inner); +} +export const Ipv4Addr = Struct("Ipv4Addr", { + octets: FixedBytes(4), +}); +export const SocketAddrV4 = Struct("SocketAddrV4", { + ip: Ipv4Addr, + port: Uint16, +}); +export const Ipv6Addr = Struct("Ipv6Addr", { + octets: FixedBytes(16), +}); +export const SocketAddrV6 = Struct("SocketAddrV6", { + ip: Ipv6Addr, + port: Uint16, + flowinfo: Uint32, + scope_id: Uint32, +}); +export const SocketAddr = Enum("SocketAddr", { + /** An IPv4 socket address. */ + V4: [SocketAddrV4], + /** An IPv6 socket address. */ + V6: [SocketAddrV6], +}); diff --git a/built/DashPlatform.js/src/bincode.test.d.ts b/built/DashPlatform.js/src/bincode.test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/built/DashPlatform.js/src/bincode.test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/built/DashPlatform.js/src/bincode.test.js b/built/DashPlatform.js/src/bincode.test.js new file mode 100644 index 0000000..4987c4c --- /dev/null +++ b/built/DashPlatform.js/src/bincode.test.js @@ -0,0 +1,484 @@ +import { it, expect } from "vitest"; +import { fromHex, toHex } from "./hex.js"; +import { decode, encode, Enum, Int8, String, } from "./bincode.js"; +import { BinaryData, DataContractCreateTransition, StateTransition, IdentityPublicKeyV0, KeyType, Purpose, SecurityLevel, IdentityPublicKey, OutPoint } from "../2.0.0/generated_bincode.js"; +import * as KeyUtils from "./key-utils.js"; +import { signTransitionWithRawKey } from "./sign.js"; +const Enum1 = Enum("Enum1", { + Foo: { F0: String }, + Bar: { F0: Int8 }, +}); +it("should create enums correctly", () => { + expect(Enum1.Foo).toBeDefined(); + expect(Enum1.Bar).toBeDefined(); + const x = Enum1.Foo({ F0: "hello" }); + const _xenum = x; + expect(x.F0).toBe("hello"); + expect(x).toBeInstanceOf(Enum1.Foo); + expect(x).toBeInstanceOf(Enum1); + const y = Enum1.Bar({ F0: 5 }); + expect(y.F0).toBe(5); + expect(y).toBeInstanceOf(Enum1.Bar); + expect(y).toBeInstanceOf(Enum1); + const x_bytes = encode(Enum1, x); + expect(toHex(x_bytes)).toStrictEqual("000568656c6c6f"); +}); +it("should encode/decode DataContractCreateTransitions", async () => { + /* + const data_contract_create_json = { + "dataContract": { + "$format_version": "1", + "id": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], + "config": { + "$format_version": "0", + "canBeDeleted": true, + "readonly": false, + "keepsHistory": true, + "documentsKeepHistoryContractDefault": false, + "documentsMutableContractDefault": false, + "documentsCanBeDeletedContractDefault": false, + "requiresIdentityEncryptionBoundedKey": null, + "requiresIdentityDecryptionBoundedKey": null + }, "version": 2, + "ownerId": [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], + "schemaDefs": {}, + "documentSchemas": { + "asdf": { "foo": 34 } + }, + "createdAt": 100000, + "updatedAt": 100001, + "createdAtBlockHeight": 100002, + "updatedAtBlockHeight": 100003, + "createdAtEpoch": 10004, + "updatedAtEpoch": 10005, + "groups": { + "12": { + "V0": { + "members": { + "21nS9Wz9sUTQ6MkcYUtnN8aSfPA26xJJP7zqshfzCzqc": 1 + }, + "required_power": 1 + } + } + }, + "tokens": { + "0": { + "$format_version": "0", + "conventions": { + "$format_version": "0", + "localizations": { + "US": { + "$format_version": "0", + "shouldCapitalize": true, + "singularForm": "x", + "pluralForm": "xs" + } + }, "decimals": 2 + }, + "conventionsChangeRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "baseSupply": 12345678901234567890n, + "maxSupply": 18446744073709551615n, + "keepsHistory": { + "$format_version": "0", + "keepsTransferHistory": false, + "keepsFreezingHistory": false, + "keepsMintingHistory": true, + "keepsBurningHistory": true + }, + "startAsPaused": false, + "maxSupplyChangeRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "distributionRules": { + "$format_version": "0", + "perpetualDistribution": { + "$format_version": "0", + "distributionType": { + "EpochBasedDistribution": { + "interval": 16, + "function": { + "InvertedLogarithmic": { "a": 1, "d": 2, "m": 3, "n": 4, "o": 5, "start_moment": 1235678, "b": 0, "min_value": null, "max_value": 112233445566 } + } + } + }, + "distributionRecipient": "EvonodesByParticipation" + }, + "perpetualDistributionRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, "self_changing_admin_action_takers_allowed": true + } + }, + "preProgrammedDistribution": { "$format_version": "0", "distributions": {} }, + "newTokensDestinationIdentity": [18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18], + "newTokensDestinationIdentityRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "mintingAllowChoosingDestination": true, + "mintingAllowChoosingDestinationRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + } + }, + "manualMintingRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "manualBurningRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "freezeRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "unfreezeRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, "destroyFrozenFundsRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "emergencyActionRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "mainControlGroup": 2, + "mainControlGroupCanBeModified": "NoOne" + } + } + }, + "identityNonce": 83838, + "userFeeIncrease": 15, + "signaturePublicKeyId": 1, + "signature": [42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42], + "$version": 0 + } + */ + // From Rust + const data_contract_create_bytes = fromHex("000101010101010101010101010101010101010101010101010101010101010101010001000100000000000205050505050505050505050505050505050505050505050505050505050505050100010461736466160312047479706512066f626a656374120a70726f70657274696573160112047465737416021204747970651206737472696e671208706f736974696f6e040012146164646974696f6e616c50726f70657274696573130001fc000186a001fc000186a101fc000186a201fc000186a301fb271401fb2715010c00010f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f010101000000010255530001017802787302000301000001fdab54a98ceb1f0ad201fdffffffffffffffff000000010100000301000001000100021008020203040a01fc0012dade000001fd0000001a21a278be0200030100000101000001121212121212121212121212121212121212121212121212121212121212121200030100000101000301000001000301000001000301000001000301000001000301000001000301000001000301000001010200fc0001477e0001202a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a"); + const data_contract_create_signable_bytes = fromHex("000101010101010101010101010101010101010101010101010101010101010101010001000100000000000205050505050505050505050505050505050505050505050505050505050505050100010461736466160312047479706512066f626a656374120a70726f70657274696573160112047465737416021204747970651206737472696e671208706f736974696f6e040012146164646974696f6e616c50726f70657274696573130001fc000186a001fc000186a101fc000186a201fc000186a301fb271401fb2715010c00010f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f010101000000010255530001017802787302000301000001fdab54a98ceb1f0ad201fdffffffffffffffff000000010100000301000001000100021008020203040a01fc0012dade000001fd0000001a21a278be0200030100000101000001121212121212121212121212121212121212121212121212121212121212121200030100000101000301000001000301000001000301000001000301000001000301000001000301000001000301000001010200fc0001477e00"); + // test that decode then encode returns the same bytes + const data_contract_create = decode(DataContractCreateTransition, data_contract_create_bytes.buffer); + const data_contract_create_bytes2 = encode(DataContractCreateTransition, data_contract_create); + expect(toHex(data_contract_create_bytes2)).toStrictEqual(toHex(data_contract_create_bytes)); + const data_contract_create_signable_bytes2 = encode(DataContractCreateTransition, data_contract_create, { signable: true }); + expect(toHex(data_contract_create_signable_bytes2)).toStrictEqual(toHex(data_contract_create_signable_bytes)); + // Now sign it + const private_key = fromHex("6c554775029f960891e3edf2d36b26a30d9a4b10034bb49f3a6c4617f557f7bc"); + const publicKey = await KeyUtils.toPublicKey(private_key); + console.log('publicKey', toHex(publicKey)); + const identityPubKey = IdentityPublicKey.V0(IdentityPublicKeyV0({ + id: 0, + purpose: Purpose.AUTHENTICATION(), + security_level: SecurityLevel.CRITICAL(), + key_type: KeyType.ECDSA_SECP256K1(), + read_only: true, + data: BinaryData(publicKey), + })); + const state_transition_signed = StateTransition.DataContractCreate(data_contract_create); + await signTransitionWithRawKey(state_transition_signed, identityPubKey, private_key); + // We have to check the "signable" bytes AFTER signing because signing also sets the contract_id and other mutations + // that alter the signable bytes. + const state_transition_signable_bytes = fromHex("000001fc399a05bcf7e416f4e57fd9870da2539b333e390ed76c0b0a16c017c11660790001000100000000000205050505050505050505050505050505050505050505050505050505050505050100010461736466160312047479706512066f626a656374120a70726f70657274696573160112047465737416021204747970651206737472696e671208706f736974696f6e040012146164646974696f6e616c50726f70657274696573130001fc000186a001fc000186a101fc000186a201fc000186a301fb271401fb2715010c00010f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f010101000000010255530001017802787302000301000001fdab54a98ceb1f0ad201fdffffffffffffffff000000010100000301000001000100021008020203040a01fc0012dade000001fd0000001a21a278be0200030100000101000001121212121212121212121212121212121212121212121212121212121212121200030100000101000301000001000301000001000301000001000301000001000301000001000301000001000301000001010200fc0001477e00"); + const state_transition_signable_bytes2 = encode(StateTransition, state_transition_signed, { signable: true }); + expect(toHex(state_transition_signable_bytes2)).toStrictEqual(toHex(state_transition_signable_bytes)); + const state_transition_signed_bytes = fromHex("000001fc399a05bcf7e416f4e57fd9870da2539b333e390ed76c0b0a16c017c11660790001000100000000000205050505050505050505050505050505050505050505050505050505050505050100010461736466160312047479706512066f626a656374120a70726f70657274696573160112047465737416021204747970651206737472696e671208706f736974696f6e040012146164646974696f6e616c50726f70657274696573130001fc000186a001fc000186a101fc000186a201fc000186a301fb271401fb2715010c00010f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f010101000000010255530001017802787302000301000001fdab54a98ceb1f0ad201fdffffffffffffffff000000010100000301000001000100021008020203040a01fc0012dade000001fd0000001a21a278be0200030100000101000001121212121212121212121212121212121212121212121212121212121212121200030100000101000301000001000301000001000301000001000301000001000301000001000301000001000301000001010200fc0001477e0000411f3b6ee69cca6e9c7dda79e5a571b7bc9de307c5e27754c652ec62b22f7e6ff91966bd5e5db151484f1c81d766053154ed1a2f58a07303edf9f9a8cffe41891506"); + const state_transition_signed_bytes2 = encode(StateTransition, state_transition_signed); + expect(toHex(state_transition_signed_bytes2)).toStrictEqual(toHex(state_transition_signed_bytes)); +}); +it("should encode/decode IdentityPublicKey", () => { + const master_key_bytes = fromHex("0000000000000021033a9a8b1e4c581a1987724c6697135d31c07ee7ac827e6a59cec022b04d51055f00"); + const master_key = decode(IdentityPublicKey, master_key_bytes.buffer); + // const master_key_json = { + // $version: "0", + // id: 0, + // purpose: 0, + // securityLevel: 0, + // contractBounds: null, + // type: 0, + // readOnly: false, + // data: [ + // 3, 58, 154, 139, 30, 76, 88, 26, 25, 135, 114, 76, 102, 151, 19, 93, 49, + // 192, 126, 231, 172, 130, 126, 106, 89, 206, 192, 34, 176, 77, 81, 5, 95, + // ], + // disabledAt: null, + // }; + // expect(master_key_json).toEqual(JSON.parse(toJsonCamelCase(master_key))); + console.log('master_key data (public_key)', (master_key[0].data[0].buffer)); + expect(master_key_bytes).toStrictEqual(new Uint8Array(encode(IdentityPublicKey, master_key))); + const master_private_key = fromHex("6c554775029f960891e3edf2d36b26a30d9a4b10034bb49f3a6c4617f557f7bc"); + const other_key_bytes = fromHex("000100010000002102014603018dc437642dda16f4c7fc50e482dd23e24680bcb3a5966c3b343848e200"); + const other_key = decode(IdentityPublicKey, other_key_bytes.buffer); + // const other_key_json = { + // $version: "0", + // id: 1, + // purpose: 0, + // securityLevel: 1, + // contractBounds: null, + // type: 0, + // readOnly: false, + // data: [ + // 2, 1, 70, 3, 1, 141, 196, 55, 100, 45, 218, 22, 244, 199, 252, 80, 228, + // 130, 221, 35, 226, 70, 128, 188, 179, 165, 150, 108, 59, 52, 56, 72, 226, + // ], + // disabledAt: null, + // }; + // expect(other_key_json).toEqual(JSON.parse(toJsonCamelCase(other_key))); + const other_private_key = fromHex("426ae4838204206cacdfc7a2e04ac6a2d9e3c2e94df935878581c552f22b0096"); +}); +it("should encode/decode OutPoint", () => { + // WARNING: There are many encodings of OutPoint, this one is the bincode::serde::encode_to_vec + // representation which uses length-prefixed txid and varuint encoding for vout (same as used in IdentityCreateTransitionV0) + const op_hex = '200102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20fb3039'; + const op = decode(OutPoint, fromHex(op_hex).buffer); + const op_bytes = encode(OutPoint, op); + expect(toHex(op_bytes)).toStrictEqual(op_hex); +}); +it("should encode/decode IdentityCreateTransition", () => { + const ic_chain_hex = '03000001fc0012d687200102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20fb303942001212121212121212121212121212121212121212121212121212121212121212'; + const ic_instant_hex = '03000000a200000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2012121212121212121212121212121212121212121212121212121212121212124848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848480c0200000000010000000000000042001212121212121212121212121212121212121212121212121212121212121212'; + const ic_chain = decode(StateTransition, fromHex(ic_chain_hex).buffer); + const ic_chain_bytes = encode(StateTransition, ic_chain); + expect(toHex(ic_chain_bytes)).toStrictEqual(ic_chain_hex); + const ic_instant = decode(StateTransition, fromHex(ic_instant_hex).buffer); + const ic_instant_bytes = encode(StateTransition, ic_instant); + expect(toHex(ic_instant_bytes)).toStrictEqual(ic_instant_hex); +}); +// it("should encode/decode Identifier", () => { +// const identifier_bytes = fromHex( +// "3dc908599ef8a5a3c510c430a27d4211c805556d99e5c06ffc3ca86a5feb55c3", +// ); +// const identifier = decode(Identifier, identifier_bytes.buffer); +// // expect(master_key_json).toEqual(JSON.parse(toJsonCamelCase(master_key))) +// expect(identifier_bytes).toEqual( +// new Uint8Array(encode(Identifier, identifier)), +// ); +// }); +// it("should encode/decode StateTransition", () => { +// // const key_signable_bytes = fromHex('0300020000000000000021033a9a8b1e4c581a1987724c6697135d31c07ee7ac827e6a59cec022b04d51055f000100000100002102014603018dc437642dda16f4c7fc50e482dd23e24680bcb3a5966c3b343848e200c601011dbbda5861b12d7523f20aa5e0d42f52de3dcd2d5c2fe919ba67b59f050d206e0000000058c444dd0957767db2c0adea69fd861792bfa75c7e364d83fe85bebebc2a08b436a56617591a6a89237bada6af1f9b46eba47b5d89a8c4e49ff2d0236182307c8967c46529a967b3822e1ba8a173066296d02593f0f59b3a78a30a7eef9c8a120847729e62e4a32954339286b79fe7590221331cd28d576887a263f45b595d499272f656c3f5176987c976239cac16f972d796ad82931d532102a4f95eec7d809e00000800015884e5db9de218238671572340b207ee85b628074e7e467096c267266baf77a4000000001976a91488d9931ea73d60eaf7e5671efc0552b912911f2a88ac000000000200e1f50500000000026a0088130000000000001976a91488d9931ea73d60eaf7e5671efc0552b912911f2a88ac0000000024000100e1f505000000001976a914271c99481ce1460e4fd62d5a11eecc123d78ee3288ac0000') +// const asset_lock_private_key = fromHex( +// "33a9f0603ba69b97dff83e08b4ee36cebbc987739e9749615e1727754f2bf2d2", +// ); +// const state_transition_signable_bytes = fromHex( +// "0300020000000000000021033a9a8b1e4c581a1987724c6697135d31c07ee7ac827e6a59cec022b04d51055f000100000100002102014603018dc437642dda16f4c7fc50e482dd23e24680bcb3a5966c3b343848e200c601011dbbda5861b12d7523f20aa5e0d42f52de3dcd2d5c2fe919ba67b59f050d206e0000000058c444dd0957767db2c0adea69fd861792bfa75c7e364d83fe85bebebc2a08b436a56617591a6a89237bada6af1f9b46eba47b5d89a8c4e49ff2d0236182307c8967c46529a967b3822e1ba8a173066296d02593f0f59b3a78a30a7eef9c8a120847729e62e4a32954339286b79fe7590221331cd28d576887a263f45b595d499272f656c3f5176987c976239cac16f972d796ad82931d532102a4f95eec7d809e00000800015884e5db9de218238671572340b207ee85b628074e7e467096c267266baf77a4000000001976a91488d9931ea73d60eaf7e5671efc0552b912911f2a88ac000000000200e1f50500000000026a0088130000000000001976a91488d9931ea73d60eaf7e5671efc0552b912911f2a88ac0000000024000100e1f505000000001976a914271c99481ce1460e4fd62d5a11eecc123d78ee3288ac0000", +// ); +// const state_transition_signable = decode( +// StateTransition, +// state_transition_signable_bytes.buffer, +// { signable: true }, +// ); +// expect(state_transition_signable_bytes).toEqual( +// new Uint8Array( +// encode(StateTransition, state_transition_signable, { signable: true }), +// ), +// ); +// // asset_lock_proof +// // +// // ```json +// // asset_lock_proof {"instantLock":[1,1,29,187,218,88,97,177,45,117,35,242,10,165,224,212,47,82,222,61,205,45,92,47,233,25,186,103,181,159,5,13,32,110,0,0,0,0,88,196,68,221,9,87,118,125,178,192,173,234,105,253,134,23,146,191,167,92,126,54,77,131,254,133,190,190,188,42,8,180,54,165,102,23,89,26,106,137,35,123,173,166,175,31,155,70,235,164,123,93,137,168,196,228,159,242,208,35,97,130,48,124,137,103,196,101,41,169,103,179,130,46,27,168,161,115,6,98,150,208,37,147,240,245,155,58,120,163,10,126,239,156,138,18,8,71,114,158,98,228,163,41,84,51,146,134,183,159,231,89,2,33,51,28,210,141,87,104,135,162,99,244,91,89,93,73,146,114,246,86,195,245,23,105,135,201,118,35,156,172,22,249,114,215,150,173,130,147,29,83,33,2,164,249,94,236,125,128],"transaction":[0,0,8,0,1,88,132,229,219,157,226,24,35,134,113,87,35,64,178,7,238,133,182,40,7,78,126,70,112,150,194,103,38,107,175,119,164,0,0,0,0,25,118,169,20,136,217,147,30,167,61,96,234,247,229,103,30,252,5,82,185,18,145,31,42,136,172,0,0,0,0,2,0,225,245,5,0,0,0,0,2,106,0,136,19,0,0,0,0,0,0,25,118,169,20,136,217,147,30,167,61,96,234,247,229,103,30,252,5,82,185,18,145,31,42,136,172,0,0,0,0,36,0,1,0,225,245,5,0,0,0,0,25,118,169,20,39,28,153,72,28,225,70,14,79,214,45,90,17,238,204,18,61,120,238,50,136,172],"outputIndex":0} +// // ``` +// // +// const state_transition_bytes = fromHex( +// "0300020000000000000021033a9a8b1e4c581a1987724c6697135d31c07ee7ac827e6a59cec022b04d51055f411f6ca4070bc91c2e21f785113a4669fa32bdf24f9e0e67966b5186254265b5d2fd52ef7a9ca7e6ed03ef9838c56bbeb32bf0722f11a95982bfa14a61f56d7c523e000100000100002102014603018dc437642dda16f4c7fc50e482dd23e24680bcb3a5966c3b343848e2411f6776128925163122c68e4ad230cf59c5a8444e518d6a5592d242e9f48e85498e371b78520812536a57ef4400a5e7a43307283c5da62ba343d8f23574c15a2db700c601011dbbda5861b12d7523f20aa5e0d42f52de3dcd2d5c2fe919ba67b59f050d206e0000000058c444dd0957767db2c0adea69fd861792bfa75c7e364d83fe85bebebc2a08b436a56617591a6a89237bada6af1f9b46eba47b5d89a8c4e49ff2d0236182307c8967c46529a967b3822e1ba8a173066296d02593f0f59b3a78a30a7eef9c8a120847729e62e4a32954339286b79fe7590221331cd28d576887a263f45b595d499272f656c3f5176987c976239cac16f972d796ad82931d532102a4f95eec7d809e00000800015884e5db9de218238671572340b207ee85b628074e7e467096c267266baf77a4000000001976a91488d9931ea73d60eaf7e5671efc0552b912911f2a88ac000000000200e1f50500000000026a0088130000000000001976a91488d9931ea73d60eaf7e5671efc0552b912911f2a88ac0000000024000100e1f505000000001976a914271c99481ce1460e4fd62d5a11eecc123d78ee3288ac0000411fea1c5e3b0c92c8d02fd52c47fe5f215a828d05c317a997a4a3419a17b9260b9717ccee2603bf5ae411bba1ab8e1d0bbc31cbd73d7d6fefcdb4feb34657b2e5093dc908599ef8a5a3c510c430a27d4211c805556d99e5c06ffc3ca86a5feb55c3", +// ); +// const state_transition = decode( +// StateTransition, +// state_transition_bytes.buffer, +// { signable: false }, +// ); +// console.log(state_transition); +// expect(state_transition_bytes).toEqual( +// new Uint8Array( +// encode(StateTransition, state_transition, { signable: false }), +// ), +// ); +// /* +// IdentityCreate(V0(IdentityCreateTransitionV0 { +// public_keys: [ +// V0(IdentityPublicKeyInCreationV0 { +// id: 0, +// key_type: ECDSA_SECP256K1, +// purpose: AUTHENTICATION, +// security_level: MASTER, +// contract_bounds: None, +// read_only: false, +// data: BinaryData(0x033a9a8b1e4c581a1987724c6697135d31c07ee7ac827e6a59cec022b04d51055f), +// signature: BinaryData(0x1f6ca4070bc91c2e21f785113a4669fa32bdf24f9e0e67966b5186254265b5d2fd52ef7a9ca7e6ed03ef9838c56bbeb32bf0722f11a95982bfa14a61f56d7c523e) +// }), +// V0(IdentityPublicKeyInCreationV0 { +// id: 1, +// key_type: ECDSA_SECP256K1, +// purpose: AUTHENTICATION, +// security_level: CRITICAL, +// contract_bounds: None, +// read_only: false, +// data: BinaryData(0x02014603018dc437642dda16f4c7fc50e482dd23e24680bcb3a5966c3b343848e2), +// signature: BinaryData(0x1f6776128925163122c68e4ad230cf59c5a8444e518d6a5592d242e9f48e85498e371b78520812536a57ef4400a5e7a43307283c5da62ba343d8f23574c15a2db7) +// }) +// ], +// asset_lock_proof: Instant(InstantAssetLockProof { +// instant_lock: InstantLock { +// version: 1, +// inputs: [ +// OutPoint { +// txid: 0x6e200d059fb567ba19e92f5c2dcd3dde522fd4e0a50af223752db16158dabb1d, +// vout: 0 +// } +// ], +// txid: b4082abcbebe85fe834d367e5ca7bf921786fd69eaadc0b27d765709dd44c458, +// cyclehash: 0x7c30826123d0f29fe4c4a8895d7ba4eb469b1fafa6ad7b23896a1a591766a536, +// signature: [137, 103, 196, 101, 41, 169, 103, 179, 130, 46, 27, 168, 161, 115, 6, 98, 150, 208, +// 37, 147, 240, 245, 155, 58, 120, 163, 10, 126, 239, 156, 138, 18, 8, 71, 114, 158, 98, 228, 163, +// 41, 84, 51, 146, 134, 183, 159, 231, 89, 2, 33, 51, 28, 210, 141, 87, 104, 135, 162, 99, 244, 91, +// 89, 93, 73, 146, 114, 246, 86, 195, 245, 23, 105, 135, 201, 118, 35, 156, 172, 22, 249, 114, 215, +// 150, 173, 130, 147, 29, 83, 33, 2, 164, 249, 94, 236, 125, 128] +// }, +// transaction: Transaction { +// version: 0, +// lock_time: 0, +// input: [ +// TxIn { +// previous_output: OutPoint { +// txid: 0xa477af6b2667c29670467e4e0728b685ee07b240235771862318e29ddbe58458, +// vout: 0 +// }, +// script_sig: Script(OP_DUP OP_HASH160 OP_PUSHBYTES_20 88d9931ea73d60eaf7e5671efc0552b912911f2a OP_EQUALVERIFY OP_CHECKSIG), +// sequence: 0, +// witness: Witness { content: [], witness_elements: 0, indices_start: 0 } +// } +// ], +// output: [ +// TxOut { +// value: 100000000, +// script_pubkey: Script(OP_RETURN OP_0) +// }, +// TxOut { +// value: 5000, +// script_pubkey: Script(OP_DUP OP_HASH160 OP_PUSHBYTES_20 88d9931ea73d60eaf7e5671efc0552b912911f2a OP_EQUALVERIFY OP_CHECKSIG) +// } +// ], +// special_transaction_payload: Some(AssetLockPayloadType(AssetLockPayload { +// version: 0, +// credit_outputs: [ +// TxOut { +// value: 100000000, +// script_pubkey: Script(OP_DUP OP_HASH160 OP_PUSHBYTES_20 271c99481ce1460e4fd62d5a11eecc123d78ee32 OP_EQUALVERIFY OP_CHECKSIG) +// } +// ] +// })) +// }, +// output_index: 0 +// }), +// user_fee_increase: 0, +// signature: BinaryData(0x), +// identity_id: Identifier(IdentifierBytes32([61, 201, 8, 89, 158, 248, 165, 163, 197, 16, 196, 48, 162, 125, 66, 17, 200, 5, 85, 109, 153, 229, 192, 111, 252, 60, 168, 106, 95, 235, 85, 195])) +// })) +// */ +// }); +// it('should encode/decode Identity', () => { +// const identity_json = { +// "$version": "0", +// "id": [61, 201, 8, 89, 158, 248, 165, 163, 197, 16, 196, 48, 162, 125, 66, 17, 200, 5, 85, 109, 153, 229, 192, 111, 252, 60, 168, 106, 95, 235, 85, 195], +// "publicKeys": [ +// { +// "$version": "0", +// "id": 0, +// "purpose": 0, +// "securityLevel": 0, +// "contractBounds": null, +// "type": 0, +// "readOnly": false, +// "data": [3, 58, 154, 139, 30, 76, 88, 26, 25, 135, 114, 76, 102, 151, 19, 93, 49, 192, 126, 231, 172, 130, 126, 106, 89, 206, 192, 34, 176, 77, 81, 5, 95], +// "disabledAt": null +// }, { +// "$version": "0", +// "id": 1, +// "purpose": 0, +// "securityLevel": 1, +// "contractBounds": null, +// "type": 0, +// "readOnly": false, +// "data": [2, 1, 70, 3, 1, 141, 196, 55, 100, 45, 218, 22, 244, 199, 252, 80, 228, 130, 221, 35, 226, 70, 128, 188, 179, 165, 150, 108, 59, 52, 56, 72, 226], +// "disabledAt": null +// } +// ], +// "balance": 1000000000, +// "revision": 0 +// } +// // +// // ``` +// // identity V0(IdentityV0 { id: Identifier(IdentifierBytes32([61, 201, 8, 89, 158, 248, 165, 163, 197, 16, 196, 48, 162, 125, 66, 17, 200, 5, 85, 109, 153, 229, 192, 111, 252, 60, 168, 106, 95, 235, 85, 195])), public_keys: {0: V0(IdentityPublicKeyV0 { id: 0, purpose: AUTHENTICATION, security_level: MASTER, contract_bounds: None, key_type: ECDSA_SECP256K1, read_only: false, data: BinaryData(0x033a9a8b1e4c581a1987724c6697135d31c07ee7ac827e6a59cec022b04d51055f), disabled_at: None }), 1: V0(IdentityPublicKeyV0 { id: 1, purpose: AUTHENTICATION, security_level: CRITICAL, contract_bounds: None, key_type: ECDSA_SECP256K1, read_only: false, data: BinaryData(0x02014603018dc437642dda16f4c7fc50e482dd23e24680bcb3a5966c3b343848e2), disabled_at: None })}, balance: 1000000000, revision: 0 }) +// // ``` +// // +// // ``` +// // identity_create_transition +// // .public_keys +// // .iter_mut() +// // .zip(identity.public_keys().iter()) +// // .try_for_each(|(public_key_with_witness, (_, public_key))| { +// // if public_key.key_type().is_unique_key_type() { +// // let signature = signer.sign(public_key, &key_signable_bytes)?; +// // public_key_with_witness.set_signature(signature); +// // } +// // Ok::<(), ProtocolError>(()) +// // })?; +// // ``` +// }) diff --git a/built/DashPlatform.js/src/bincode_types.d.ts b/built/DashPlatform.js/src/bincode_types.d.ts new file mode 100644 index 0000000..3ef3b4d --- /dev/null +++ b/built/DashPlatform.js/src/bincode_types.d.ts @@ -0,0 +1,21 @@ +import * as Bincode from './bincode.ts'; +export type Option = T | null | undefined; +/** + * FixedBytes is essentially a Uint8Array but when encoded it throws an error + * if the length doesn't match, and is not length prefixed. + * Equivalent to `[u8; N]` in Rust. + */ +export type FixedBytes = Uint8Array; +export type Hash = Uint8Array; +export type SocketAddr = typeof Bincode.SocketAddr extends Bincode.BinCodeable ? T : never; +export declare const EncodeOnlyRawBytes: ((data: Uint8Array) => Uint8Array) & { + isValid(x: unknown): x is Uint8Array; + encode(bc: Bincode.BinCode, x: Uint8Array): void; + decode(bc: Bincode.BinCode): never; +}; +export declare const Transaction: ((data: Uint8Array) => Uint8Array) & { + isValid(x: unknown): x is Uint8Array; + encode(bc: Bincode.BinCode, x: Uint8Array): void; + decode(bc: Bincode.BinCode): never; +}; +export type Transaction = Uint8Array; diff --git a/built/DashPlatform.js/src/bincode_types.js b/built/DashPlatform.js/src/bincode_types.js new file mode 100644 index 0000000..7b44538 --- /dev/null +++ b/built/DashPlatform.js/src/bincode_types.js @@ -0,0 +1,15 @@ +export const EncodeOnlyRawBytes = Object.assign(function EncodeOnlyRawBytes(data) { + return data; +}, { + // name: 'EncodeOnlyRawBytes', + isValid(x) { + return x instanceof Uint8Array; + }, + encode(bc, x) { + new Uint8Array(bc.dataview.buffer).set(x, bc._idxThenAddExtend(x.byteLength)); + }, + decode(bc) { + throw new Error("Unable to decode an EncodeOnlyRawBytes (how many bytes to decode?)"); + } +}); +export const Transaction = EncodeOnlyRawBytes; diff --git a/built/DashPlatform.js/src/cli.d.ts b/built/DashPlatform.js/src/cli.d.ts new file mode 100644 index 0000000..f05fbf0 --- /dev/null +++ b/built/DashPlatform.js/src/cli.d.ts @@ -0,0 +1,15 @@ +export function loadWallet(): Promise; +/** + * @param {String} fundingAddress + * @param {Number} needSats + */ +export function promptQr(fundingAddress: string, needSats: number): void; +/** + * Reads a hex file as text, stripping comments (anything including and after a non-hex character), removing whitespace, and joining as a single string + * @param {String} path + */ +export function readHex(path: string): Promise; +/** + * @param {String} path + */ +export function readWif(path: string): Promise; diff --git a/built/DashPlatform.js/src/cli.js b/built/DashPlatform.js/src/cli.js new file mode 100644 index 0000000..8b72db9 --- /dev/null +++ b/built/DashPlatform.js/src/cli.js @@ -0,0 +1,82 @@ +import Dotenv from "dotenv"; +import DashPhrase from "dashphrase"; +import DashHd from "dashhd"; +import * as QRCode from "./_qr.js"; +import * as DashTx from "dashtx"; +import Fs from "node:fs/promises"; +Dotenv.config({ path: ".env" }); +export async function loadWallet() { + let coinType = 5; + let testnet = true; // TODO + if (testnet) { + coinType = 1; + } + // void (await WasmDpp.default()); + let walletPhrase = process.env.DASH_WALLET_PHRASE; + let walletSalt = process.env.DASH_WALLET_SALT ?? ""; + if (!walletPhrase) { + console.error(""); + console.error("ERROR"); + console.error(" 'DASH_WALLET_PHRASE' is not set"); + console.error(""); + console.error("SOLUTION"); + let newPhrase = await DashPhrase.generate(); + console.error(` echo 'DASH_WALLET_PHRASE="${newPhrase}"' >> .env`); + console.error(` echo 'DASH_WALLET_SALT=""' >> .env`); + console.error(""); + process.exit(1); + } + let seed = await DashPhrase.toSeed(walletPhrase, walletSalt); + let walletKey = await DashHd.fromSeed(seed); + return walletKey; +} +/** + * @param {String} fundingAddress + * @param {Number} needSats + */ +export function promptQr(fundingAddress, needSats) { + let dashAmount = DashTx.toDash(needSats); + let content = `dash:${fundingAddress}?amount=${dashAmount}`; + let ascii = QRCode.ascii(content, { + indent: 3, + padding: 4, + width: 256, + height: 256, + color: "#000000", + background: "#ffffff", + ecl: "M", + }); + console.error(); + console.error(`ERROR`); + console.error(` not enough DASH at funding address (including instant send)`); + console.error(); + console.error(`SOLUTION`); + console.error(` send ${dashAmount} to ${fundingAddress}`); + console.error(``); + console.error(ascii); + console.error(); +} +/** + * Reads a hex file as text, stripping comments (anything including and after a non-hex character), removing whitespace, and joining as a single string + * @param {String} path + */ +export async function readHex(path) { + let text = await Fs.readFile(path, "utf8"); + let lines = text.split("\n"); + let hexes = []; + for (let line of lines) { + line = line.replace(/\s/g, ""); + line = line.replace(/[^0-9a-f].*/i, ""); + hexes.push(line); + } + let hex = hexes.join(""); + return hex; +} +/** + * @param {String} path + */ +export async function readWif(path) { + let wif = await Fs.readFile(path, "utf8"); + wif = wif.trim(); + return wif; +} diff --git a/built/DashPlatform.js/src/constants.d.ts b/built/DashPlatform.js/src/constants.d.ts new file mode 100644 index 0000000..e2af848 --- /dev/null +++ b/built/DashPlatform.js/src/constants.d.ts @@ -0,0 +1,12 @@ +export const RPC_AUTH_URL: "https://api:null@trpc.digitalcash.dev"; +export const ZMQ_AUTH_URL: string; +export const L1_VERSION_PLATFORM: 3; +export const TYPE_ASSET_LOCK: 8; +export const VERSION_ASSET_LOCK: 1; +export const VERSIONS_TESTNET: string[]; +export const KEY_TYPES: { + 0: string; + ECDSA_SECP256K1: number; +}; +export const NETWORK: "testnet"; +export const COIN_TYPE: 1 | 5; diff --git a/built/DashPlatform.js/src/constants.js b/built/DashPlatform.js/src/constants.js new file mode 100644 index 0000000..a8de496 --- /dev/null +++ b/built/DashPlatform.js/src/constants.js @@ -0,0 +1,25 @@ +export const RPC_AUTH_URL = "https://api:null@trpc.digitalcash.dev"; +const zmqUuid = crypto.randomUUID(); +export const ZMQ_AUTH_URL = `https://tzmq.digitalcash.dev/api/zmq/eventsource/${zmqUuid}`; +export const L1_VERSION_PLATFORM = 3; +// const L1_VERSION_PLATFORM = 0; +export const TYPE_ASSET_LOCK = 8; +export const VERSION_ASSET_LOCK = 1; +// const L2_VERSION_PLATFORM = 1; // actually constant "0" ?? +// const ST_CREATE_IDENTITY = 2; +export const VERSIONS_TESTNET = ["8c", "ef"]; +export const KEY_TYPES = { + 0: "ECDSA_SECP256K1", + ECDSA_SECP256K1: 0, +}; +export const NETWORK = "testnet"; +export const COIN_TYPE = NETWORK == "testnet" ? 1 : 5; +// const IDENTITY_ECDSA_PATH = (() => { +// // m/purpose'/coin_type'/feature'/subfeature'/keytype'/identityindex'/keyindex' +// // ex: m/9'/5'/5'/0'/0'// +// const PURPOSE_DIP13 = 9; +// const FEATURE_ID = 5; +// const SUBFEATURE_KEY = 0; +// const KEY_TYPE = KEY_TYPES.ECDSA_SECP256K1; +// return `m/${PURPOSE_DIP13}'/${COIN_TYPE}'/${FEATURE_ID}'/${SUBFEATURE_KEY}'/${KEY_TYPE}'`; +// })(); diff --git a/built/DashPlatform.js/src/dash_bincode.d.ts b/built/DashPlatform.js/src/dash_bincode.d.ts new file mode 100644 index 0000000..0b64392 --- /dev/null +++ b/built/DashPlatform.js/src/dash_bincode.d.ts @@ -0,0 +1,4 @@ +/** + * @param {any} value + */ +export function toJsonCamelCase(value: any): string; diff --git a/built/DashPlatform.js/src/dash_bincode.js b/built/DashPlatform.js/src/dash_bincode.js new file mode 100644 index 0000000..eb54006 --- /dev/null +++ b/built/DashPlatform.js/src/dash_bincode.js @@ -0,0 +1,184 @@ +import { Bool, Bytes, Enum, FixedBytes, Lazy, Struct, Uint16, Uint32, Uint64, Uint8, VarUint, Vec, Option, String, NotSignable } from "./src/bincode"; +/** @import {BinCodeable} from './src/bincode' */ +// export const IdentityCreateTransitionV0 = Lazy(() => +// Struct("IdentityCreateTransitionV0", { +// // $version: Constant("0"), +// // // When signing, we don't sign the signatures for keys +// // #[platform_signable(into = "Vec")] +// public_keys: Vec(IdentityPublicKeyInCreation), +// asset_lock_proof: RawAssetLockProof, +// user_fee_increase: UserFeeIncrease, +// // #[platform_signable(exclude_from_sig_hash)] +// signature: NotSignable(BinaryData), +// // #[cfg_attr(feature = "state-transition-serde-conversion", serde(skip))] +// // #[platform_signable(exclude_from_sig_hash)] +// identity_id: NotSignable(Identifier), +// }) +// ) +// export const IdentityCreateTransition = Enum("IdentityCreateTransition", { +// 0: IdentityCreateTransitionV0, +// }) +// export const KeyID = VarUint +// export const Identifier = FixedBytes(32) +// export const BinaryData = Bytes +// export const UserFeeIncrease = VarUint //Uint16; +// export const TimestampMillis = VarUint //Uint64; +// export const KeyType = VarUint // enum +// export const KeyType_values = [ +// "ECDSA_SECP256K1", +// "BLS12_381", +// "ECDSA_HASH160", +// "BIP13_SCRIPT_HASH", +// "EDDSA_25519_HASH160", +// ] +// export const Purpose = VarUint // enum +// export const Purpose_values = [ +// "AUTHENTICATION", +// "ENCRYPTION", +// "DECRYPTION", +// "TRANSFER", +// "SYSTEM", +// "VOTING", +// ] +// export const SecurityLevel = VarUint // enum +// export const SecurityLevel_values = ["MASTER", "CRITICAL", "HIGH", "MEDIUM"] +// export const ContractBounds0 = Struct("ContractBounds0", { +// id: Identifier, +// }) +// export const ContractBounds1 = Struct("ContractBounds1", { +// id: Identifier, +// document_type_name: String, +// }) +// export const ContractBounds = Enum("ContractBounds", { +// 0: ContractBounds0, +// 1: ContractBounds1, +// }) +// export const IdentityPublicKeyInCreationV0 = Struct("IdentityPublicKeyInCreationV0", { +// id: KeyID, +// type: KeyType, +// purpose: Purpose, +// security_level: SecurityLevel, +// contract_bounds: Option(ContractBounds), +// read_only: Bool, +// data: BinaryData, +// // /// The signature is needed for ECDSA_SECP256K1 Key type and BLS12_381 Key type +// // #[platform_signable(exclude_from_sig_hash)] +// signature: NotSignable(BinaryData), +// }) +// export const IdentityPublicKeyInCreation = Enum("IdentityPublicKeyInCreation", { +// 0: IdentityPublicKeyInCreationV0, +// }) +// export const Txid = FixedBytes(32) +// export const CycleHash = FixedBytes(32) +// export const BLSSignature = FixedBytes(96) +// export const ScriptBuf = Bytes +// export const OutPoint = Struct("OutPoint", { +// txid: Txid, +// vout: Uint32, +// }) +// export const InstantLock = Struct("InstantLock", { +// version: Uint8, +// inputs: Vec(OutPoint), +// txid: Txid, +// cyclehash: CycleHash, +// signature: BLSSignature, +// }) +// export const Witness = Struct("Witness", { +// content: Bytes, +// witness_elements: Uint64, +// indices_start: Uint64, +// }) +// export const TxIn = Struct("TxIn", { +// previous_output: OutPoint, +// script_sig: ScriptBuf, +// sequence: Uint32, +// witness: Witness, +// }) +// export const TxOut = Struct("TxOut", { +// value: Uint64, +// script_pubkey: ScriptBuf, +// }) +// export const TransactionPayload = Enum("TransactionPayload", { +// // TODO - we have the normal layer 1 payload already +// }) +// export const Transaction = Struct("Transaction", { +// version: Uint16, +// lock_time: Uint32, +// input: Vec(TxIn), +// output: Vec(TxOut), +// special_transaction_payload: Option(TransactionPayload), +// }) +// export const InstantAssetLockProof = Struct("InstantAssetLockProof", { +// instant_lock: InstantLock, +// transaction: Transaction, +// output_index: Uint32, +// }) +// export const RawInstantLockProof = Struct("RawInstantLockProof", { +// instant_lock: BinaryData, +// transaction: BinaryData, +// output_index: VarUint, //Uint32, +// }) +// export const ChainAssetLockProof = Struct("ChainAssetLockProof", { +// core_chain_locked_height: Uint32, +// out_point: OutPoint, +// }) +// export const AssetLockProof = Enum("AssetLockProof", { +// 0: InstantAssetLockProof, +// 1: ChainAssetLockProof, +// }) +// export const RawAssetLockProof = Enum("RawAssetLockProof", { +// 0: RawInstantLockProof, +// 1: ChainAssetLockProof, +// }) +// export const IdentityPublicKeyV0 = Struct("IdentityPublicKeyV0", { +// id: KeyID, +// purpose: Purpose, +// security_level: SecurityLevel, +// contract_bounds: Option(ContractBounds), +// type: KeyType, +// read_only: Bool, +// data: BinaryData, +// disabled_at: Option(TimestampMillis), +// }) +// export const IdentityPublicKey = Enum("IdentityPublicKey", { +// 0: IdentityPublicKeyV0, +// }) +/** + * This is a JSON.stringify replacer that converts keys to camelCase + * and Uint8Array to regular Array to match what to_json* does. + * @param {string} key + * @param {any} value + */ +function jsonCamelCaseReplacer(key, value) { + if (value instanceof Uint8Array) { + return Array.from(value); + } + if (value && typeof value === "object") { + /** @type {any} */ + let replacement = {}; + for (let k of Object.keys(value)) { + let newkey = k.replace(/_[a-z]/g, (val) => val[1].toUpperCase()); + replacement[newkey] = value[k]; + } + return replacement; + } + return value; +} +/** + * @param {any} value + */ +export function toJsonCamelCase(value) { + return JSON.stringify(value, jsonCamelCaseReplacer); +} +// // TODO: Implement all the other transitions +// export const StateTransition = Enum("StateTransition", { +// 0: DataContractCreateTransition, //DataContractCreate(DataContractCreateTransition), +// // 1: DataContractUpdateTransition, //DataContractUpdate(DataContractUpdateTransition), +// // 2: DocumentsBatchTransition, //DocumentsBatch(DocumentsBatchTransition), +// 3: IdentityCreateTransition, //IdentityCreate(IdentityCreateTransition), +// // 4: IdentityTopUpTransition, //IdentityTopUp(IdentityTopUpTransition), +// // 5: IdentityCreditWithdrawalTransition, //IdentityCreditWithdrawal(IdentityCreditWithdrawalTransition), +// // 6: IdentityUpdateTransition, //IdentityUpdate(IdentityUpdateTransition), +// // 7: IdentityCreditTransferTransition, //IdentityCreditTransfer(IdentityCreditTransferTransition), +// // 8: MasternodeVoteTransition, //MasternodeVote(MasternodeVoteTransition), +// }) diff --git a/built/DashPlatform.js/src/dashhd-utils.d.ts b/built/DashPlatform.js/src/dashhd-utils.d.ts new file mode 100644 index 0000000..7971dd0 --- /dev/null +++ b/built/DashPlatform.js/src/dashhd-utils.d.ts @@ -0,0 +1,39 @@ +/** + * Returns the Identity Auth Wallet, which can be used to derive Identity Auth Keys + * @param {import('dashhd').HDWallet} walletKey + * @param {String} path + */ +export function deriveIdentAuthWalletPath(walletKey: any, path: string): Promise; +/** + * Returns a fully-derived Identity Auth Key + * @param {import('dashhd').HDWallet} walletKey + * @param {String} path + */ +export function deriveIdentAuthKeyPath(walletKey: any, path: string): Promise; +/** + * Returns a fully-derived Identity Registration Funding Key + * @param {import('dashhd').HDWallet} walletKey + * @param {String} path + */ +export function deriveIdentRegFundKeyPath(walletKey: any, path: string): Promise; +/** + * Returns a fully-derived Topup Funding Key + * @param {import('dashhd').HDWallet} walletKey + * @param {String} path + */ +export function deriveIdentTopupKeyPath(walletKey: any, path: string): Promise; +export type HDPathPlatform = { + path: string; + paths: Array; + m: "m" | "m'"; + purpose: "9'"; + coinType: "5'" | "1'"; + feature: "5'"; + subFeature: "0'" | "1'" | "2'"; + keyType?: "1'" | "0'" | undefined; + identityIndex?: string | undefined; + keyIndex?: string | undefined; + topupIndex?: string | undefined; + fundRegIndex?: string | undefined; +}; +export type Uint32 = number; diff --git a/built/DashPlatform.js/src/dashhd-utils.js b/built/DashPlatform.js/src/dashhd-utils.js new file mode 100644 index 0000000..9c2cb67 --- /dev/null +++ b/built/DashPlatform.js/src/dashhd-utils.js @@ -0,0 +1,166 @@ +import DashHd from "dashhd"; +/** @typedef {Number} Uint32 */ +// https://github.com/dashpay/dips/blob/master/dip-0009.md +const PURPOSE_FEATURE_PATHS = "9'"; // DIP9 +// https://github.com/dashpay/dips/blob/master/dip-0013.md +const FEATURE_IDENTITY = "5'"; // DIP13 +// https://github.com/satoshilabs/slips/blob/master/slip-0044.md +const COIN_TYPE_DASH = "5'"; // SLIP44 +const COIN_TYPE_TESTNET = "1'"; // SLIP44 +const SUB_FEATURE_AUTH = "0'"; // DIP13 +const KEY_TYPE_ECDSA = "0'"; // DIP13 +const KEY_TYPE_BLS = "1'"; // DIP13 +const SUB_FEATURE_REG = "1'"; // DIP13 +const SUB_FEATURE_TOPUP = "2'"; // DIP13 +// m/9'//5'/ +// const PREFIX_IDENT = `m/${PURPOSE_FEATURE_PATHS}/${COIN_TYPE_DASH}/${FEATURE_IDENTITY}`; +// const PREFIX_IDENT_TESTNET = `m/${PURPOSE_FEATURE_PATHS}/${COIN_TYPE_TESTNET}/${FEATURE_IDENTITY}`; +// const PREFIX_AUTH = `${PREFIX_IDENT}/${SUB_FEATURE_AUTH}/${KEY_TYPE_ECDSA}`; +// const PREFIX_AUTH_TESTNET = `${PREFIX_IDENT_TESTNET}/${SUB_FEATURE_AUTH}/${KEY_TYPE_ECDSA}`; +// const PREFIX_REG = `${PREFIX_IDENT}/${SUB_FEATURE_REG}`; +// const PREFIX_REG_TESTNET = `${PREFIX_IDENT_TESTNET}/${SUB_FEATURE_REG}`; +// const PREFIX_TOPUP = `${PREFIX_IDENT}/${SUB_FEATURE_TOPUP}`; +// const PREFIX_TOPUP_TESTNET = `${PREFIX_IDENT_TESTNET}/${SUB_FEATURE_TOPUP}`; +/** + * Returns the Identity Auth Wallet, which can be used to derive Identity Auth Keys + * @param {import('dashhd').HDWallet} walletKey + * @param {String} path + */ +export async function deriveIdentAuthWalletPath(walletKey, path) { + let hdpath = _parseIdentityWallet(path); + let identAuthKey = await _deriveIdentAuthPath(walletKey, hdpath); + return identAuthKey; +} +; +/** + * Returns a fully-derived Identity Auth Key + * @param {import('dashhd').HDWallet} walletKey + * @param {String} path + */ +export async function deriveIdentAuthKeyPath(walletKey, path) { + const INDEX_AUTH_IDENTITY_KEY = 7; + let hdpath = _parseIdentityWallet(path); + let hasAuthKey = hdpath.paths.length > INDEX_AUTH_IDENTITY_KEY && + hdpath.paths[INDEX_AUTH_IDENTITY_KEY].endsWith("'"); + if (!hasAuthKey) { + throw new Error(`an auth wallet key path must be in the form \`m/9'//5'/0'///'\` where the key index must have a trailing apostrophe`); + } + let authWalletKey = await _deriveIdentAuthPath(walletKey, hdpath); + let authKey = await authWalletKey.deriveAuthKey(hdpath); + return authKey; +} +; +/** + * @typedef HDPathPlatform + * @prop {String} path + * @prop {Array} paths + * @prop {"m"|"m'"} m + * @prop {"9'"} purpose + * @prop {"5'"|"1'"} coinType + * @prop {"5'"} feature + * @prop {"0'"|"1'"|"2'"} subFeature + * @prop {"0'"|"1'"} [keyType] + * @prop {String} [identityIndex] + * @prop {String} [keyIndex] + * @prop {String} [topupIndex] + * @prop {String} [fundRegIndex] + */ +/** + * @param {import('dashhd').HDWallet} walletKey + * @param {HDPathPlatform} hdpath + */ +async function _deriveIdentAuthPath(walletKey, hdpath) { + const INDEX_KEY_TYPE = 5; + const INDEX_AUTH_IDENTITY = 6; + let keyType = hdpath.paths[INDEX_KEY_TYPE]; + let isValidKeyType = keyType === KEY_TYPE_ECDSA || keyType === KEY_TYPE_BLS; + let hasIdentity = hdpath.paths.length > INDEX_AUTH_IDENTITY && + hdpath.paths[INDEX_AUTH_IDENTITY].endsWith("'"); + let isIdentity = isValidKeyType && hasIdentity; + if (!isIdentity) { + throw new Error(`an identity wallet identity auth path must be in the form \`m/9'//5'/0'//' where coin-type is 5' (DASH mainnet) or 1' (testnet), key-type is 0' (ECDSA) or 1' (BLS), and identity index must have a trailing apostrophe`); + } + // 0=m/1=purpose'/2=coin-type'/3=feature'/4=sub-feature'/5=key-type'/6=identity-index' + let authWalletPath = `m/9'/${hdpath.coinType}/5'/0'/${keyType}/${hdpath.paths[INDEX_AUTH_IDENTITY]}`; + let _authWalletKey = await DashHd.derivePath(walletKey, authWalletPath); + let authWalletKey = Object.assign(_authWalletKey, { + /** @param {Uint32} authKeyIndex */ + deriveAuthKey: async function (authKeyIndex) { + let authKey = await DashHd.deriveChild(_authWalletKey, authKeyIndex, DashHd.HARDENED); + return authKey; + }, + }); + return authWalletKey; +} +/** + * Returns a fully-derived Identity Registration Funding Key + * @param {import('dashhd').HDWallet} walletKey + * @param {String} path + */ +export async function deriveIdentRegFundKeyPath(walletKey, path) { + const INDEX_REG_FUND_KEY = 5; + let hdpath = _parseIdentityWallet(path); + let hasIdentity = hdpath.paths.length > INDEX_REG_FUND_KEY && + !hdpath.paths[INDEX_REG_FUND_KEY].endsWith("'"); + if (!hasIdentity) { + throw new Error(`an identity wallet identity reg path must be in the form \`m/9'//5'/1'/' where the identity index MUST NOT have a trailing apostrophe`); + } + // 0=m/1=purpose'/2=coin-type'/3=feature'/4=sub-feature'/5=identity-index + let identRegFundPath = `m/9'/${hdpath.coinType}/5'/1'/${hdpath.paths[INDEX_REG_FUND_KEY]}`; + let identRegFundKey = await DashHd.derivePath(walletKey, identRegFundPath); + return identRegFundKey; +} +; +// async function deriveIdentTopupWallet(walletKey, path) { +// } +/** + * Returns a fully-derived Topup Funding Key + * @param {import('dashhd').HDWallet} walletKey + * @param {String} path + */ +export async function deriveIdentTopupKeyPath(walletKey, path) { + const INDEX_TOPUP_KEY = 5; + let hdpath = _parseIdentityWallet(path); + let hasIdentity = hdpath.paths.length > INDEX_TOPUP_KEY && + !hdpath.paths[INDEX_TOPUP_KEY].endsWith("'"); + if (!hasIdentity) { + throw new Error(`an identity wallet identity reg path must be in the form \`m/9'//5'/2'/' where the topup index MUST NOT have a trailing apostrophe`); + } + // 0=m/1=purpose'/2=coin-type'/3=feature'/4=sub-feature'/5=topup-index + let identTopupPath = `m/9'/${hdpath.coinType}/5'/2'/${hdpath.paths[INDEX_TOPUP_KEY]}`; + let identTopupKey = await DashHd.derivePath(walletKey, identTopupPath); + return identTopupKey; +} +; +/** + * @param {String} path + * @returns {HDPathPlatform} + */ +function _parseIdentityWallet(path) { + let paths = path.split("/"); + let [m, purpose, coinType, feature, subFeature] = paths; + let hasMaster = m === "m" || m === "m'"; + let hasPurpose = purpose === PURPOSE_FEATURE_PATHS; + let hasCoinType = coinType === COIN_TYPE_DASH || coinType === COIN_TYPE_TESTNET; + let hasFeature = feature === FEATURE_IDENTITY; + let hasSubFeature = [ + SUB_FEATURE_AUTH, + SUB_FEATURE_REG, + SUB_FEATURE_TOPUP, + ].includes(subFeature); + let hasValidPrefix = hasMaster && hasPurpose && hasCoinType && hasFeature && hasSubFeature; + if (!hasValidPrefix) { + throw new Error(`identity wallet paths must be in the form \`m/9'//5'/' where coin-type is 5' (DASH mainnet) or 1' (testnet) and sub-feature is 0' (auth), 1' (registration), or 2' (topup)`); + } + //@ts-expect-error - these have been type checked + return { path, paths, m, purpose, coinType, feature, subFeature }; +} +// export default DashHd; +// //@ts-expect-error - monkey patch +// DashHd.deriveIdentTopupKeyPath = deriveIdentTopupKeyPath; +// //@ts-expect-error - monkey patch +// DashHd.deriveIdentRegFundKeyPath = deriveIdentRegFundKeyPath; +// //@ts-expect-error - monkey patch +// DashHd.deriveIdentAuthKeyPath = deriveIdentAuthKeyPath; +// //@ts-expect-error - monkey patch +// DashHd.deriveIdentAuthWalletPath = deriveIdentAuthWalletPath; diff --git a/built/DashPlatform.js/src/dashplatform.d.ts b/built/DashPlatform.js/src/dashplatform.d.ts new file mode 100644 index 0000000..4889760 --- /dev/null +++ b/built/DashPlatform.js/src/dashplatform.d.ts @@ -0,0 +1,14 @@ +/** + * ex: 01 01 40420f00 00000000 19 76a914cdfca4ae1cf2333056659a2c 8dc656f36d228402 + * @param {Object} opts + * @param {Uint8} [opts.version] + * @param {Array} opts.creditOutputs + */ +export function packAssetLock({ version, creditOutputs }: { + version?: number | undefined; + creditOutputs: Array; +}): string; +export type Uint32 = number; +export type Uint8 = number; +export type Hex = string; +import * as DashTx from 'dashtx'; diff --git a/built/DashPlatform.js/src/dashplatform.js b/built/DashPlatform.js/src/dashplatform.js new file mode 100644 index 0000000..c3ee3c2 --- /dev/null +++ b/built/DashPlatform.js/src/dashplatform.js @@ -0,0 +1,29 @@ +import * as DashTx from 'dashtx'; +/** + * ex: 01 01 40420f00 00000000 19 76a914cdfca4ae1cf2333056659a2c 8dc656f36d228402 + * @param {Object} opts + * @param {Uint8} [opts.version] + * @param {Array} opts.creditOutputs + */ +export function packAssetLock({ version = 1, creditOutputs }) { + let versionHex = DashTx.utils.toUint32LE(version); + versionHex = versionHex.slice(0, 2); + let lenHex = DashTx.utils.toUint32LE(creditOutputs.length); + lenHex = lenHex.slice(0, 2); + let hexes = [`${versionHex}${lenHex}`]; + for (let creditOutput of creditOutputs) { + //@ts-ignore - TODO check type of TxOutput + let script = creditOutput.script; + if (!script) { + let satsHexLE = DashTx.utils.toUint64LE(creditOutput.satoshis); + script = `${satsHexLE}1976a914${creditOutput.pubKeyHash}88ac`; + } + let assetLock = `${script}`; + hexes.push(assetLock); + } + return hexes.join(""); +} +; +/** @typedef {Number} Uint32 */ +/** @typedef {Number} Uint8 */ +/** @typedef {String} Hex */ diff --git a/built/DashPlatform.js/src/generated/core/v0/core.client.d.ts b/built/DashPlatform.js/src/generated/core/v0/core.client.d.ts new file mode 100644 index 0000000..1a2324c --- /dev/null +++ b/built/DashPlatform.js/src/generated/core/v0/core.client.d.ts @@ -0,0 +1,122 @@ +import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; +import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; +import type { MasternodeListResponse } from "./core.ts"; +import type { MasternodeListRequest } from "./core.ts"; +import type { TransactionsWithProofsResponse } from "./core.ts"; +import type { TransactionsWithProofsRequest } from "./core.ts"; +import type { BlockHeadersWithChainLocksResponse } from "./core.ts"; +import type { BlockHeadersWithChainLocksRequest } from "./core.ts"; +import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc"; +import type { GetEstimatedTransactionFeeResponse } from "./core.ts"; +import type { GetEstimatedTransactionFeeRequest } from "./core.ts"; +import type { GetTransactionResponse } from "./core.ts"; +import type { GetTransactionRequest } from "./core.ts"; +import type { BroadcastTransactionResponse } from "./core.ts"; +import type { BroadcastTransactionRequest } from "./core.ts"; +import type { GetBestBlockHeightResponse } from "./core.ts"; +import type { GetBestBlockHeightRequest } from "./core.ts"; +import type { GetBlockResponse } from "./core.ts"; +import type { GetBlockRequest } from "./core.ts"; +import type { GetMasternodeStatusResponse } from "./core.ts"; +import type { GetMasternodeStatusRequest } from "./core.ts"; +import type { GetBlockchainStatusResponse } from "./core.ts"; +import type { GetBlockchainStatusRequest } from "./core.ts"; +import type { UnaryCall } from "@protobuf-ts/runtime-rpc"; +import type { RpcOptions } from "@protobuf-ts/runtime-rpc"; +/** + * @generated from protobuf service org.dash.platform.dapi.v0.Core + */ +export interface ICoreClient { + /** + * @generated from protobuf rpc: getBlockchainStatus(org.dash.platform.dapi.v0.GetBlockchainStatusRequest) returns (org.dash.platform.dapi.v0.GetBlockchainStatusResponse); + */ + getBlockchainStatus(input: GetBlockchainStatusRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getMasternodeStatus(org.dash.platform.dapi.v0.GetMasternodeStatusRequest) returns (org.dash.platform.dapi.v0.GetMasternodeStatusResponse); + */ + getMasternodeStatus(input: GetMasternodeStatusRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getBlock(org.dash.platform.dapi.v0.GetBlockRequest) returns (org.dash.platform.dapi.v0.GetBlockResponse); + */ + getBlock(input: GetBlockRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getBestBlockHeight(org.dash.platform.dapi.v0.GetBestBlockHeightRequest) returns (org.dash.platform.dapi.v0.GetBestBlockHeightResponse); + */ + getBestBlockHeight(input: GetBestBlockHeightRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: broadcastTransaction(org.dash.platform.dapi.v0.BroadcastTransactionRequest) returns (org.dash.platform.dapi.v0.BroadcastTransactionResponse); + */ + broadcastTransaction(input: BroadcastTransactionRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTransaction(org.dash.platform.dapi.v0.GetTransactionRequest) returns (org.dash.platform.dapi.v0.GetTransactionResponse); + */ + getTransaction(input: GetTransactionRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getEstimatedTransactionFee(org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest) returns (org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse); + */ + getEstimatedTransactionFee(input: GetEstimatedTransactionFeeRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: subscribeToBlockHeadersWithChainLocks(org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest) returns (stream org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse); + */ + subscribeToBlockHeadersWithChainLocks(input: BlockHeadersWithChainLocksRequest, options?: RpcOptions): ServerStreamingCall; + /** + * @generated from protobuf rpc: subscribeToTransactionsWithProofs(org.dash.platform.dapi.v0.TransactionsWithProofsRequest) returns (stream org.dash.platform.dapi.v0.TransactionsWithProofsResponse); + */ + subscribeToTransactionsWithProofs(input: TransactionsWithProofsRequest, options?: RpcOptions): ServerStreamingCall; + /** + * @generated from protobuf rpc: subscribeToMasternodeList(org.dash.platform.dapi.v0.MasternodeListRequest) returns (stream org.dash.platform.dapi.v0.MasternodeListResponse); + */ + subscribeToMasternodeList(input: MasternodeListRequest, options?: RpcOptions): ServerStreamingCall; +} +/** + * @generated from protobuf service org.dash.platform.dapi.v0.Core + */ +export declare class CoreClient implements ICoreClient, ServiceInfo { + private readonly _transport; + typeName: string; + methods: import("@protobuf-ts/runtime-rpc").MethodInfo[]; + options: { + [extensionName: string]: import("@protobuf-ts/runtime").JsonValue; + }; + constructor(_transport: RpcTransport); + /** + * @generated from protobuf rpc: getBlockchainStatus(org.dash.platform.dapi.v0.GetBlockchainStatusRequest) returns (org.dash.platform.dapi.v0.GetBlockchainStatusResponse); + */ + getBlockchainStatus(input: GetBlockchainStatusRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getMasternodeStatus(org.dash.platform.dapi.v0.GetMasternodeStatusRequest) returns (org.dash.platform.dapi.v0.GetMasternodeStatusResponse); + */ + getMasternodeStatus(input: GetMasternodeStatusRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getBlock(org.dash.platform.dapi.v0.GetBlockRequest) returns (org.dash.platform.dapi.v0.GetBlockResponse); + */ + getBlock(input: GetBlockRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getBestBlockHeight(org.dash.platform.dapi.v0.GetBestBlockHeightRequest) returns (org.dash.platform.dapi.v0.GetBestBlockHeightResponse); + */ + getBestBlockHeight(input: GetBestBlockHeightRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: broadcastTransaction(org.dash.platform.dapi.v0.BroadcastTransactionRequest) returns (org.dash.platform.dapi.v0.BroadcastTransactionResponse); + */ + broadcastTransaction(input: BroadcastTransactionRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTransaction(org.dash.platform.dapi.v0.GetTransactionRequest) returns (org.dash.platform.dapi.v0.GetTransactionResponse); + */ + getTransaction(input: GetTransactionRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getEstimatedTransactionFee(org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest) returns (org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse); + */ + getEstimatedTransactionFee(input: GetEstimatedTransactionFeeRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: subscribeToBlockHeadersWithChainLocks(org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest) returns (stream org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse); + */ + subscribeToBlockHeadersWithChainLocks(input: BlockHeadersWithChainLocksRequest, options?: RpcOptions): ServerStreamingCall; + /** + * @generated from protobuf rpc: subscribeToTransactionsWithProofs(org.dash.platform.dapi.v0.TransactionsWithProofsRequest) returns (stream org.dash.platform.dapi.v0.TransactionsWithProofsResponse); + */ + subscribeToTransactionsWithProofs(input: TransactionsWithProofsRequest, options?: RpcOptions): ServerStreamingCall; + /** + * @generated from protobuf rpc: subscribeToMasternodeList(org.dash.platform.dapi.v0.MasternodeListRequest) returns (stream org.dash.platform.dapi.v0.MasternodeListResponse); + */ + subscribeToMasternodeList(input: MasternodeListRequest, options?: RpcOptions): ServerStreamingCall; +} diff --git a/built/DashPlatform.js/src/generated/core/v0/core.client.js b/built/DashPlatform.js/src/generated/core/v0/core.client.js new file mode 100644 index 0000000..89b634b --- /dev/null +++ b/built/DashPlatform.js/src/generated/core/v0/core.client.js @@ -0,0 +1,84 @@ +import { Core } from "./core.js"; +import { stackIntercept } from "@protobuf-ts/runtime-rpc"; +/** + * @generated from protobuf service org.dash.platform.dapi.v0.Core + */ +export class CoreClient { + _transport; + typeName = Core.typeName; + methods = Core.methods; + options = Core.options; + constructor(_transport) { + this._transport = _transport; + } + /** + * @generated from protobuf rpc: getBlockchainStatus(org.dash.platform.dapi.v0.GetBlockchainStatusRequest) returns (org.dash.platform.dapi.v0.GetBlockchainStatusResponse); + */ + getBlockchainStatus(input, options) { + const method = this.methods[0], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getMasternodeStatus(org.dash.platform.dapi.v0.GetMasternodeStatusRequest) returns (org.dash.platform.dapi.v0.GetMasternodeStatusResponse); + */ + getMasternodeStatus(input, options) { + const method = this.methods[1], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getBlock(org.dash.platform.dapi.v0.GetBlockRequest) returns (org.dash.platform.dapi.v0.GetBlockResponse); + */ + getBlock(input, options) { + const method = this.methods[2], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getBestBlockHeight(org.dash.platform.dapi.v0.GetBestBlockHeightRequest) returns (org.dash.platform.dapi.v0.GetBestBlockHeightResponse); + */ + getBestBlockHeight(input, options) { + const method = this.methods[3], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: broadcastTransaction(org.dash.platform.dapi.v0.BroadcastTransactionRequest) returns (org.dash.platform.dapi.v0.BroadcastTransactionResponse); + */ + broadcastTransaction(input, options) { + const method = this.methods[4], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getTransaction(org.dash.platform.dapi.v0.GetTransactionRequest) returns (org.dash.platform.dapi.v0.GetTransactionResponse); + */ + getTransaction(input, options) { + const method = this.methods[5], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getEstimatedTransactionFee(org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest) returns (org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse); + */ + getEstimatedTransactionFee(input, options) { + const method = this.methods[6], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: subscribeToBlockHeadersWithChainLocks(org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest) returns (stream org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse); + */ + subscribeToBlockHeadersWithChainLocks(input, options) { + const method = this.methods[7], opt = this._transport.mergeOptions(options); + return stackIntercept("serverStreaming", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: subscribeToTransactionsWithProofs(org.dash.platform.dapi.v0.TransactionsWithProofsRequest) returns (stream org.dash.platform.dapi.v0.TransactionsWithProofsResponse); + */ + subscribeToTransactionsWithProofs(input, options) { + const method = this.methods[8], opt = this._transport.mergeOptions(options); + return stackIntercept("serverStreaming", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: subscribeToMasternodeList(org.dash.platform.dapi.v0.MasternodeListRequest) returns (stream org.dash.platform.dapi.v0.MasternodeListResponse); + */ + subscribeToMasternodeList(input, options) { + const method = this.methods[9], opt = this._transport.mergeOptions(options); + return stackIntercept("serverStreaming", this._transport, method, opt, input); + } +} diff --git a/built/DashPlatform.js/src/generated/core/v0/core.d.ts b/built/DashPlatform.js/src/generated/core/v0/core.d.ts new file mode 100644 index 0000000..e104d59 --- /dev/null +++ b/built/DashPlatform.js/src/generated/core/v0/core.d.ts @@ -0,0 +1,733 @@ +import { ServiceType } from "@protobuf-ts/runtime-rpc"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusRequest + */ +export interface GetBlockchainStatusRequest { +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse + */ +export interface GetBlockchainStatusResponse { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version version = 1; + */ + version?: GetBlockchainStatusResponse_Version; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time time = 2; + */ + time?: GetBlockchainStatusResponse_Time; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Status status = 3; + */ + status: GetBlockchainStatusResponse_Status; + /** + * @generated from protobuf field: double sync_progress = 4; + */ + syncProgress: number; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain chain = 5; + */ + chain?: GetBlockchainStatusResponse_Chain; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network network = 7; + */ + network?: GetBlockchainStatusResponse_Network; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version + */ +export interface GetBlockchainStatusResponse_Version { + /** + * @generated from protobuf field: uint32 protocol = 1; + */ + protocol: number; + /** + * @generated from protobuf field: uint32 software = 2; + */ + software: number; + /** + * @generated from protobuf field: string agent = 3; + */ + agent: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time + */ +export interface GetBlockchainStatusResponse_Time { + /** + * @generated from protobuf field: uint32 now = 1; + */ + now: number; + /** + * @generated from protobuf field: int32 offset = 2; + */ + offset: number; + /** + * @generated from protobuf field: uint32 median = 3; + */ + median: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain + */ +export interface GetBlockchainStatusResponse_Chain { + /** + * @generated from protobuf field: string name = 1; + */ + name: string; + /** + * @generated from protobuf field: uint32 headers_count = 2; + */ + headersCount: number; + /** + * @generated from protobuf field: uint32 blocks_count = 3; + */ + blocksCount: number; + /** + * @generated from protobuf field: bytes best_block_hash = 4; + */ + bestBlockHash: Uint8Array; + /** + * @generated from protobuf field: double difficulty = 5; + */ + difficulty: number; + /** + * @generated from protobuf field: bytes chain_work = 6; + */ + chainWork: Uint8Array; + /** + * @generated from protobuf field: bool is_synced = 7; + */ + isSynced: boolean; + /** + * @generated from protobuf field: double sync_progress = 8; + */ + syncProgress: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee + */ +export interface GetBlockchainStatusResponse_NetworkFee { + /** + * @generated from protobuf field: double relay = 1; + */ + relay: number; + /** + * @generated from protobuf field: double incremental = 2; + */ + incremental: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network + */ +export interface GetBlockchainStatusResponse_Network { + /** + * @generated from protobuf field: uint32 peers_count = 1; + */ + peersCount: number; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee fee = 2; + */ + fee?: GetBlockchainStatusResponse_NetworkFee; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Status + */ +export declare enum GetBlockchainStatusResponse_Status { + /** + * @generated from protobuf enum value: NOT_STARTED = 0; + */ + NOT_STARTED = 0, + /** + * @generated from protobuf enum value: SYNCING = 1; + */ + SYNCING = 1, + /** + * @generated from protobuf enum value: READY = 2; + */ + READY = 2, + /** + * @generated from protobuf enum value: ERROR = 3; + */ + ERROR = 3 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetMasternodeStatusRequest + */ +export interface GetMasternodeStatusRequest { +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetMasternodeStatusResponse + */ +export interface GetMasternodeStatusResponse { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetMasternodeStatusResponse.Status status = 1; + */ + status: GetMasternodeStatusResponse_Status; + /** + * @generated from protobuf field: bytes pro_tx_hash = 2; + */ + proTxHash: Uint8Array; + /** + * @generated from protobuf field: uint32 pose_penalty = 3; + */ + posePenalty: number; + /** + * @generated from protobuf field: bool is_synced = 4; + */ + isSynced: boolean; + /** + * @generated from protobuf field: double sync_progress = 5; + */ + syncProgress: number; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetMasternodeStatusResponse.Status + */ +export declare enum GetMasternodeStatusResponse_Status { + /** + * @generated from protobuf enum value: UNKNOWN = 0; + */ + UNKNOWN = 0, + /** + * @generated from protobuf enum value: WAITING_FOR_PROTX = 1; + */ + WAITING_FOR_PROTX = 1, + /** + * @generated from protobuf enum value: POSE_BANNED = 2; + */ + POSE_BANNED = 2, + /** + * @generated from protobuf enum value: REMOVED = 3; + */ + REMOVED = 3, + /** + * @generated from protobuf enum value: OPERATOR_KEY_CHANGED = 4; + */ + OPERATOR_KEY_CHANGED = 4, + /** + * @generated from protobuf enum value: PROTX_IP_CHANGED = 5; + */ + PROTX_IP_CHANGED = 5, + /** + * @generated from protobuf enum value: READY = 6; + */ + READY = 6, + /** + * @generated from protobuf enum value: ERROR = 7; + */ + ERROR = 7 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockRequest + */ +export interface GetBlockRequest { + /** + * @generated from protobuf oneof: block + */ + block: { + oneofKind: "height"; + /** + * @generated from protobuf field: uint32 height = 1; + */ + height: number; + } | { + oneofKind: "hash"; + /** + * @generated from protobuf field: string hash = 2; + */ + hash: string; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockResponse + */ +export interface GetBlockResponse { + /** + * @generated from protobuf field: bytes block = 1; + */ + block: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBestBlockHeightRequest + */ +export interface GetBestBlockHeightRequest { +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBestBlockHeightResponse + */ +export interface GetBestBlockHeightResponse { + /** + * @generated from protobuf field: uint32 height = 1; + */ + height: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BroadcastTransactionRequest + */ +export interface BroadcastTransactionRequest { + /** + * @generated from protobuf field: bytes transaction = 1; + */ + transaction: Uint8Array; + /** + * @generated from protobuf field: bool allow_high_fees = 2; + */ + allowHighFees: boolean; + /** + * @generated from protobuf field: bool bypass_limits = 3; + */ + bypassLimits: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BroadcastTransactionResponse + */ +export interface BroadcastTransactionResponse { + /** + * @generated from protobuf field: string transaction_id = 1; + */ + transactionId: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTransactionRequest + */ +export interface GetTransactionRequest { + /** + * @generated from protobuf field: string id = 1; + */ + id: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTransactionResponse + */ +export interface GetTransactionResponse { + /** + * @generated from protobuf field: bytes transaction = 1; + */ + transaction: Uint8Array; + /** + * @generated from protobuf field: bytes block_hash = 2; + */ + blockHash: Uint8Array; + /** + * @generated from protobuf field: uint32 height = 3; + */ + height: number; + /** + * @generated from protobuf field: uint32 confirmations = 4; + */ + confirmations: number; + /** + * @generated from protobuf field: bool is_instant_locked = 5; + */ + isInstantLocked: boolean; + /** + * @generated from protobuf field: bool is_chain_locked = 6; + */ + isChainLocked: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest + */ +export interface BlockHeadersWithChainLocksRequest { + /** + * @generated from protobuf oneof: from_block + */ + fromBlock: { + oneofKind: "fromBlockHash"; + /** + * @generated from protobuf field: bytes from_block_hash = 1; + */ + fromBlockHash: Uint8Array; + } | { + oneofKind: "fromBlockHeight"; + /** + * @generated from protobuf field: uint32 from_block_height = 2; + */ + fromBlockHeight: number; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: uint32 count = 3; + */ + count: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse + */ +export interface BlockHeadersWithChainLocksResponse { + /** + * @generated from protobuf oneof: responses + */ + responses: { + oneofKind: "blockHeaders"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.BlockHeaders block_headers = 1; + */ + blockHeaders: BlockHeaders; + } | { + oneofKind: "chainLock"; + /** + * @generated from protobuf field: bytes chain_lock = 2; + */ + chainLock: Uint8Array; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BlockHeaders + */ +export interface BlockHeaders { + /** + * @generated from protobuf field: repeated bytes headers = 1; + */ + headers: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest + */ +export interface GetEstimatedTransactionFeeRequest { + /** + * @generated from protobuf field: uint32 blocks = 1; + */ + blocks: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse + */ +export interface GetEstimatedTransactionFeeResponse { + /** + * @generated from protobuf field: double fee = 1; + */ + fee: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.TransactionsWithProofsRequest + */ +export interface TransactionsWithProofsRequest { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.BloomFilter bloom_filter = 1; + */ + bloomFilter?: BloomFilter; + /** + * @generated from protobuf oneof: from_block + */ + fromBlock: { + oneofKind: "fromBlockHash"; + /** + * @generated from protobuf field: bytes from_block_hash = 2; + */ + fromBlockHash: Uint8Array; + } | { + oneofKind: "fromBlockHeight"; + /** + * @generated from protobuf field: uint32 from_block_height = 3; + */ + fromBlockHeight: number; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: uint32 count = 4; + */ + count: number; + /** + * @generated from protobuf field: bool send_transaction_hashes = 5; + */ + sendTransactionHashes: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BloomFilter + */ +export interface BloomFilter { + /** + * @generated from protobuf field: bytes v_data = 1; + */ + vData: Uint8Array; + /** + * @generated from protobuf field: uint32 n_hash_funcs = 2; + */ + nHashFuncs: number; + /** + * @generated from protobuf field: uint32 n_tweak = 3; + */ + nTweak: number; + /** + * @generated from protobuf field: uint32 n_flags = 4; + */ + nFlags: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.TransactionsWithProofsResponse + */ +export interface TransactionsWithProofsResponse { + /** + * @generated from protobuf oneof: responses + */ + responses: { + oneofKind: "rawTransactions"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.RawTransactions raw_transactions = 1; + */ + rawTransactions: RawTransactions; + } | { + oneofKind: "instantSendLockMessages"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.InstantSendLockMessages instant_send_lock_messages = 2; + */ + instantSendLockMessages: InstantSendLockMessages; + } | { + oneofKind: "rawMerkleBlock"; + /** + * @generated from protobuf field: bytes raw_merkle_block = 3; + */ + rawMerkleBlock: Uint8Array; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.RawTransactions + */ +export interface RawTransactions { + /** + * @generated from protobuf field: repeated bytes transactions = 1; + */ + transactions: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.InstantSendLockMessages + */ +export interface InstantSendLockMessages { + /** + * @generated from protobuf field: repeated bytes messages = 1; + */ + messages: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.MasternodeListRequest + */ +export interface MasternodeListRequest { +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.MasternodeListResponse + */ +export interface MasternodeListResponse { + /** + * @generated from protobuf field: bytes masternode_list_diff = 1; + */ + masternodeListDiff: Uint8Array; +} +declare class GetBlockchainStatusRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusRequest + */ +export declare const GetBlockchainStatusRequest: GetBlockchainStatusRequest$Type; +declare class GetBlockchainStatusResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse + */ +export declare const GetBlockchainStatusResponse: GetBlockchainStatusResponse$Type; +declare class GetBlockchainStatusResponse_Version$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version + */ +export declare const GetBlockchainStatusResponse_Version: GetBlockchainStatusResponse_Version$Type; +declare class GetBlockchainStatusResponse_Time$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time + */ +export declare const GetBlockchainStatusResponse_Time: GetBlockchainStatusResponse_Time$Type; +declare class GetBlockchainStatusResponse_Chain$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain + */ +export declare const GetBlockchainStatusResponse_Chain: GetBlockchainStatusResponse_Chain$Type; +declare class GetBlockchainStatusResponse_NetworkFee$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee + */ +export declare const GetBlockchainStatusResponse_NetworkFee: GetBlockchainStatusResponse_NetworkFee$Type; +declare class GetBlockchainStatusResponse_Network$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network + */ +export declare const GetBlockchainStatusResponse_Network: GetBlockchainStatusResponse_Network$Type; +declare class GetMasternodeStatusRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetMasternodeStatusRequest + */ +export declare const GetMasternodeStatusRequest: GetMasternodeStatusRequest$Type; +declare class GetMasternodeStatusResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetMasternodeStatusResponse + */ +export declare const GetMasternodeStatusResponse: GetMasternodeStatusResponse$Type; +declare class GetBlockRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockRequest + */ +export declare const GetBlockRequest: GetBlockRequest$Type; +declare class GetBlockResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockResponse + */ +export declare const GetBlockResponse: GetBlockResponse$Type; +declare class GetBestBlockHeightRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBestBlockHeightRequest + */ +export declare const GetBestBlockHeightRequest: GetBestBlockHeightRequest$Type; +declare class GetBestBlockHeightResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBestBlockHeightResponse + */ +export declare const GetBestBlockHeightResponse: GetBestBlockHeightResponse$Type; +declare class BroadcastTransactionRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BroadcastTransactionRequest + */ +export declare const BroadcastTransactionRequest: BroadcastTransactionRequest$Type; +declare class BroadcastTransactionResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BroadcastTransactionResponse + */ +export declare const BroadcastTransactionResponse: BroadcastTransactionResponse$Type; +declare class GetTransactionRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTransactionRequest + */ +export declare const GetTransactionRequest: GetTransactionRequest$Type; +declare class GetTransactionResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTransactionResponse + */ +export declare const GetTransactionResponse: GetTransactionResponse$Type; +declare class BlockHeadersWithChainLocksRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest + */ +export declare const BlockHeadersWithChainLocksRequest: BlockHeadersWithChainLocksRequest$Type; +declare class BlockHeadersWithChainLocksResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse + */ +export declare const BlockHeadersWithChainLocksResponse: BlockHeadersWithChainLocksResponse$Type; +declare class BlockHeaders$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BlockHeaders + */ +export declare const BlockHeaders: BlockHeaders$Type; +declare class GetEstimatedTransactionFeeRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest + */ +export declare const GetEstimatedTransactionFeeRequest: GetEstimatedTransactionFeeRequest$Type; +declare class GetEstimatedTransactionFeeResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse + */ +export declare const GetEstimatedTransactionFeeResponse: GetEstimatedTransactionFeeResponse$Type; +declare class TransactionsWithProofsRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.TransactionsWithProofsRequest + */ +export declare const TransactionsWithProofsRequest: TransactionsWithProofsRequest$Type; +declare class BloomFilter$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BloomFilter + */ +export declare const BloomFilter: BloomFilter$Type; +declare class TransactionsWithProofsResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.TransactionsWithProofsResponse + */ +export declare const TransactionsWithProofsResponse: TransactionsWithProofsResponse$Type; +declare class RawTransactions$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.RawTransactions + */ +export declare const RawTransactions: RawTransactions$Type; +declare class InstantSendLockMessages$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.InstantSendLockMessages + */ +export declare const InstantSendLockMessages: InstantSendLockMessages$Type; +declare class MasternodeListRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.MasternodeListRequest + */ +export declare const MasternodeListRequest: MasternodeListRequest$Type; +declare class MasternodeListResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.MasternodeListResponse + */ +export declare const MasternodeListResponse: MasternodeListResponse$Type; +/** + * @generated ServiceType for protobuf service org.dash.platform.dapi.v0.Core + */ +export declare const Core: ServiceType; +export {}; diff --git a/built/DashPlatform.js/src/generated/core/v0/core.js b/built/DashPlatform.js/src/generated/core/v0/core.js new file mode 100644 index 0000000..9269bca --- /dev/null +++ b/built/DashPlatform.js/src/generated/core/v0/core.js @@ -0,0 +1,462 @@ +// @generated by protobuf-ts 2.9.6 with parameter optimize_code_size +// @generated from protobuf file "core/v0/core.proto" (package "org.dash.platform.dapi.v0", syntax proto3) +// tslint:disable +import { ServiceType } from "@protobuf-ts/runtime-rpc"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Status + */ +export var GetBlockchainStatusResponse_Status; +(function (GetBlockchainStatusResponse_Status) { + /** + * @generated from protobuf enum value: NOT_STARTED = 0; + */ + GetBlockchainStatusResponse_Status[GetBlockchainStatusResponse_Status["NOT_STARTED"] = 0] = "NOT_STARTED"; + /** + * @generated from protobuf enum value: SYNCING = 1; + */ + GetBlockchainStatusResponse_Status[GetBlockchainStatusResponse_Status["SYNCING"] = 1] = "SYNCING"; + /** + * @generated from protobuf enum value: READY = 2; + */ + GetBlockchainStatusResponse_Status[GetBlockchainStatusResponse_Status["READY"] = 2] = "READY"; + /** + * @generated from protobuf enum value: ERROR = 3; + */ + GetBlockchainStatusResponse_Status[GetBlockchainStatusResponse_Status["ERROR"] = 3] = "ERROR"; +})(GetBlockchainStatusResponse_Status || (GetBlockchainStatusResponse_Status = {})); +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetMasternodeStatusResponse.Status + */ +export var GetMasternodeStatusResponse_Status; +(function (GetMasternodeStatusResponse_Status) { + /** + * @generated from protobuf enum value: UNKNOWN = 0; + */ + GetMasternodeStatusResponse_Status[GetMasternodeStatusResponse_Status["UNKNOWN"] = 0] = "UNKNOWN"; + /** + * @generated from protobuf enum value: WAITING_FOR_PROTX = 1; + */ + GetMasternodeStatusResponse_Status[GetMasternodeStatusResponse_Status["WAITING_FOR_PROTX"] = 1] = "WAITING_FOR_PROTX"; + /** + * @generated from protobuf enum value: POSE_BANNED = 2; + */ + GetMasternodeStatusResponse_Status[GetMasternodeStatusResponse_Status["POSE_BANNED"] = 2] = "POSE_BANNED"; + /** + * @generated from protobuf enum value: REMOVED = 3; + */ + GetMasternodeStatusResponse_Status[GetMasternodeStatusResponse_Status["REMOVED"] = 3] = "REMOVED"; + /** + * @generated from protobuf enum value: OPERATOR_KEY_CHANGED = 4; + */ + GetMasternodeStatusResponse_Status[GetMasternodeStatusResponse_Status["OPERATOR_KEY_CHANGED"] = 4] = "OPERATOR_KEY_CHANGED"; + /** + * @generated from protobuf enum value: PROTX_IP_CHANGED = 5; + */ + GetMasternodeStatusResponse_Status[GetMasternodeStatusResponse_Status["PROTX_IP_CHANGED"] = 5] = "PROTX_IP_CHANGED"; + /** + * @generated from protobuf enum value: READY = 6; + */ + GetMasternodeStatusResponse_Status[GetMasternodeStatusResponse_Status["READY"] = 6] = "READY"; + /** + * @generated from protobuf enum value: ERROR = 7; + */ + GetMasternodeStatusResponse_Status[GetMasternodeStatusResponse_Status["ERROR"] = 7] = "ERROR"; +})(GetMasternodeStatusResponse_Status || (GetMasternodeStatusResponse_Status = {})); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockchainStatusRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockchainStatusRequest", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusRequest + */ +export const GetBlockchainStatusRequest = new GetBlockchainStatusRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockchainStatusResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockchainStatusResponse", [ + { no: 1, name: "version", kind: "message", T: () => GetBlockchainStatusResponse_Version }, + { no: 2, name: "time", kind: "message", T: () => GetBlockchainStatusResponse_Time }, + { no: 3, name: "status", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Status", GetBlockchainStatusResponse_Status] }, + { no: 4, name: "sync_progress", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, + { no: 5, name: "chain", kind: "message", T: () => GetBlockchainStatusResponse_Chain }, + { no: 7, name: "network", kind: "message", T: () => GetBlockchainStatusResponse_Network } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse + */ +export const GetBlockchainStatusResponse = new GetBlockchainStatusResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockchainStatusResponse_Version$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version", [ + { no: 1, name: "protocol", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "software", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "agent", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version + */ +export const GetBlockchainStatusResponse_Version = new GetBlockchainStatusResponse_Version$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockchainStatusResponse_Time$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time", [ + { no: 1, name: "now", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "offset", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 3, name: "median", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time + */ +export const GetBlockchainStatusResponse_Time = new GetBlockchainStatusResponse_Time$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockchainStatusResponse_Chain$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain", [ + { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "headers_count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "blocks_count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "best_block_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "difficulty", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, + { no: 6, name: "chain_work", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 7, name: "is_synced", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 8, name: "sync_progress", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain + */ +export const GetBlockchainStatusResponse_Chain = new GetBlockchainStatusResponse_Chain$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockchainStatusResponse_NetworkFee$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee", [ + { no: 1, name: "relay", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, + { no: 2, name: "incremental", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee + */ +export const GetBlockchainStatusResponse_NetworkFee = new GetBlockchainStatusResponse_NetworkFee$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockchainStatusResponse_Network$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network", [ + { no: 1, name: "peers_count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "fee", kind: "message", T: () => GetBlockchainStatusResponse_NetworkFee } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network + */ +export const GetBlockchainStatusResponse_Network = new GetBlockchainStatusResponse_Network$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetMasternodeStatusRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetMasternodeStatusRequest", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetMasternodeStatusRequest + */ +export const GetMasternodeStatusRequest = new GetMasternodeStatusRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetMasternodeStatusResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetMasternodeStatusResponse", [ + { no: 1, name: "status", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetMasternodeStatusResponse.Status", GetMasternodeStatusResponse_Status] }, + { no: 2, name: "pro_tx_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "pose_penalty", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "is_synced", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 5, name: "sync_progress", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetMasternodeStatusResponse + */ +export const GetMasternodeStatusResponse = new GetMasternodeStatusResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockRequest", [ + { no: 1, name: "height", kind: "scalar", oneof: "block", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "hash", kind: "scalar", oneof: "block", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockRequest + */ +export const GetBlockRequest = new GetBlockRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockResponse", [ + { no: 1, name: "block", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockResponse + */ +export const GetBlockResponse = new GetBlockResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBestBlockHeightRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBestBlockHeightRequest", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBestBlockHeightRequest + */ +export const GetBestBlockHeightRequest = new GetBestBlockHeightRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBestBlockHeightResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBestBlockHeightResponse", [ + { no: 1, name: "height", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBestBlockHeightResponse + */ +export const GetBestBlockHeightResponse = new GetBestBlockHeightResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BroadcastTransactionRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BroadcastTransactionRequest", [ + { no: 1, name: "transaction", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "allow_high_fees", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 3, name: "bypass_limits", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BroadcastTransactionRequest + */ +export const BroadcastTransactionRequest = new BroadcastTransactionRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BroadcastTransactionResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BroadcastTransactionResponse", [ + { no: 1, name: "transaction_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BroadcastTransactionResponse + */ +export const BroadcastTransactionResponse = new BroadcastTransactionResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTransactionRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTransactionRequest", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTransactionRequest + */ +export const GetTransactionRequest = new GetTransactionRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTransactionResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTransactionResponse", [ + { no: 1, name: "transaction", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "block_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "height", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "confirmations", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 5, name: "is_instant_locked", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "is_chain_locked", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTransactionResponse + */ +export const GetTransactionResponse = new GetTransactionResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BlockHeadersWithChainLocksRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest", [ + { no: 1, name: "from_block_hash", kind: "scalar", oneof: "fromBlock", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "from_block_height", kind: "scalar", oneof: "fromBlock", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest + */ +export const BlockHeadersWithChainLocksRequest = new BlockHeadersWithChainLocksRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BlockHeadersWithChainLocksResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse", [ + { no: 1, name: "block_headers", kind: "message", oneof: "responses", T: () => BlockHeaders }, + { no: 2, name: "chain_lock", kind: "scalar", oneof: "responses", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse + */ +export const BlockHeadersWithChainLocksResponse = new BlockHeadersWithChainLocksResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BlockHeaders$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BlockHeaders", [ + { no: 1, name: "headers", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BlockHeaders + */ +export const BlockHeaders = new BlockHeaders$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEstimatedTransactionFeeRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest", [ + { no: 1, name: "blocks", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest + */ +export const GetEstimatedTransactionFeeRequest = new GetEstimatedTransactionFeeRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEstimatedTransactionFeeResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse", [ + { no: 1, name: "fee", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse + */ +export const GetEstimatedTransactionFeeResponse = new GetEstimatedTransactionFeeResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class TransactionsWithProofsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.TransactionsWithProofsRequest", [ + { no: 1, name: "bloom_filter", kind: "message", T: () => BloomFilter }, + { no: 2, name: "from_block_hash", kind: "scalar", oneof: "fromBlock", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "from_block_height", kind: "scalar", oneof: "fromBlock", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 5, name: "send_transaction_hashes", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.TransactionsWithProofsRequest + */ +export const TransactionsWithProofsRequest = new TransactionsWithProofsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BloomFilter$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BloomFilter", [ + { no: 1, name: "v_data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "n_hash_funcs", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "n_tweak", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "n_flags", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BloomFilter + */ +export const BloomFilter = new BloomFilter$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class TransactionsWithProofsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.TransactionsWithProofsResponse", [ + { no: 1, name: "raw_transactions", kind: "message", oneof: "responses", T: () => RawTransactions }, + { no: 2, name: "instant_send_lock_messages", kind: "message", oneof: "responses", T: () => InstantSendLockMessages }, + { no: 3, name: "raw_merkle_block", kind: "scalar", oneof: "responses", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.TransactionsWithProofsResponse + */ +export const TransactionsWithProofsResponse = new TransactionsWithProofsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class RawTransactions$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.RawTransactions", [ + { no: 1, name: "transactions", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.RawTransactions + */ +export const RawTransactions = new RawTransactions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class InstantSendLockMessages$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.InstantSendLockMessages", [ + { no: 1, name: "messages", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.InstantSendLockMessages + */ +export const InstantSendLockMessages = new InstantSendLockMessages$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MasternodeListRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.MasternodeListRequest", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.MasternodeListRequest + */ +export const MasternodeListRequest = new MasternodeListRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MasternodeListResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.MasternodeListResponse", [ + { no: 1, name: "masternode_list_diff", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.MasternodeListResponse + */ +export const MasternodeListResponse = new MasternodeListResponse$Type(); +/** + * @generated ServiceType for protobuf service org.dash.platform.dapi.v0.Core + */ +export const Core = new ServiceType("org.dash.platform.dapi.v0.Core", [ + { name: "getBlockchainStatus", options: {}, I: GetBlockchainStatusRequest, O: GetBlockchainStatusResponse }, + { name: "getMasternodeStatus", options: {}, I: GetMasternodeStatusRequest, O: GetMasternodeStatusResponse }, + { name: "getBlock", options: {}, I: GetBlockRequest, O: GetBlockResponse }, + { name: "getBestBlockHeight", options: {}, I: GetBestBlockHeightRequest, O: GetBestBlockHeightResponse }, + { name: "broadcastTransaction", options: {}, I: BroadcastTransactionRequest, O: BroadcastTransactionResponse }, + { name: "getTransaction", options: {}, I: GetTransactionRequest, O: GetTransactionResponse }, + { name: "getEstimatedTransactionFee", options: {}, I: GetEstimatedTransactionFeeRequest, O: GetEstimatedTransactionFeeResponse }, + { name: "subscribeToBlockHeadersWithChainLocks", serverStreaming: true, options: {}, I: BlockHeadersWithChainLocksRequest, O: BlockHeadersWithChainLocksResponse }, + { name: "subscribeToTransactionsWithProofs", serverStreaming: true, options: {}, I: TransactionsWithProofsRequest, O: TransactionsWithProofsResponse }, + { name: "subscribeToMasternodeList", serverStreaming: true, options: {}, I: MasternodeListRequest, O: MasternodeListResponse } +]); diff --git a/built/DashPlatform.js/src/generated/google/protobuf/struct.d.ts b/built/DashPlatform.js/src/generated/google/protobuf/struct.d.ts new file mode 100644 index 0000000..f6906b1 --- /dev/null +++ b/built/DashPlatform.js/src/generated/google/protobuf/struct.d.ts @@ -0,0 +1,169 @@ +import type { JsonValue } from "@protobuf-ts/runtime"; +import type { JsonReadOptions } from "@protobuf-ts/runtime"; +import type { JsonWriteOptions } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * `Struct` represents a structured data value, consisting of fields + * which map to dynamically typed values. In some languages, `Struct` + * might be supported by a native representation. For example, in + * scripting languages like JS a struct is represented as an + * object. The details of that representation are described together + * with the proto support for the language. + * + * The JSON representation for `Struct` is JSON object. + * + * @generated from protobuf message google.protobuf.Struct + */ +export interface Struct { + /** + * Unordered map of dynamically typed values. + * + * @generated from protobuf field: map fields = 1; + */ + fields: { + [key: string]: Value; + }; +} +/** + * `Value` represents a dynamically typed value which can be either + * null, a number, a string, a boolean, a recursive struct value, or a + * list of values. A producer of value is expected to set one of these + * variants. Absence of any variant indicates an error. + * + * The JSON representation for `Value` is JSON value. + * + * @generated from protobuf message google.protobuf.Value + */ +export interface Value { + /** + * @generated from protobuf oneof: kind + */ + kind: { + oneofKind: "nullValue"; + /** + * Represents a null value. + * + * @generated from protobuf field: google.protobuf.NullValue null_value = 1; + */ + nullValue: NullValue; + } | { + oneofKind: "numberValue"; + /** + * Represents a double value. + * + * @generated from protobuf field: double number_value = 2; + */ + numberValue: number; + } | { + oneofKind: "stringValue"; + /** + * Represents a string value. + * + * @generated from protobuf field: string string_value = 3; + */ + stringValue: string; + } | { + oneofKind: "boolValue"; + /** + * Represents a boolean value. + * + * @generated from protobuf field: bool bool_value = 4; + */ + boolValue: boolean; + } | { + oneofKind: "structValue"; + /** + * Represents a structured value. + * + * @generated from protobuf field: google.protobuf.Struct struct_value = 5; + */ + structValue: Struct; + } | { + oneofKind: "listValue"; + /** + * Represents a repeated `Value`. + * + * @generated from protobuf field: google.protobuf.ListValue list_value = 6; + */ + listValue: ListValue; + } | { + oneofKind: undefined; + }; +} +/** + * `ListValue` is a wrapper around a repeated field of values. + * + * The JSON representation for `ListValue` is JSON array. + * + * @generated from protobuf message google.protobuf.ListValue + */ +export interface ListValue { + /** + * Repeated field of dynamically typed values. + * + * @generated from protobuf field: repeated google.protobuf.Value values = 1; + */ + values: Value[]; +} +/** + * `NullValue` is a singleton enumeration to represent the null value for the + * `Value` type union. + * + * The JSON representation for `NullValue` is JSON `null`. + * + * @generated from protobuf enum google.protobuf.NullValue + */ +export declare enum NullValue { + /** + * Null value. + * + * @generated from protobuf enum value: NULL_VALUE = 0; + */ + NULL_VALUE = 0 +} +declare class Struct$Type extends MessageType { + constructor(); + /** + * Encode `Struct` to JSON object. + */ + internalJsonWrite(message: Struct, options: JsonWriteOptions): JsonValue; + /** + * Decode `Struct` from JSON object. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Struct): Struct; +} +/** + * @generated MessageType for protobuf message google.protobuf.Struct + */ +export declare const Struct: Struct$Type; +declare class Value$Type extends MessageType { + constructor(); + /** + * Encode `Value` to JSON value. + */ + internalJsonWrite(message: Value, options: JsonWriteOptions): JsonValue; + /** + * Decode `Value` from JSON value. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Value): Value; +} +/** + * @generated MessageType for protobuf message google.protobuf.Value + */ +export declare const Value: Value$Type; +declare class ListValue$Type extends MessageType { + constructor(); + /** + * Encode `ListValue` to JSON array. + */ + internalJsonWrite(message: ListValue, options: JsonWriteOptions): JsonValue; + /** + * Decode `ListValue` from JSON array. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: ListValue): ListValue; +} +/** + * @generated MessageType for protobuf message google.protobuf.ListValue + */ +export declare const ListValue: ListValue$Type; +export {}; diff --git a/built/DashPlatform.js/src/generated/google/protobuf/struct.js b/built/DashPlatform.js/src/generated/google/protobuf/struct.js new file mode 100644 index 0000000..5bf247e --- /dev/null +++ b/built/DashPlatform.js/src/generated/google/protobuf/struct.js @@ -0,0 +1,195 @@ +// @generated by protobuf-ts 2.9.6 with parameter optimize_code_size +// @generated from protobuf file "google/protobuf/struct.proto" (package "google.protobuf", syntax proto3) +// tslint:disable +// +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +import { isJsonObject } from "@protobuf-ts/runtime"; +import { typeofJsonValue } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * `NullValue` is a singleton enumeration to represent the null value for the + * `Value` type union. + * + * The JSON representation for `NullValue` is JSON `null`. + * + * @generated from protobuf enum google.protobuf.NullValue + */ +export var NullValue; +(function (NullValue) { + /** + * Null value. + * + * @generated from protobuf enum value: NULL_VALUE = 0; + */ + NullValue[NullValue["NULL_VALUE"] = 0] = "NULL_VALUE"; +})(NullValue || (NullValue = {})); +// @generated message type with reflection information, may provide speed optimized methods +class Struct$Type extends MessageType { + constructor() { + super("google.protobuf.Struct", [ + { no: 1, name: "fields", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "message", T: () => Value } } + ]); + } + /** + * Encode `Struct` to JSON object. + */ + internalJsonWrite(message, options) { + let json = {}; + for (let [k, v] of Object.entries(message.fields)) { + json[k] = Value.toJson(v); + } + return json; + } + /** + * Decode `Struct` from JSON object. + */ + internalJsonRead(json, options, target) { + if (!isJsonObject(json)) + throw new globalThis.Error("Unable to parse message " + this.typeName + " from JSON " + typeofJsonValue(json) + "."); + if (!target) + target = this.create(); + for (let [k, v] of globalThis.Object.entries(json)) { + target.fields[k] = Value.fromJson(v); + } + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.Struct + */ +export const Struct = new Struct$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Value$Type extends MessageType { + constructor() { + super("google.protobuf.Value", [ + { no: 1, name: "null_value", kind: "enum", oneof: "kind", T: () => ["google.protobuf.NullValue", NullValue] }, + { no: 2, name: "number_value", kind: "scalar", oneof: "kind", T: 1 /*ScalarType.DOUBLE*/ }, + { no: 3, name: "string_value", kind: "scalar", oneof: "kind", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "bool_value", kind: "scalar", oneof: "kind", T: 8 /*ScalarType.BOOL*/ }, + { no: 5, name: "struct_value", kind: "message", oneof: "kind", T: () => Struct }, + { no: 6, name: "list_value", kind: "message", oneof: "kind", T: () => ListValue } + ]); + } + /** + * Encode `Value` to JSON value. + */ + internalJsonWrite(message, options) { + if (message.kind.oneofKind === undefined) + throw new globalThis.Error(); + switch (message.kind.oneofKind) { + case undefined: throw new globalThis.Error(); + case "boolValue": return message.kind.boolValue; + case "nullValue": return null; + case "numberValue": + let numberValue = message.kind.numberValue; + if (typeof numberValue == "number" && !Number.isFinite(numberValue)) + throw new globalThis.Error(); + return numberValue; + case "stringValue": return message.kind.stringValue; + case "listValue": + let listValueField = this.fields.find(f => f.no === 6); + if (listValueField?.kind !== "message") + throw new globalThis.Error(); + return listValueField.T().toJson(message.kind.listValue); + case "structValue": + let structValueField = this.fields.find(f => f.no === 5); + if (structValueField?.kind !== "message") + throw new globalThis.Error(); + return structValueField.T().toJson(message.kind.structValue); + } + } + /** + * Decode `Value` from JSON value. + */ + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + switch (typeof json) { + case "number": + target.kind = { oneofKind: "numberValue", numberValue: json }; + break; + case "string": + target.kind = { oneofKind: "stringValue", stringValue: json }; + break; + case "boolean": + target.kind = { oneofKind: "boolValue", boolValue: json }; + break; + case "object": + if (json === null) { + target.kind = { oneofKind: "nullValue", nullValue: NullValue.NULL_VALUE }; + } + else if (globalThis.Array.isArray(json)) { + target.kind = { oneofKind: "listValue", listValue: ListValue.fromJson(json) }; + } + else { + target.kind = { oneofKind: "structValue", structValue: Struct.fromJson(json) }; + } + break; + default: throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json)); + } + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.Value + */ +export const Value = new Value$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListValue$Type extends MessageType { + constructor() { + super("google.protobuf.ListValue", [ + { no: 1, name: "values", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Value } + ]); + } + /** + * Encode `ListValue` to JSON array. + */ + internalJsonWrite(message, options) { + return message.values.map(v => Value.toJson(v)); + } + /** + * Decode `ListValue` from JSON array. + */ + internalJsonRead(json, options, target) { + if (!globalThis.Array.isArray(json)) + throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json)); + if (!target) + target = this.create(); + let values = json.map(v => Value.fromJson(v)); + target.values.push(...values); + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.ListValue + */ +export const ListValue = new ListValue$Type(); diff --git a/built/DashPlatform.js/src/generated/google/protobuf/wrappers.d.ts b/built/DashPlatform.js/src/generated/google/protobuf/wrappers.d.ts new file mode 100644 index 0000000..8d2d695 --- /dev/null +++ b/built/DashPlatform.js/src/generated/google/protobuf/wrappers.d.ts @@ -0,0 +1,275 @@ +import type { JsonValue } from "@protobuf-ts/runtime"; +import type { JsonReadOptions } from "@protobuf-ts/runtime"; +import type { JsonWriteOptions } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * Wrapper message for `double`. + * + * The JSON representation for `DoubleValue` is JSON number. + * + * @generated from protobuf message google.protobuf.DoubleValue + */ +export interface DoubleValue { + /** + * The double value. + * + * @generated from protobuf field: double value = 1; + */ + value: number; +} +/** + * Wrapper message for `float`. + * + * The JSON representation for `FloatValue` is JSON number. + * + * @generated from protobuf message google.protobuf.FloatValue + */ +export interface FloatValue { + /** + * The float value. + * + * @generated from protobuf field: float value = 1; + */ + value: number; +} +/** + * Wrapper message for `int64`. + * + * The JSON representation for `Int64Value` is JSON string. + * + * @generated from protobuf message google.protobuf.Int64Value + */ +export interface Int64Value { + /** + * The int64 value. + * + * @generated from protobuf field: int64 value = 1; + */ + value: bigint; +} +/** + * Wrapper message for `uint64`. + * + * The JSON representation for `UInt64Value` is JSON string. + * + * @generated from protobuf message google.protobuf.UInt64Value + */ +export interface UInt64Value { + /** + * The uint64 value. + * + * @generated from protobuf field: uint64 value = 1; + */ + value: bigint; +} +/** + * Wrapper message for `int32`. + * + * The JSON representation for `Int32Value` is JSON number. + * + * @generated from protobuf message google.protobuf.Int32Value + */ +export interface Int32Value { + /** + * The int32 value. + * + * @generated from protobuf field: int32 value = 1; + */ + value: number; +} +/** + * Wrapper message for `uint32`. + * + * The JSON representation for `UInt32Value` is JSON number. + * + * @generated from protobuf message google.protobuf.UInt32Value + */ +export interface UInt32Value { + /** + * The uint32 value. + * + * @generated from protobuf field: uint32 value = 1; + */ + value: number; +} +/** + * Wrapper message for `bool`. + * + * The JSON representation for `BoolValue` is JSON `true` and `false`. + * + * @generated from protobuf message google.protobuf.BoolValue + */ +export interface BoolValue { + /** + * The bool value. + * + * @generated from protobuf field: bool value = 1; + */ + value: boolean; +} +/** + * Wrapper message for `string`. + * + * The JSON representation for `StringValue` is JSON string. + * + * @generated from protobuf message google.protobuf.StringValue + */ +export interface StringValue { + /** + * The string value. + * + * @generated from protobuf field: string value = 1; + */ + value: string; +} +/** + * Wrapper message for `bytes`. + * + * The JSON representation for `BytesValue` is JSON string. + * + * @generated from protobuf message google.protobuf.BytesValue + */ +export interface BytesValue { + /** + * The bytes value. + * + * @generated from protobuf field: bytes value = 1; + */ + value: Uint8Array; +} +declare class DoubleValue$Type extends MessageType { + constructor(); + /** + * Encode `DoubleValue` to JSON number. + */ + internalJsonWrite(message: DoubleValue, options: JsonWriteOptions): JsonValue; + /** + * Decode `DoubleValue` from JSON number. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: DoubleValue): DoubleValue; +} +/** + * @generated MessageType for protobuf message google.protobuf.DoubleValue + */ +export declare const DoubleValue: DoubleValue$Type; +declare class FloatValue$Type extends MessageType { + constructor(); + /** + * Encode `FloatValue` to JSON number. + */ + internalJsonWrite(message: FloatValue, options: JsonWriteOptions): JsonValue; + /** + * Decode `FloatValue` from JSON number. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: FloatValue): FloatValue; +} +/** + * @generated MessageType for protobuf message google.protobuf.FloatValue + */ +export declare const FloatValue: FloatValue$Type; +declare class Int64Value$Type extends MessageType { + constructor(); + /** + * Encode `Int64Value` to JSON string. + */ + internalJsonWrite(message: Int64Value, options: JsonWriteOptions): JsonValue; + /** + * Decode `Int64Value` from JSON string. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Int64Value): Int64Value; +} +/** + * @generated MessageType for protobuf message google.protobuf.Int64Value + */ +export declare const Int64Value: Int64Value$Type; +declare class UInt64Value$Type extends MessageType { + constructor(); + /** + * Encode `UInt64Value` to JSON string. + */ + internalJsonWrite(message: UInt64Value, options: JsonWriteOptions): JsonValue; + /** + * Decode `UInt64Value` from JSON string. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: UInt64Value): UInt64Value; +} +/** + * @generated MessageType for protobuf message google.protobuf.UInt64Value + */ +export declare const UInt64Value: UInt64Value$Type; +declare class Int32Value$Type extends MessageType { + constructor(); + /** + * Encode `Int32Value` to JSON string. + */ + internalJsonWrite(message: Int32Value, options: JsonWriteOptions): JsonValue; + /** + * Decode `Int32Value` from JSON string. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Int32Value): Int32Value; +} +/** + * @generated MessageType for protobuf message google.protobuf.Int32Value + */ +export declare const Int32Value: Int32Value$Type; +declare class UInt32Value$Type extends MessageType { + constructor(); + /** + * Encode `UInt32Value` to JSON string. + */ + internalJsonWrite(message: UInt32Value, options: JsonWriteOptions): JsonValue; + /** + * Decode `UInt32Value` from JSON string. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: UInt32Value): UInt32Value; +} +/** + * @generated MessageType for protobuf message google.protobuf.UInt32Value + */ +export declare const UInt32Value: UInt32Value$Type; +declare class BoolValue$Type extends MessageType { + constructor(); + /** + * Encode `BoolValue` to JSON bool. + */ + internalJsonWrite(message: BoolValue, options: JsonWriteOptions): JsonValue; + /** + * Decode `BoolValue` from JSON bool. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: BoolValue): BoolValue; +} +/** + * @generated MessageType for protobuf message google.protobuf.BoolValue + */ +export declare const BoolValue: BoolValue$Type; +declare class StringValue$Type extends MessageType { + constructor(); + /** + * Encode `StringValue` to JSON string. + */ + internalJsonWrite(message: StringValue, options: JsonWriteOptions): JsonValue; + /** + * Decode `StringValue` from JSON string. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: StringValue): StringValue; +} +/** + * @generated MessageType for protobuf message google.protobuf.StringValue + */ +export declare const StringValue: StringValue$Type; +declare class BytesValue$Type extends MessageType { + constructor(); + /** + * Encode `BytesValue` to JSON string. + */ + internalJsonWrite(message: BytesValue, options: JsonWriteOptions): JsonValue; + /** + * Decode `BytesValue` from JSON string. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: BytesValue): BytesValue; +} +/** + * @generated MessageType for protobuf message google.protobuf.BytesValue + */ +export declare const BytesValue: BytesValue$Type; +export {}; diff --git a/built/DashPlatform.js/src/generated/google/protobuf/wrappers.js b/built/DashPlatform.js/src/generated/google/protobuf/wrappers.js new file mode 100644 index 0000000..7e4c36a --- /dev/null +++ b/built/DashPlatform.js/src/generated/google/protobuf/wrappers.js @@ -0,0 +1,290 @@ +// @generated by protobuf-ts 2.9.6 with parameter optimize_code_size +// @generated from protobuf file "google/protobuf/wrappers.proto" (package "google.protobuf", syntax proto3) +// tslint:disable +// +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Wrappers for primitive (non-message) types. These types are useful +// for embedding primitives in the `google.protobuf.Any` type and for places +// where we need to distinguish between the absence of a primitive +// typed field and its default value. +// +// These wrappers have no meaningful use within repeated fields as they lack +// the ability to detect presence on individual elements. +// These wrappers have no meaningful use within a map or a oneof since +// individual entries of a map or fields of a oneof can already detect presence. +// +import { ScalarType } from "@protobuf-ts/runtime"; +import { LongType } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +// @generated message type with reflection information, may provide speed optimized methods +class DoubleValue$Type extends MessageType { + constructor() { + super("google.protobuf.DoubleValue", [ + { no: 1, name: "value", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ } + ]); + } + /** + * Encode `DoubleValue` to JSON number. + */ + internalJsonWrite(message, options) { + return this.refJsonWriter.scalar(2, message.value, "value", false, true); + } + /** + * Decode `DoubleValue` from JSON number. + */ + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 1, undefined, "value"); + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.DoubleValue + */ +export const DoubleValue = new DoubleValue$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FloatValue$Type extends MessageType { + constructor() { + super("google.protobuf.FloatValue", [ + { no: 1, name: "value", kind: "scalar", T: 2 /*ScalarType.FLOAT*/ } + ]); + } + /** + * Encode `FloatValue` to JSON number. + */ + internalJsonWrite(message, options) { + return this.refJsonWriter.scalar(1, message.value, "value", false, true); + } + /** + * Decode `FloatValue` from JSON number. + */ + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 1, undefined, "value"); + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FloatValue + */ +export const FloatValue = new FloatValue$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Int64Value$Type extends MessageType { + constructor() { + super("google.protobuf.Int64Value", [ + { no: 1, name: "value", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } + /** + * Encode `Int64Value` to JSON string. + */ + internalJsonWrite(message, options) { + return this.refJsonWriter.scalar(ScalarType.INT64, message.value, "value", false, true); + } + /** + * Decode `Int64Value` from JSON string. + */ + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, ScalarType.INT64, LongType.BIGINT, "value"); + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.Int64Value + */ +export const Int64Value = new Int64Value$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UInt64Value$Type extends MessageType { + constructor() { + super("google.protobuf.UInt64Value", [ + { no: 1, name: "value", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } + /** + * Encode `UInt64Value` to JSON string. + */ + internalJsonWrite(message, options) { + return this.refJsonWriter.scalar(ScalarType.UINT64, message.value, "value", false, true); + } + /** + * Decode `UInt64Value` from JSON string. + */ + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, ScalarType.UINT64, LongType.BIGINT, "value"); + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.UInt64Value + */ +export const UInt64Value = new UInt64Value$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Int32Value$Type extends MessageType { + constructor() { + super("google.protobuf.Int32Value", [ + { no: 1, name: "value", kind: "scalar", T: 5 /*ScalarType.INT32*/ } + ]); + } + /** + * Encode `Int32Value` to JSON string. + */ + internalJsonWrite(message, options) { + return this.refJsonWriter.scalar(5, message.value, "value", false, true); + } + /** + * Decode `Int32Value` from JSON string. + */ + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 5, undefined, "value"); + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.Int32Value + */ +export const Int32Value = new Int32Value$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UInt32Value$Type extends MessageType { + constructor() { + super("google.protobuf.UInt32Value", [ + { no: 1, name: "value", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } + /** + * Encode `UInt32Value` to JSON string. + */ + internalJsonWrite(message, options) { + return this.refJsonWriter.scalar(13, message.value, "value", false, true); + } + /** + * Decode `UInt32Value` from JSON string. + */ + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 13, undefined, "value"); + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.UInt32Value + */ +export const UInt32Value = new UInt32Value$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BoolValue$Type extends MessageType { + constructor() { + super("google.protobuf.BoolValue", [ + { no: 1, name: "value", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } + /** + * Encode `BoolValue` to JSON bool. + */ + internalJsonWrite(message, options) { + return message.value; + } + /** + * Decode `BoolValue` from JSON bool. + */ + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 8, undefined, "value"); + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.BoolValue + */ +export const BoolValue = new BoolValue$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class StringValue$Type extends MessageType { + constructor() { + super("google.protobuf.StringValue", [ + { no: 1, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + /** + * Encode `StringValue` to JSON string. + */ + internalJsonWrite(message, options) { + return message.value; + } + /** + * Decode `StringValue` from JSON string. + */ + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 9, undefined, "value"); + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.StringValue + */ +export const StringValue = new StringValue$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BytesValue$Type extends MessageType { + constructor() { + super("google.protobuf.BytesValue", [ + { no: 1, name: "value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } + /** + * Encode `BytesValue` to JSON string. + */ + internalJsonWrite(message, options) { + return this.refJsonWriter.scalar(12, message.value, "value", false, true); + } + /** + * Decode `BytesValue` from JSON string. + */ + internalJsonRead(json, options, target) { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 12, undefined, "value"); + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.BytesValue + */ +export const BytesValue = new BytesValue$Type(); diff --git a/built/DashPlatform.js/src/generated/platform/v0/platform.client.d.ts b/built/DashPlatform.js/src/generated/platform/v0/platform.client.d.ts new file mode 100644 index 0000000..32c98df --- /dev/null +++ b/built/DashPlatform.js/src/generated/platform/v0/platform.client.d.ts @@ -0,0 +1,470 @@ +import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; +import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; +import type { GetGroupActionSignersResponse } from "./platform.ts"; +import type { GetGroupActionSignersRequest } from "./platform.ts"; +import type { GetGroupActionsResponse } from "./platform.ts"; +import type { GetGroupActionsRequest } from "./platform.ts"; +import type { GetGroupInfosResponse } from "./platform.ts"; +import type { GetGroupInfosRequest } from "./platform.ts"; +import type { GetGroupInfoResponse } from "./platform.ts"; +import type { GetGroupInfoRequest } from "./platform.ts"; +import type { GetTokenTotalSupplyResponse } from "./platform.ts"; +import type { GetTokenTotalSupplyRequest } from "./platform.ts"; +import type { GetTokenPreProgrammedDistributionsResponse } from "./platform.ts"; +import type { GetTokenPreProgrammedDistributionsRequest } from "./platform.ts"; +import type { GetTokenStatusesResponse } from "./platform.ts"; +import type { GetTokenStatusesRequest } from "./platform.ts"; +import type { GetIdentitiesTokenInfosResponse } from "./platform.ts"; +import type { GetIdentitiesTokenInfosRequest } from "./platform.ts"; +import type { GetIdentityTokenInfosResponse } from "./platform.ts"; +import type { GetIdentityTokenInfosRequest } from "./platform.ts"; +import type { GetIdentitiesTokenBalancesResponse } from "./platform.ts"; +import type { GetIdentitiesTokenBalancesRequest } from "./platform.ts"; +import type { GetIdentityTokenBalancesResponse } from "./platform.ts"; +import type { GetIdentityTokenBalancesRequest } from "./platform.ts"; +import type { GetCurrentQuorumsInfoResponse } from "./platform.ts"; +import type { GetCurrentQuorumsInfoRequest } from "./platform.ts"; +import type { GetStatusResponse } from "./platform.ts"; +import type { GetStatusRequest } from "./platform.ts"; +import type { GetPathElementsResponse } from "./platform.ts"; +import type { GetPathElementsRequest } from "./platform.ts"; +import type { GetTotalCreditsInPlatformResponse } from "./platform.ts"; +import type { GetTotalCreditsInPlatformRequest } from "./platform.ts"; +import type { GetPrefundedSpecializedBalanceResponse } from "./platform.ts"; +import type { GetPrefundedSpecializedBalanceRequest } from "./platform.ts"; +import type { GetVotePollsByEndDateResponse } from "./platform.ts"; +import type { GetVotePollsByEndDateRequest } from "./platform.ts"; +import type { GetContestedResourceIdentityVotesResponse } from "./platform.ts"; +import type { GetContestedResourceIdentityVotesRequest } from "./platform.ts"; +import type { GetContestedResourceVotersForIdentityResponse } from "./platform.ts"; +import type { GetContestedResourceVotersForIdentityRequest } from "./platform.ts"; +import type { GetContestedResourceVoteStateResponse } from "./platform.ts"; +import type { GetContestedResourceVoteStateRequest } from "./platform.ts"; +import type { GetContestedResourcesResponse } from "./platform.ts"; +import type { GetContestedResourcesRequest } from "./platform.ts"; +import type { GetEpochsInfoResponse } from "./platform.ts"; +import type { GetEpochsInfoRequest } from "./platform.ts"; +import type { GetProtocolVersionUpgradeVoteStatusResponse } from "./platform.ts"; +import type { GetProtocolVersionUpgradeVoteStatusRequest } from "./platform.ts"; +import type { GetProtocolVersionUpgradeStateResponse } from "./platform.ts"; +import type { GetProtocolVersionUpgradeStateRequest } from "./platform.ts"; +import type { GetConsensusParamsResponse } from "./platform.ts"; +import type { GetConsensusParamsRequest } from "./platform.ts"; +import type { WaitForStateTransitionResultResponse } from "./platform.ts"; +import type { WaitForStateTransitionResultRequest } from "./platform.ts"; +import type { GetIdentityByPublicKeyHashResponse } from "./platform.ts"; +import type { GetIdentityByPublicKeyHashRequest } from "./platform.ts"; +import type { GetDocumentsResponse } from "./platform.ts"; +import type { GetDocumentsRequest } from "./platform.ts"; +import type { GetDataContractsResponse } from "./platform.ts"; +import type { GetDataContractsRequest } from "./platform.ts"; +import type { GetDataContractHistoryResponse } from "./platform.ts"; +import type { GetDataContractHistoryRequest } from "./platform.ts"; +import type { GetDataContractResponse } from "./platform.ts"; +import type { GetDataContractRequest } from "./platform.ts"; +import type { GetProofsResponse } from "./platform.ts"; +import type { GetProofsRequest } from "./platform.ts"; +import type { GetEvonodesProposedEpochBlocksByRangeRequest } from "./platform.ts"; +import type { GetEvonodesProposedEpochBlocksResponse } from "./platform.ts"; +import type { GetEvonodesProposedEpochBlocksByIdsRequest } from "./platform.ts"; +import type { GetIdentityBalanceAndRevisionResponse } from "./platform.ts"; +import type { GetIdentityBalanceAndRevisionRequest } from "./platform.ts"; +import type { GetIdentitiesBalancesResponse } from "./platform.ts"; +import type { GetIdentitiesBalancesRequest } from "./platform.ts"; +import type { GetIdentityBalanceResponse } from "./platform.ts"; +import type { GetIdentityBalanceRequest } from "./platform.ts"; +import type { GetIdentityContractNonceResponse } from "./platform.ts"; +import type { GetIdentityContractNonceRequest } from "./platform.ts"; +import type { GetIdentityNonceResponse } from "./platform.ts"; +import type { GetIdentityNonceRequest } from "./platform.ts"; +import type { GetIdentitiesContractKeysResponse } from "./platform.ts"; +import type { GetIdentitiesContractKeysRequest } from "./platform.ts"; +import type { GetIdentityKeysResponse } from "./platform.ts"; +import type { GetIdentityKeysRequest } from "./platform.ts"; +import type { GetIdentityResponse } from "./platform.ts"; +import type { GetIdentityRequest } from "./platform.ts"; +import type { BroadcastStateTransitionResponse } from "./platform.ts"; +import type { BroadcastStateTransitionRequest } from "./platform.ts"; +import type { UnaryCall } from "@protobuf-ts/runtime-rpc"; +import type { RpcOptions } from "@protobuf-ts/runtime-rpc"; +/** + * @generated from protobuf service org.dash.platform.dapi.v0.Platform + */ +export interface IPlatformClient { + /** + * @generated from protobuf rpc: broadcastStateTransition(org.dash.platform.dapi.v0.BroadcastStateTransitionRequest) returns (org.dash.platform.dapi.v0.BroadcastStateTransitionResponse); + */ + broadcastStateTransition(input: BroadcastStateTransitionRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentity(org.dash.platform.dapi.v0.GetIdentityRequest) returns (org.dash.platform.dapi.v0.GetIdentityResponse); + */ + getIdentity(input: GetIdentityRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityKeys(org.dash.platform.dapi.v0.GetIdentityKeysRequest) returns (org.dash.platform.dapi.v0.GetIdentityKeysResponse); + */ + getIdentityKeys(input: GetIdentityKeysRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentitiesContractKeys(org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse); + */ + getIdentitiesContractKeys(input: GetIdentitiesContractKeysRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityNonce(org.dash.platform.dapi.v0.GetIdentityNonceRequest) returns (org.dash.platform.dapi.v0.GetIdentityNonceResponse); + */ + getIdentityNonce(input: GetIdentityNonceRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityContractNonce(org.dash.platform.dapi.v0.GetIdentityContractNonceRequest) returns (org.dash.platform.dapi.v0.GetIdentityContractNonceResponse); + */ + getIdentityContractNonce(input: GetIdentityContractNonceRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityBalance(org.dash.platform.dapi.v0.GetIdentityBalanceRequest) returns (org.dash.platform.dapi.v0.GetIdentityBalanceResponse); + */ + getIdentityBalance(input: GetIdentityBalanceRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentitiesBalances(org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse); + */ + getIdentitiesBalances(input: GetIdentitiesBalancesRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityBalanceAndRevision(org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest) returns (org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse); + */ + getIdentityBalanceAndRevision(input: GetIdentityBalanceAndRevisionRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getEvonodesProposedEpochBlocksByIds(org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest) returns (org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse); + */ + getEvonodesProposedEpochBlocksByIds(input: GetEvonodesProposedEpochBlocksByIdsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getEvonodesProposedEpochBlocksByRange(org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest) returns (org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse); + */ + getEvonodesProposedEpochBlocksByRange(input: GetEvonodesProposedEpochBlocksByRangeRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getProofs(org.dash.platform.dapi.v0.GetProofsRequest) returns (org.dash.platform.dapi.v0.GetProofsResponse); + */ + getProofs(input: GetProofsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getDataContract(org.dash.platform.dapi.v0.GetDataContractRequest) returns (org.dash.platform.dapi.v0.GetDataContractResponse); + */ + getDataContract(input: GetDataContractRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getDataContractHistory(org.dash.platform.dapi.v0.GetDataContractHistoryRequest) returns (org.dash.platform.dapi.v0.GetDataContractHistoryResponse); + */ + getDataContractHistory(input: GetDataContractHistoryRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getDataContracts(org.dash.platform.dapi.v0.GetDataContractsRequest) returns (org.dash.platform.dapi.v0.GetDataContractsResponse); + */ + getDataContracts(input: GetDataContractsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getDocuments(org.dash.platform.dapi.v0.GetDocumentsRequest) returns (org.dash.platform.dapi.v0.GetDocumentsResponse); + */ + getDocuments(input: GetDocumentsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityByPublicKeyHash(org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest) returns (org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse); + */ + getIdentityByPublicKeyHash(input: GetIdentityByPublicKeyHashRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: waitForStateTransitionResult(org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest) returns (org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse); + */ + waitForStateTransitionResult(input: WaitForStateTransitionResultRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getConsensusParams(org.dash.platform.dapi.v0.GetConsensusParamsRequest) returns (org.dash.platform.dapi.v0.GetConsensusParamsResponse); + */ + getConsensusParams(input: GetConsensusParamsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getProtocolVersionUpgradeState(org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest) returns (org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse); + */ + getProtocolVersionUpgradeState(input: GetProtocolVersionUpgradeStateRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getProtocolVersionUpgradeVoteStatus(org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest) returns (org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse); + */ + getProtocolVersionUpgradeVoteStatus(input: GetProtocolVersionUpgradeVoteStatusRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getEpochsInfo(org.dash.platform.dapi.v0.GetEpochsInfoRequest) returns (org.dash.platform.dapi.v0.GetEpochsInfoResponse); + */ + getEpochsInfo(input: GetEpochsInfoRequest, options?: RpcOptions): UnaryCall; + /** + * What votes are currently happening for a specific contested index + * + * @generated from protobuf rpc: getContestedResources(org.dash.platform.dapi.v0.GetContestedResourcesRequest) returns (org.dash.platform.dapi.v0.GetContestedResourcesResponse); + */ + getContestedResources(input: GetContestedResourcesRequest, options?: RpcOptions): UnaryCall; + /** + * What's the state of a contested resource vote? (ie who is winning?) + * + * @generated from protobuf rpc: getContestedResourceVoteState(org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse); + */ + getContestedResourceVoteState(input: GetContestedResourceVoteStateRequest, options?: RpcOptions): UnaryCall; + /** + * Who voted for a contested resource to go to a specific identity? + * + * @generated from protobuf rpc: getContestedResourceVotersForIdentity(org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse); + */ + getContestedResourceVotersForIdentity(input: GetContestedResourceVotersForIdentityRequest, options?: RpcOptions): UnaryCall; + /** + * How did an identity vote? + * + * @generated from protobuf rpc: getContestedResourceIdentityVotes(org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse); + */ + getContestedResourceIdentityVotes(input: GetContestedResourceIdentityVotesRequest, options?: RpcOptions): UnaryCall; + /** + * What vote polls will end soon? + * + * @generated from protobuf rpc: getVotePollsByEndDate(org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest) returns (org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse); + */ + getVotePollsByEndDate(input: GetVotePollsByEndDateRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getPrefundedSpecializedBalance(org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest) returns (org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse); + */ + getPrefundedSpecializedBalance(input: GetPrefundedSpecializedBalanceRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTotalCreditsInPlatform(org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest) returns (org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse); + */ + getTotalCreditsInPlatform(input: GetTotalCreditsInPlatformRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getPathElements(org.dash.platform.dapi.v0.GetPathElementsRequest) returns (org.dash.platform.dapi.v0.GetPathElementsResponse); + */ + getPathElements(input: GetPathElementsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getStatus(org.dash.platform.dapi.v0.GetStatusRequest) returns (org.dash.platform.dapi.v0.GetStatusResponse); + */ + getStatus(input: GetStatusRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getCurrentQuorumsInfo(org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest) returns (org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse); + */ + getCurrentQuorumsInfo(input: GetCurrentQuorumsInfoRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityTokenBalances(org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse); + */ + getIdentityTokenBalances(input: GetIdentityTokenBalancesRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentitiesTokenBalances(org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse); + */ + getIdentitiesTokenBalances(input: GetIdentitiesTokenBalancesRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityTokenInfos(org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest) returns (org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse); + */ + getIdentityTokenInfos(input: GetIdentityTokenInfosRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentitiesTokenInfos(org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse); + */ + getIdentitiesTokenInfos(input: GetIdentitiesTokenInfosRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTokenStatuses(org.dash.platform.dapi.v0.GetTokenStatusesRequest) returns (org.dash.platform.dapi.v0.GetTokenStatusesResponse); + */ + getTokenStatuses(input: GetTokenStatusesRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTokenPreProgrammedDistributions(org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest) returns (org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse); + */ + getTokenPreProgrammedDistributions(input: GetTokenPreProgrammedDistributionsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTokenTotalSupply(org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest) returns (org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse); + */ + getTokenTotalSupply(input: GetTokenTotalSupplyRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getGroupInfo(org.dash.platform.dapi.v0.GetGroupInfoRequest) returns (org.dash.platform.dapi.v0.GetGroupInfoResponse); + */ + getGroupInfo(input: GetGroupInfoRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getGroupInfos(org.dash.platform.dapi.v0.GetGroupInfosRequest) returns (org.dash.platform.dapi.v0.GetGroupInfosResponse); + */ + getGroupInfos(input: GetGroupInfosRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getGroupActions(org.dash.platform.dapi.v0.GetGroupActionsRequest) returns (org.dash.platform.dapi.v0.GetGroupActionsResponse); + */ + getGroupActions(input: GetGroupActionsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getGroupActionSigners(org.dash.platform.dapi.v0.GetGroupActionSignersRequest) returns (org.dash.platform.dapi.v0.GetGroupActionSignersResponse); + */ + getGroupActionSigners(input: GetGroupActionSignersRequest, options?: RpcOptions): UnaryCall; +} +/** + * @generated from protobuf service org.dash.platform.dapi.v0.Platform + */ +export declare class PlatformClient implements IPlatformClient, ServiceInfo { + private readonly _transport; + typeName: string; + methods: import("@protobuf-ts/runtime-rpc").MethodInfo[]; + options: { + [extensionName: string]: import("@protobuf-ts/runtime").JsonValue; + }; + constructor(_transport: RpcTransport); + /** + * @generated from protobuf rpc: broadcastStateTransition(org.dash.platform.dapi.v0.BroadcastStateTransitionRequest) returns (org.dash.platform.dapi.v0.BroadcastStateTransitionResponse); + */ + broadcastStateTransition(input: BroadcastStateTransitionRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentity(org.dash.platform.dapi.v0.GetIdentityRequest) returns (org.dash.platform.dapi.v0.GetIdentityResponse); + */ + getIdentity(input: GetIdentityRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityKeys(org.dash.platform.dapi.v0.GetIdentityKeysRequest) returns (org.dash.platform.dapi.v0.GetIdentityKeysResponse); + */ + getIdentityKeys(input: GetIdentityKeysRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentitiesContractKeys(org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse); + */ + getIdentitiesContractKeys(input: GetIdentitiesContractKeysRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityNonce(org.dash.platform.dapi.v0.GetIdentityNonceRequest) returns (org.dash.platform.dapi.v0.GetIdentityNonceResponse); + */ + getIdentityNonce(input: GetIdentityNonceRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityContractNonce(org.dash.platform.dapi.v0.GetIdentityContractNonceRequest) returns (org.dash.platform.dapi.v0.GetIdentityContractNonceResponse); + */ + getIdentityContractNonce(input: GetIdentityContractNonceRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityBalance(org.dash.platform.dapi.v0.GetIdentityBalanceRequest) returns (org.dash.platform.dapi.v0.GetIdentityBalanceResponse); + */ + getIdentityBalance(input: GetIdentityBalanceRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentitiesBalances(org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse); + */ + getIdentitiesBalances(input: GetIdentitiesBalancesRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityBalanceAndRevision(org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest) returns (org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse); + */ + getIdentityBalanceAndRevision(input: GetIdentityBalanceAndRevisionRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getEvonodesProposedEpochBlocksByIds(org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest) returns (org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse); + */ + getEvonodesProposedEpochBlocksByIds(input: GetEvonodesProposedEpochBlocksByIdsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getEvonodesProposedEpochBlocksByRange(org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest) returns (org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse); + */ + getEvonodesProposedEpochBlocksByRange(input: GetEvonodesProposedEpochBlocksByRangeRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getProofs(org.dash.platform.dapi.v0.GetProofsRequest) returns (org.dash.platform.dapi.v0.GetProofsResponse); + */ + getProofs(input: GetProofsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getDataContract(org.dash.platform.dapi.v0.GetDataContractRequest) returns (org.dash.platform.dapi.v0.GetDataContractResponse); + */ + getDataContract(input: GetDataContractRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getDataContractHistory(org.dash.platform.dapi.v0.GetDataContractHistoryRequest) returns (org.dash.platform.dapi.v0.GetDataContractHistoryResponse); + */ + getDataContractHistory(input: GetDataContractHistoryRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getDataContracts(org.dash.platform.dapi.v0.GetDataContractsRequest) returns (org.dash.platform.dapi.v0.GetDataContractsResponse); + */ + getDataContracts(input: GetDataContractsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getDocuments(org.dash.platform.dapi.v0.GetDocumentsRequest) returns (org.dash.platform.dapi.v0.GetDocumentsResponse); + */ + getDocuments(input: GetDocumentsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityByPublicKeyHash(org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest) returns (org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse); + */ + getIdentityByPublicKeyHash(input: GetIdentityByPublicKeyHashRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: waitForStateTransitionResult(org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest) returns (org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse); + */ + waitForStateTransitionResult(input: WaitForStateTransitionResultRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getConsensusParams(org.dash.platform.dapi.v0.GetConsensusParamsRequest) returns (org.dash.platform.dapi.v0.GetConsensusParamsResponse); + */ + getConsensusParams(input: GetConsensusParamsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getProtocolVersionUpgradeState(org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest) returns (org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse); + */ + getProtocolVersionUpgradeState(input: GetProtocolVersionUpgradeStateRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getProtocolVersionUpgradeVoteStatus(org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest) returns (org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse); + */ + getProtocolVersionUpgradeVoteStatus(input: GetProtocolVersionUpgradeVoteStatusRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getEpochsInfo(org.dash.platform.dapi.v0.GetEpochsInfoRequest) returns (org.dash.platform.dapi.v0.GetEpochsInfoResponse); + */ + getEpochsInfo(input: GetEpochsInfoRequest, options?: RpcOptions): UnaryCall; + /** + * What votes are currently happening for a specific contested index + * + * @generated from protobuf rpc: getContestedResources(org.dash.platform.dapi.v0.GetContestedResourcesRequest) returns (org.dash.platform.dapi.v0.GetContestedResourcesResponse); + */ + getContestedResources(input: GetContestedResourcesRequest, options?: RpcOptions): UnaryCall; + /** + * What's the state of a contested resource vote? (ie who is winning?) + * + * @generated from protobuf rpc: getContestedResourceVoteState(org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse); + */ + getContestedResourceVoteState(input: GetContestedResourceVoteStateRequest, options?: RpcOptions): UnaryCall; + /** + * Who voted for a contested resource to go to a specific identity? + * + * @generated from protobuf rpc: getContestedResourceVotersForIdentity(org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse); + */ + getContestedResourceVotersForIdentity(input: GetContestedResourceVotersForIdentityRequest, options?: RpcOptions): UnaryCall; + /** + * How did an identity vote? + * + * @generated from protobuf rpc: getContestedResourceIdentityVotes(org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse); + */ + getContestedResourceIdentityVotes(input: GetContestedResourceIdentityVotesRequest, options?: RpcOptions): UnaryCall; + /** + * What vote polls will end soon? + * + * @generated from protobuf rpc: getVotePollsByEndDate(org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest) returns (org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse); + */ + getVotePollsByEndDate(input: GetVotePollsByEndDateRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getPrefundedSpecializedBalance(org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest) returns (org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse); + */ + getPrefundedSpecializedBalance(input: GetPrefundedSpecializedBalanceRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTotalCreditsInPlatform(org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest) returns (org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse); + */ + getTotalCreditsInPlatform(input: GetTotalCreditsInPlatformRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getPathElements(org.dash.platform.dapi.v0.GetPathElementsRequest) returns (org.dash.platform.dapi.v0.GetPathElementsResponse); + */ + getPathElements(input: GetPathElementsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getStatus(org.dash.platform.dapi.v0.GetStatusRequest) returns (org.dash.platform.dapi.v0.GetStatusResponse); + */ + getStatus(input: GetStatusRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getCurrentQuorumsInfo(org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest) returns (org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse); + */ + getCurrentQuorumsInfo(input: GetCurrentQuorumsInfoRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityTokenBalances(org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse); + */ + getIdentityTokenBalances(input: GetIdentityTokenBalancesRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentitiesTokenBalances(org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse); + */ + getIdentitiesTokenBalances(input: GetIdentitiesTokenBalancesRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityTokenInfos(org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest) returns (org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse); + */ + getIdentityTokenInfos(input: GetIdentityTokenInfosRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentitiesTokenInfos(org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse); + */ + getIdentitiesTokenInfos(input: GetIdentitiesTokenInfosRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTokenStatuses(org.dash.platform.dapi.v0.GetTokenStatusesRequest) returns (org.dash.platform.dapi.v0.GetTokenStatusesResponse); + */ + getTokenStatuses(input: GetTokenStatusesRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTokenPreProgrammedDistributions(org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest) returns (org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse); + */ + getTokenPreProgrammedDistributions(input: GetTokenPreProgrammedDistributionsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTokenTotalSupply(org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest) returns (org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse); + */ + getTokenTotalSupply(input: GetTokenTotalSupplyRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getGroupInfo(org.dash.platform.dapi.v0.GetGroupInfoRequest) returns (org.dash.platform.dapi.v0.GetGroupInfoResponse); + */ + getGroupInfo(input: GetGroupInfoRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getGroupInfos(org.dash.platform.dapi.v0.GetGroupInfosRequest) returns (org.dash.platform.dapi.v0.GetGroupInfosResponse); + */ + getGroupInfos(input: GetGroupInfosRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getGroupActions(org.dash.platform.dapi.v0.GetGroupActionsRequest) returns (org.dash.platform.dapi.v0.GetGroupActionsResponse); + */ + getGroupActions(input: GetGroupActionsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getGroupActionSigners(org.dash.platform.dapi.v0.GetGroupActionSignersRequest) returns (org.dash.platform.dapi.v0.GetGroupActionSignersResponse); + */ + getGroupActionSigners(input: GetGroupActionSignersRequest, options?: RpcOptions): UnaryCall; +} diff --git a/built/DashPlatform.js/src/generated/platform/v0/platform.client.js b/built/DashPlatform.js/src/generated/platform/v0/platform.client.js new file mode 100644 index 0000000..2973e72 --- /dev/null +++ b/built/DashPlatform.js/src/generated/platform/v0/platform.client.js @@ -0,0 +1,325 @@ +import { Platform } from "./platform.js"; +import { stackIntercept } from "@protobuf-ts/runtime-rpc"; +/** + * @generated from protobuf service org.dash.platform.dapi.v0.Platform + */ +export class PlatformClient { + _transport; + typeName = Platform.typeName; + methods = Platform.methods; + options = Platform.options; + constructor(_transport) { + this._transport = _transport; + } + /** + * @generated from protobuf rpc: broadcastStateTransition(org.dash.platform.dapi.v0.BroadcastStateTransitionRequest) returns (org.dash.platform.dapi.v0.BroadcastStateTransitionResponse); + */ + broadcastStateTransition(input, options) { + const method = this.methods[0], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentity(org.dash.platform.dapi.v0.GetIdentityRequest) returns (org.dash.platform.dapi.v0.GetIdentityResponse); + */ + getIdentity(input, options) { + const method = this.methods[1], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityKeys(org.dash.platform.dapi.v0.GetIdentityKeysRequest) returns (org.dash.platform.dapi.v0.GetIdentityKeysResponse); + */ + getIdentityKeys(input, options) { + const method = this.methods[2], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentitiesContractKeys(org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse); + */ + getIdentitiesContractKeys(input, options) { + const method = this.methods[3], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityNonce(org.dash.platform.dapi.v0.GetIdentityNonceRequest) returns (org.dash.platform.dapi.v0.GetIdentityNonceResponse); + */ + getIdentityNonce(input, options) { + const method = this.methods[4], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityContractNonce(org.dash.platform.dapi.v0.GetIdentityContractNonceRequest) returns (org.dash.platform.dapi.v0.GetIdentityContractNonceResponse); + */ + getIdentityContractNonce(input, options) { + const method = this.methods[5], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityBalance(org.dash.platform.dapi.v0.GetIdentityBalanceRequest) returns (org.dash.platform.dapi.v0.GetIdentityBalanceResponse); + */ + getIdentityBalance(input, options) { + const method = this.methods[6], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentitiesBalances(org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse); + */ + getIdentitiesBalances(input, options) { + const method = this.methods[7], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityBalanceAndRevision(org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest) returns (org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse); + */ + getIdentityBalanceAndRevision(input, options) { + const method = this.methods[8], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getEvonodesProposedEpochBlocksByIds(org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest) returns (org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse); + */ + getEvonodesProposedEpochBlocksByIds(input, options) { + const method = this.methods[9], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getEvonodesProposedEpochBlocksByRange(org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest) returns (org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse); + */ + getEvonodesProposedEpochBlocksByRange(input, options) { + const method = this.methods[10], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getProofs(org.dash.platform.dapi.v0.GetProofsRequest) returns (org.dash.platform.dapi.v0.GetProofsResponse); + */ + getProofs(input, options) { + const method = this.methods[11], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getDataContract(org.dash.platform.dapi.v0.GetDataContractRequest) returns (org.dash.platform.dapi.v0.GetDataContractResponse); + */ + getDataContract(input, options) { + const method = this.methods[12], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getDataContractHistory(org.dash.platform.dapi.v0.GetDataContractHistoryRequest) returns (org.dash.platform.dapi.v0.GetDataContractHistoryResponse); + */ + getDataContractHistory(input, options) { + const method = this.methods[13], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getDataContracts(org.dash.platform.dapi.v0.GetDataContractsRequest) returns (org.dash.platform.dapi.v0.GetDataContractsResponse); + */ + getDataContracts(input, options) { + const method = this.methods[14], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getDocuments(org.dash.platform.dapi.v0.GetDocumentsRequest) returns (org.dash.platform.dapi.v0.GetDocumentsResponse); + */ + getDocuments(input, options) { + const method = this.methods[15], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityByPublicKeyHash(org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest) returns (org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse); + */ + getIdentityByPublicKeyHash(input, options) { + const method = this.methods[16], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: waitForStateTransitionResult(org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest) returns (org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse); + */ + waitForStateTransitionResult(input, options) { + const method = this.methods[17], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getConsensusParams(org.dash.platform.dapi.v0.GetConsensusParamsRequest) returns (org.dash.platform.dapi.v0.GetConsensusParamsResponse); + */ + getConsensusParams(input, options) { + const method = this.methods[18], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getProtocolVersionUpgradeState(org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest) returns (org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse); + */ + getProtocolVersionUpgradeState(input, options) { + const method = this.methods[19], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getProtocolVersionUpgradeVoteStatus(org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest) returns (org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse); + */ + getProtocolVersionUpgradeVoteStatus(input, options) { + const method = this.methods[20], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getEpochsInfo(org.dash.platform.dapi.v0.GetEpochsInfoRequest) returns (org.dash.platform.dapi.v0.GetEpochsInfoResponse); + */ + getEpochsInfo(input, options) { + const method = this.methods[21], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * What votes are currently happening for a specific contested index + * + * @generated from protobuf rpc: getContestedResources(org.dash.platform.dapi.v0.GetContestedResourcesRequest) returns (org.dash.platform.dapi.v0.GetContestedResourcesResponse); + */ + getContestedResources(input, options) { + const method = this.methods[22], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * What's the state of a contested resource vote? (ie who is winning?) + * + * @generated from protobuf rpc: getContestedResourceVoteState(org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse); + */ + getContestedResourceVoteState(input, options) { + const method = this.methods[23], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * Who voted for a contested resource to go to a specific identity? + * + * @generated from protobuf rpc: getContestedResourceVotersForIdentity(org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse); + */ + getContestedResourceVotersForIdentity(input, options) { + const method = this.methods[24], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * How did an identity vote? + * + * @generated from protobuf rpc: getContestedResourceIdentityVotes(org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse); + */ + getContestedResourceIdentityVotes(input, options) { + const method = this.methods[25], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * What vote polls will end soon? + * + * @generated from protobuf rpc: getVotePollsByEndDate(org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest) returns (org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse); + */ + getVotePollsByEndDate(input, options) { + const method = this.methods[26], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getPrefundedSpecializedBalance(org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest) returns (org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse); + */ + getPrefundedSpecializedBalance(input, options) { + const method = this.methods[27], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getTotalCreditsInPlatform(org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest) returns (org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse); + */ + getTotalCreditsInPlatform(input, options) { + const method = this.methods[28], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getPathElements(org.dash.platform.dapi.v0.GetPathElementsRequest) returns (org.dash.platform.dapi.v0.GetPathElementsResponse); + */ + getPathElements(input, options) { + const method = this.methods[29], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getStatus(org.dash.platform.dapi.v0.GetStatusRequest) returns (org.dash.platform.dapi.v0.GetStatusResponse); + */ + getStatus(input, options) { + const method = this.methods[30], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getCurrentQuorumsInfo(org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest) returns (org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse); + */ + getCurrentQuorumsInfo(input, options) { + const method = this.methods[31], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityTokenBalances(org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse); + */ + getIdentityTokenBalances(input, options) { + const method = this.methods[32], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentitiesTokenBalances(org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse); + */ + getIdentitiesTokenBalances(input, options) { + const method = this.methods[33], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityTokenInfos(org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest) returns (org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse); + */ + getIdentityTokenInfos(input, options) { + const method = this.methods[34], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentitiesTokenInfos(org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse); + */ + getIdentitiesTokenInfos(input, options) { + const method = this.methods[35], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getTokenStatuses(org.dash.platform.dapi.v0.GetTokenStatusesRequest) returns (org.dash.platform.dapi.v0.GetTokenStatusesResponse); + */ + getTokenStatuses(input, options) { + const method = this.methods[36], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getTokenPreProgrammedDistributions(org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest) returns (org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse); + */ + getTokenPreProgrammedDistributions(input, options) { + const method = this.methods[37], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getTokenTotalSupply(org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest) returns (org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse); + */ + getTokenTotalSupply(input, options) { + const method = this.methods[38], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getGroupInfo(org.dash.platform.dapi.v0.GetGroupInfoRequest) returns (org.dash.platform.dapi.v0.GetGroupInfoResponse); + */ + getGroupInfo(input, options) { + const method = this.methods[39], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getGroupInfos(org.dash.platform.dapi.v0.GetGroupInfosRequest) returns (org.dash.platform.dapi.v0.GetGroupInfosResponse); + */ + getGroupInfos(input, options) { + const method = this.methods[40], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getGroupActions(org.dash.platform.dapi.v0.GetGroupActionsRequest) returns (org.dash.platform.dapi.v0.GetGroupActionsResponse); + */ + getGroupActions(input, options) { + const method = this.methods[41], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getGroupActionSigners(org.dash.platform.dapi.v0.GetGroupActionSignersRequest) returns (org.dash.platform.dapi.v0.GetGroupActionSignersResponse); + */ + getGroupActionSigners(input, options) { + const method = this.methods[42], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } +} diff --git a/built/DashPlatform.js/src/generated/platform/v0/platform.d.ts b/built/DashPlatform.js/src/generated/platform/v0/platform.d.ts new file mode 100644 index 0000000..cb3909d --- /dev/null +++ b/built/DashPlatform.js/src/generated/platform/v0/platform.d.ts @@ -0,0 +1,7214 @@ +import { ServiceType } from "@protobuf-ts/runtime-rpc"; +import { MessageType } from "@protobuf-ts/runtime"; +import { BytesValue } from "../../google/protobuf/wrappers.ts"; +import { UInt32Value } from "../../google/protobuf/wrappers.ts"; +/** + * Proof message includes cryptographic proofs for validating responses + * + * @generated from protobuf message org.dash.platform.dapi.v0.Proof + */ +export interface Proof { + /** + * @generated from protobuf field: bytes grovedb_proof = 1; + */ + grovedbProof: Uint8Array; + /** + * @generated from protobuf field: bytes quorum_hash = 2; + */ + quorumHash: Uint8Array; + /** + * @generated from protobuf field: bytes signature = 3; + */ + signature: Uint8Array; + /** + * @generated from protobuf field: uint32 round = 4; + */ + round: number; + /** + * @generated from protobuf field: bytes block_id_hash = 5; + */ + blockIdHash: Uint8Array; + /** + * @generated from protobuf field: uint32 quorum_type = 6; + */ + quorumType: number; +} +/** + * ResponseMetadata provides metadata about the blockchain state at the time of response + * + * @generated from protobuf message org.dash.platform.dapi.v0.ResponseMetadata + */ +export interface ResponseMetadata { + /** + * @generated from protobuf field: uint64 height = 1 [jstype = JS_STRING]; + */ + height: string; + /** + * @generated from protobuf field: uint32 core_chain_locked_height = 2; + */ + coreChainLockedHeight: number; + /** + * @generated from protobuf field: uint32 epoch = 3; + */ + epoch: number; + /** + * @generated from protobuf field: uint64 time_ms = 4 [jstype = JS_STRING]; + */ + timeMs: string; + /** + * @generated from protobuf field: uint32 protocol_version = 5; + */ + protocolVersion: number; + /** + * @generated from protobuf field: string chain_id = 6; + */ + chainId: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.StateTransitionBroadcastError + */ +export interface StateTransitionBroadcastError { + /** + * @generated from protobuf field: uint32 code = 1; + */ + code: number; + /** + * @generated from protobuf field: string message = 2; + */ + message: string; + /** + * @generated from protobuf field: bytes data = 3; + */ + data: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BroadcastStateTransitionRequest + */ +export interface BroadcastStateTransitionRequest { + /** + * @generated from protobuf field: bytes state_transition = 1; + */ + stateTransition: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BroadcastStateTransitionResponse + */ +export interface BroadcastStateTransitionResponse { +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityRequest + */ +export interface GetIdentityRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0 v0 = 1; + */ + v0: GetIdentityRequest_GetIdentityRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0 + */ +export interface GetIdentityRequest_GetIdentityRequestV0 { + /** + * @generated from protobuf field: bytes id = 1; + */ + id: Uint8Array; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityNonceRequest + */ +export interface GetIdentityNonceRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0 v0 = 1; + */ + v0: GetIdentityNonceRequest_GetIdentityNonceRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0 + */ +export interface GetIdentityNonceRequest_GetIdentityNonceRequestV0 { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceRequest + */ +export interface GetIdentityContractNonceRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0 v0 = 1; + */ + v0: GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0 + */ +export interface GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0 { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: bytes contract_id = 2; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceRequest + */ +export interface GetIdentityBalanceRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0 v0 = 1; + */ + v0: GetIdentityBalanceRequest_GetIdentityBalanceRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0 + */ +export interface GetIdentityBalanceRequest_GetIdentityBalanceRequestV0 { + /** + * @generated from protobuf field: bytes id = 1; + */ + id: Uint8Array; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest + */ +export interface GetIdentityBalanceAndRevisionRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0 v0 = 1; + */ + v0: GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0 + */ +export interface GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0 { + /** + * @generated from protobuf field: bytes id = 1; + */ + id: Uint8Array; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityResponse + */ +export interface GetIdentityResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0 v0 = 1; + */ + v0: GetIdentityResponse_GetIdentityResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0 + */ +export interface GetIdentityResponse_GetIdentityResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identity"; + /** + * @generated from protobuf field: bytes identity = 1; + */ + identity: Uint8Array; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityNonceResponse + */ +export interface GetIdentityNonceResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0 v0 = 1; + */ + v0: GetIdentityNonceResponse_GetIdentityNonceResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0 + */ +export interface GetIdentityNonceResponse_GetIdentityNonceResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identityNonce"; + /** + * @generated from protobuf field: uint64 identity_nonce = 1 [jstype = JS_STRING]; + */ + identityNonce: string; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceResponse + */ +export interface GetIdentityContractNonceResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0 v0 = 1; + */ + v0: GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0 + */ +export interface GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identityContractNonce"; + /** + * @generated from protobuf field: uint64 identity_contract_nonce = 1 [jstype = JS_STRING]; + */ + identityContractNonce: string; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceResponse + */ +export interface GetIdentityBalanceResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0 v0 = 1; + */ + v0: GetIdentityBalanceResponse_GetIdentityBalanceResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0 + */ +export interface GetIdentityBalanceResponse_GetIdentityBalanceResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "balance"; + /** + * @generated from protobuf field: uint64 balance = 1 [jstype = JS_STRING]; + */ + balance: string; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse + */ +export interface GetIdentityBalanceAndRevisionResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0 v0 = 1; + */ + v0: GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0 + */ +export interface GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "balanceAndRevision"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision balance_and_revision = 1; + */ + balanceAndRevision: GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision + */ +export interface GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision { + /** + * @generated from protobuf field: uint64 balance = 1 [jstype = JS_STRING]; + */ + balance: string; + /** + * @generated from protobuf field: uint64 revision = 2 [jstype = JS_STRING]; + */ + revision: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.KeyRequestType + */ +export interface KeyRequestType { + /** + * @generated from protobuf oneof: request + */ + request: { + oneofKind: "allKeys"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.AllKeys all_keys = 1; + */ + allKeys: AllKeys; + } | { + oneofKind: "specificKeys"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.SpecificKeys specific_keys = 2; + */ + specificKeys: SpecificKeys; + } | { + oneofKind: "searchKey"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.SearchKey search_key = 3; + */ + searchKey: SearchKey; + } | { + oneofKind: undefined; + }; +} +/** + * AllKeys is an empty message used to signify a request for all keys + * + * @generated from protobuf message org.dash.platform.dapi.v0.AllKeys + */ +export interface AllKeys { +} +/** + * SpecificKeys is used to request specific keys by their IDs + * + * @generated from protobuf message org.dash.platform.dapi.v0.SpecificKeys + */ +export interface SpecificKeys { + /** + * @generated from protobuf field: repeated uint32 key_ids = 1; + */ + keyIds: number[]; +} +/** + * SearchKey represents a request to search for keys based on specific criteria + * + * @generated from protobuf message org.dash.platform.dapi.v0.SearchKey + */ +export interface SearchKey { + /** + * @generated from protobuf field: map purpose_map = 1; + */ + purposeMap: { + [key: number]: SecurityLevelMap; + }; +} +/** + * SecurityLevelMap maps security levels to a request type for key retrieval + * + * @generated from protobuf message org.dash.platform.dapi.v0.SecurityLevelMap + */ +export interface SecurityLevelMap { + /** + * @generated from protobuf field: map security_level_map = 1; + */ + securityLevelMap: { + [key: number]: SecurityLevelMap_KeyKindRequestType; + }; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType + */ +export declare enum SecurityLevelMap_KeyKindRequestType { + /** + * Request the current key of a particular kind + * + * @generated from protobuf enum value: CURRENT_KEY_OF_KIND_REQUEST = 0; + */ + CURRENT_KEY_OF_KIND_REQUEST = 0, + /** + * Request all keys of a particular kind + * + * @generated from protobuf enum value: ALL_KEYS_OF_KIND_REQUEST = 1; + */ + ALL_KEYS_OF_KIND_REQUEST = 1 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityKeysRequest + */ +export interface GetIdentityKeysRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0 v0 = 1; + */ + v0: GetIdentityKeysRequest_GetIdentityKeysRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0 + */ +export interface GetIdentityKeysRequest_GetIdentityKeysRequestV0 { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.KeyRequestType request_type = 2; + */ + requestType?: KeyRequestType; + /** + * @generated from protobuf field: google.protobuf.UInt32Value limit = 3; + */ + limit?: UInt32Value; + /** + * @generated from protobuf field: google.protobuf.UInt32Value offset = 4; + */ + offset?: UInt32Value; + /** + * @generated from protobuf field: bool prove = 5; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse + */ +export interface GetIdentityKeysResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0 v0 = 1; + */ + v0: GetIdentityKeysResponse_GetIdentityKeysResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0 + */ +export interface GetIdentityKeysResponse_GetIdentityKeysResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "keys"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys keys = 1; + */ + keys: GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys + */ +export interface GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys { + /** + * @generated from protobuf field: repeated bytes keys_bytes = 1; + */ + keysBytes: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest + */ +export interface GetIdentitiesContractKeysRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0 v0 = 1; + */ + v0: GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0 + */ +export interface GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0 { + /** + * @generated from protobuf field: repeated bytes identities_ids = 1; + */ + identitiesIds: Uint8Array[]; + /** + * @generated from protobuf field: bytes contract_id = 2; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: optional string document_type_name = 3; + */ + documentTypeName?: string; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.KeyPurpose purposes = 4; + */ + purposes: KeyPurpose[]; + /** + * @generated from protobuf field: bool prove = 5; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse + */ +export interface GetIdentitiesContractKeysResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0 v0 = 1; + */ + v0: GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0 + */ +export interface GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identitiesKeys"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys identities_keys = 1; + */ + identitiesKeys: GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys + */ +export interface GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.KeyPurpose purpose = 1; + */ + purpose: KeyPurpose; + /** + * @generated from protobuf field: repeated bytes keys_bytes = 2; + */ + keysBytes: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys + */ +export interface GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys keys = 2; + */ + keys: GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys + */ +export interface GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys entries = 1; + */ + entries: GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + */ +export interface GetEvonodesProposedEpochBlocksByIdsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 v0 = 1; + */ + v0: GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + */ +export interface GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 { + /** + * @generated from protobuf field: optional uint32 epoch = 1; + */ + epoch?: number; + /** + * @generated from protobuf field: repeated bytes ids = 2; + */ + ids: Uint8Array[]; + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + */ +export interface GetEvonodesProposedEpochBlocksResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 v0 = 1; + */ + v0: GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + */ +export interface GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "evonodesProposedBlockCountsInfo"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks evonodes_proposed_block_counts_info = 1; + */ + evonodesProposedBlockCountsInfo: GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + */ +export interface GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks { + /** + * @generated from protobuf field: bytes pro_tx_hash = 1; + */ + proTxHash: Uint8Array; + /** + * @generated from protobuf field: uint64 count = 2 [jstype = JS_STRING]; + */ + count: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + */ +export interface GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks evonodes_proposed_block_counts = 1; + */ + evonodesProposedBlockCounts: GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + */ +export interface GetEvonodesProposedEpochBlocksByRangeRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 v0 = 1; + */ + v0: GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + */ +export interface GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 { + /** + * @generated from protobuf field: optional uint32 epoch = 1; + */ + epoch?: number; + /** + * @generated from protobuf field: optional uint32 limit = 2; + */ + limit?: number; + /** + * @generated from protobuf oneof: start + */ + start: { + oneofKind: "startAfter"; + /** + * @generated from protobuf field: bytes start_after = 3; + */ + startAfter: Uint8Array; + } | { + oneofKind: "startAt"; + /** + * @generated from protobuf field: bytes start_at = 4; + */ + startAt: Uint8Array; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: bool prove = 5; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + */ +export interface GetIdentitiesBalancesRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 v0 = 1; + */ + v0: GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + */ +export interface GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 { + /** + * @generated from protobuf field: repeated bytes ids = 1; + */ + ids: Uint8Array[]; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + */ +export interface GetIdentitiesBalancesResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 v0 = 1; + */ + v0: GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + */ +export interface GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identitiesBalances"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances identities_balances = 1; + */ + identitiesBalances: GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + */ +export interface GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: optional uint64 balance = 2 [jstype = JS_STRING]; + */ + balance?: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + */ +export interface GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance entries = 1; + */ + entries: GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest + */ +export interface GetProofsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 v0 = 1; + */ + v0: GetProofsRequest_GetProofsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 + */ +export interface GetProofsRequest_GetProofsRequestV0 { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest identities = 1; + */ + identities: GetProofsRequest_GetProofsRequestV0_IdentityRequest[]; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest contracts = 2; + */ + contracts: GetProofsRequest_GetProofsRequestV0_ContractRequest[]; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest documents = 3; + */ + documents: GetProofsRequest_GetProofsRequestV0_DocumentRequest[]; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest votes = 4; + */ + votes: GetProofsRequest_GetProofsRequestV0_VoteStatusRequest[]; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest identity_token_balances = 5; + */ + identityTokenBalances: GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest[]; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest identity_token_infos = 6; + */ + identityTokenInfos: GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest[]; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest token_statuses = 7; + */ + tokenStatuses: GetProofsRequest_GetProofsRequestV0_TokenStatusRequest[]; +} +/** + * DocumentRequest specifies a request for a document proof + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_DocumentRequest { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: string document_type = 2; + */ + documentType: string; + /** + * @generated from protobuf field: bool document_type_keeps_history = 3; + */ + documentTypeKeepsHistory: boolean; + /** + * @generated from protobuf field: bytes document_id = 4; + */ + documentId: Uint8Array; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus document_contested_status = 5; + */ + documentContestedStatus: GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus + */ +export declare enum GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus { + /** + * @generated from protobuf enum value: NOT_CONTESTED = 0; + */ + NOT_CONTESTED = 0, + /** + * @generated from protobuf enum value: MAYBE_CONTESTED = 1; + */ + MAYBE_CONTESTED = 1, + /** + * @generated from protobuf enum value: CONTESTED = 2; + */ + CONTESTED = 2 +} +/** + * IdentityRequest specifies a request for an identity proof + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_IdentityRequest { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type request_type = 2; + */ + requestType: GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type + */ +export declare enum GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type { + /** + * Request for the full identity + * + * @generated from protobuf enum value: FULL_IDENTITY = 0; + */ + FULL_IDENTITY = 0, + /** + * Request for the identity's balance + * + * @generated from protobuf enum value: BALANCE = 1; + */ + BALANCE = 1, + /** + * Request for the identity's keys + * + * @generated from protobuf enum value: KEYS = 2; + */ + KEYS = 2, + /** + * Request for the identity's revision + * + * @generated from protobuf enum value: REVISION = 3; + */ + REVISION = 3 +} +/** + * ContractRequest specifies a request for a data contract proof. + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_ContractRequest { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_VoteStatusRequest { + /** + * @generated from protobuf oneof: request_type + */ + requestType: { + oneofKind: "contestedResourceVoteStatusRequest"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest contested_resource_vote_status_request = 1; + */ + contestedResourceVoteStatusRequest: GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: string document_type_name = 2; + */ + documentTypeName: string; + /** + * @generated from protobuf field: string index_name = 3; + */ + indexName: string; + /** + * @generated from protobuf field: repeated bytes index_values = 4; + */ + indexValues: Uint8Array[]; + /** + * @generated from protobuf field: bytes voter_identifier = 5; + */ + voterIdentifier: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: bytes identity_id = 2; + */ + identityId: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: bytes identity_id = 2; + */ + identityId: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_TokenStatusRequest { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsResponse + */ +export interface GetProofsResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0 v0 = 1; + */ + v0: GetProofsResponse_GetProofsResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0 + */ +export interface GetProofsResponse_GetProofsResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 1; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 2; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractRequest + */ +export interface GetDataContractRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0 v0 = 1; + */ + v0: GetDataContractRequest_GetDataContractRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0 + */ +export interface GetDataContractRequest_GetDataContractRequestV0 { + /** + * @generated from protobuf field: bytes id = 1; + */ + id: Uint8Array; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractResponse + */ +export interface GetDataContractResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0 v0 = 1; + */ + v0: GetDataContractResponse_GetDataContractResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0 + */ +export interface GetDataContractResponse_GetDataContractResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "dataContract"; + /** + * @generated from protobuf field: bytes data_contract = 1; + */ + dataContract: Uint8Array; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractsRequest + */ +export interface GetDataContractsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0 v0 = 1; + */ + v0: GetDataContractsRequest_GetDataContractsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0 + */ +export interface GetDataContractsRequest_GetDataContractsRequestV0 { + /** + * @generated from protobuf field: repeated bytes ids = 1; + */ + ids: Uint8Array[]; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse + */ +export interface GetDataContractsResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0 v0 = 1; + */ + v0: GetDataContractsResponse_GetDataContractsResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry + */ +export interface GetDataContractsResponse_DataContractEntry { + /** + * @generated from protobuf field: bytes identifier = 1; + */ + identifier: Uint8Array; + /** + * @generated from protobuf field: google.protobuf.BytesValue data_contract = 2; + */ + dataContract?: BytesValue; +} +/** + * DataContracts is a collection of data contract entries. + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts + */ +export interface GetDataContractsResponse_DataContracts { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry data_contract_entries = 1; + */ + dataContractEntries: GetDataContractsResponse_DataContractEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0 + */ +export interface GetDataContractsResponse_GetDataContractsResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "dataContracts"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts data_contracts = 1; + */ + dataContracts: GetDataContractsResponse_DataContracts; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryRequest + */ +export interface GetDataContractHistoryRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0 v0 = 1; + */ + v0: GetDataContractHistoryRequest_GetDataContractHistoryRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0 + */ +export interface GetDataContractHistoryRequest_GetDataContractHistoryRequestV0 { + /** + * @generated from protobuf field: bytes id = 1; + */ + id: Uint8Array; + /** + * @generated from protobuf field: google.protobuf.UInt32Value limit = 2; + */ + limit?: UInt32Value; + /** + * @generated from protobuf field: google.protobuf.UInt32Value offset = 3; + */ + offset?: UInt32Value; + /** + * @generated from protobuf field: uint64 start_at_ms = 4 [jstype = JS_STRING]; + */ + startAtMs: string; + /** + * @generated from protobuf field: bool prove = 5; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse + */ +export interface GetDataContractHistoryResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0 v0 = 1; + */ + v0: GetDataContractHistoryResponse_GetDataContractHistoryResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0 + */ +export interface GetDataContractHistoryResponse_GetDataContractHistoryResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "dataContractHistory"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory data_contract_history = 1; + */ + dataContractHistory: GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * Represents a single entry in the data contract's history + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry + */ +export interface GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry { + /** + * @generated from protobuf field: uint64 date = 1 [jstype = JS_STRING]; + */ + date: string; + /** + * @generated from protobuf field: bytes value = 2; + */ + value: Uint8Array; +} +/** + * Collection of data contract history entries + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory + */ +export interface GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry data_contract_entries = 1; + */ + dataContractEntries: GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDocumentsRequest + */ +export interface GetDocumentsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0 v0 = 1; + */ + v0: GetDocumentsRequest_GetDocumentsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0 + */ +export interface GetDocumentsRequest_GetDocumentsRequestV0 { + /** + * @generated from protobuf field: bytes data_contract_id = 1; + */ + dataContractId: Uint8Array; + /** + * @generated from protobuf field: string document_type = 2; + */ + documentType: string; + /** + * @generated from protobuf field: bytes where = 3; + */ + where: Uint8Array; + /** + * @generated from protobuf field: bytes order_by = 4; + */ + orderBy: Uint8Array; + /** + * @generated from protobuf field: uint32 limit = 5; + */ + limit: number; + /** + * @generated from protobuf oneof: start + */ + start: { + oneofKind: "startAfter"; + /** + * @generated from protobuf field: bytes start_after = 6; + */ + startAfter: Uint8Array; + } | { + oneofKind: "startAt"; + /** + * @generated from protobuf field: bytes start_at = 7; + */ + startAt: Uint8Array; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: bool prove = 8; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse + */ +export interface GetDocumentsResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0 v0 = 1; + */ + v0: GetDocumentsResponse_GetDocumentsResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0 + */ +export interface GetDocumentsResponse_GetDocumentsResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "documents"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents documents = 1; + */ + documents: GetDocumentsResponse_GetDocumentsResponseV0_Documents; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * Represents a collection of documents + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents + */ +export interface GetDocumentsResponse_GetDocumentsResponseV0_Documents { + /** + * @generated from protobuf field: repeated bytes documents = 1; + */ + documents: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest + */ +export interface GetIdentityByPublicKeyHashRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0 v0 = 1; + */ + v0: GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0 + */ +export interface GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0 { + /** + * @generated from protobuf field: bytes public_key_hash = 1; + */ + publicKeyHash: Uint8Array; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse + */ +export interface GetIdentityByPublicKeyHashResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0 v0 = 1; + */ + v0: GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0 + */ +export interface GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identity"; + /** + * @generated from protobuf field: bytes identity = 1; + */ + identity: Uint8Array; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest + */ +export interface WaitForStateTransitionResultRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0 v0 = 1; + */ + v0: WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0 + */ +export interface WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0 { + /** + * @generated from protobuf field: bytes state_transition_hash = 1; + */ + stateTransitionHash: Uint8Array; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse + */ +export interface WaitForStateTransitionResultResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0 v0 = 1; + */ + v0: WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0 + */ +export interface WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "error"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.StateTransitionBroadcastError error = 1; + */ + error: StateTransitionBroadcastError; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetConsensusParamsRequest + */ +export interface GetConsensusParamsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0 v0 = 1; + */ + v0: GetConsensusParamsRequest_GetConsensusParamsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0 + */ +export interface GetConsensusParamsRequest_GetConsensusParamsRequestV0 { + /** + * @generated from protobuf field: int32 height = 1; + */ + height: number; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse + */ +export interface GetConsensusParamsResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0 v0 = 1; + */ + v0: GetConsensusParamsResponse_GetConsensusParamsResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock + */ +export interface GetConsensusParamsResponse_ConsensusParamsBlock { + /** + * @generated from protobuf field: string max_bytes = 1; + */ + maxBytes: string; + /** + * @generated from protobuf field: string max_gas = 2; + */ + maxGas: string; + /** + * @generated from protobuf field: string time_iota_ms = 3; + */ + timeIotaMs: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence + */ +export interface GetConsensusParamsResponse_ConsensusParamsEvidence { + /** + * @generated from protobuf field: string max_age_num_blocks = 1; + */ + maxAgeNumBlocks: string; + /** + * @generated from protobuf field: string max_age_duration = 2; + */ + maxAgeDuration: string; + /** + * @generated from protobuf field: string max_bytes = 3; + */ + maxBytes: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0 + */ +export interface GetConsensusParamsResponse_GetConsensusParamsResponseV0 { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock block = 1; + */ + block?: GetConsensusParamsResponse_ConsensusParamsBlock; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence evidence = 2; + */ + evidence?: GetConsensusParamsResponse_ConsensusParamsEvidence; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest + */ +export interface GetProtocolVersionUpgradeStateRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0 v0 = 1; + */ + v0: GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0 + */ +export interface GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0 { + /** + * @generated from protobuf field: bool prove = 1; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse + */ +export interface GetProtocolVersionUpgradeStateResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0 v0 = 1; + */ + v0: GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0 + */ +export interface GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "versions"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions versions = 1; + */ + versions: GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * Versions holds a collection of version entries + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions + */ +export interface GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry versions = 1; + */ + versions: GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry[]; +} +/** + * VersionEntry represents a single entry of a protocol version + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry + */ +export interface GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry { + /** + * @generated from protobuf field: uint32 version_number = 1; + */ + versionNumber: number; + /** + * @generated from protobuf field: uint32 vote_count = 2; + */ + voteCount: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest + */ +export interface GetProtocolVersionUpgradeVoteStatusRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0 v0 = 1; + */ + v0: GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0 + */ +export interface GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0 { + /** + * @generated from protobuf field: bytes start_pro_tx_hash = 1; + */ + startProTxHash: Uint8Array; + /** + * @generated from protobuf field: uint32 count = 2; + */ + count: number; + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse + */ +export interface GetProtocolVersionUpgradeVoteStatusResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0 v0 = 1; + */ + v0: GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0 + */ +export interface GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "versions"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals versions = 1; + */ + versions: GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * VersionSignals holds a collection of version signal entries + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals + */ +export interface GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal version_signals = 1; + */ + versionSignals: GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal[]; +} +/** + * VersionSignal represents a single voting signal for a protocol version + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal + */ +export interface GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal { + /** + * @generated from protobuf field: bytes pro_tx_hash = 1; + */ + proTxHash: Uint8Array; + /** + * @generated from protobuf field: uint32 version = 2; + */ + version: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEpochsInfoRequest + */ +export interface GetEpochsInfoRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0 v0 = 1; + */ + v0: GetEpochsInfoRequest_GetEpochsInfoRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0 + */ +export interface GetEpochsInfoRequest_GetEpochsInfoRequestV0 { + /** + * @generated from protobuf field: google.protobuf.UInt32Value start_epoch = 1; + */ + startEpoch?: UInt32Value; + /** + * @generated from protobuf field: uint32 count = 2; + */ + count: number; + /** + * @generated from protobuf field: bool ascending = 3; + */ + ascending: boolean; + /** + * @generated from protobuf field: bool prove = 4; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse + */ +export interface GetEpochsInfoResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0 v0 = 1; + */ + v0: GetEpochsInfoResponse_GetEpochsInfoResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0 + */ +export interface GetEpochsInfoResponse_GetEpochsInfoResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "epochs"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos epochs = 1; + */ + epochs: GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * EpochInfos holds a collection of epoch information entries + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos + */ +export interface GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo epoch_infos = 1; + */ + epochInfos: GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo[]; +} +/** + * EpochInfo represents information about a single epoch + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo + */ +export interface GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo { + /** + * @generated from protobuf field: uint32 number = 1; + */ + number: number; + /** + * @generated from protobuf field: uint64 first_block_height = 2 [jstype = JS_STRING]; + */ + firstBlockHeight: string; + /** + * @generated from protobuf field: uint32 first_core_block_height = 3; + */ + firstCoreBlockHeight: number; + /** + * @generated from protobuf field: uint64 start_time = 4 [jstype = JS_STRING]; + */ + startTime: string; + /** + * @generated from protobuf field: double fee_multiplier = 5; + */ + feeMultiplier: number; + /** + * @generated from protobuf field: uint32 protocol_version = 6; + */ + protocolVersion: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest + */ +export interface GetContestedResourcesRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0 v0 = 1; + */ + v0: GetContestedResourcesRequest_GetContestedResourcesRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0 + */ +export interface GetContestedResourcesRequest_GetContestedResourcesRequestV0 { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: string document_type_name = 2; + */ + documentTypeName: string; + /** + * @generated from protobuf field: string index_name = 3; + */ + indexName: string; + /** + * @generated from protobuf field: repeated bytes start_index_values = 4; + */ + startIndexValues: Uint8Array[]; + /** + * @generated from protobuf field: repeated bytes end_index_values = 5; + */ + endIndexValues: Uint8Array[]; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo start_at_value_info = 6; + */ + startAtValueInfo?: GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo; + /** + * @generated from protobuf field: optional uint32 count = 7; + */ + count?: number; + /** + * @generated from protobuf field: bool order_ascending = 8; + */ + orderAscending: boolean; + /** + * @generated from protobuf field: bool prove = 9; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo + */ +export interface GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo { + /** + * @generated from protobuf field: bytes start_value = 1; + */ + startValue: Uint8Array; + /** + * @generated from protobuf field: bool start_value_included = 2; + */ + startValueIncluded: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse + */ +export interface GetContestedResourcesResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0 v0 = 1; + */ + v0: GetContestedResourcesResponse_GetContestedResourcesResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0 + */ +export interface GetContestedResourcesResponse_GetContestedResourcesResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "contestedResourceValues"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues contested_resource_values = 1; + */ + contestedResourceValues: GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues + */ +export interface GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues { + /** + * @generated from protobuf field: repeated bytes contested_resource_values = 1; + */ + contestedResourceValues: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest + */ +export interface GetVotePollsByEndDateRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0 v0 = 1; + */ + v0: GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0 + */ +export interface GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0 { + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo start_time_info = 1; + */ + startTimeInfo?: GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo end_time_info = 2; + */ + endTimeInfo?: GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo; + /** + * @generated from protobuf field: optional uint32 limit = 3; + */ + limit?: number; + /** + * @generated from protobuf field: optional uint32 offset = 4; + */ + offset?: number; + /** + * @generated from protobuf field: bool ascending = 5; + */ + ascending: boolean; + /** + * @generated from protobuf field: bool prove = 6; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo + */ +export interface GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo { + /** + * @generated from protobuf field: uint64 start_time_ms = 1 [jstype = JS_STRING]; + */ + startTimeMs: string; + /** + * @generated from protobuf field: bool start_time_included = 2; + */ + startTimeIncluded: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo + */ +export interface GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo { + /** + * @generated from protobuf field: uint64 end_time_ms = 1 [jstype = JS_STRING]; + */ + endTimeMs: string; + /** + * @generated from protobuf field: bool end_time_included = 2; + */ + endTimeIncluded: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse + */ +export interface GetVotePollsByEndDateResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0 v0 = 1; + */ + v0: GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0 + */ +export interface GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "votePollsByTimestamps"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps vote_polls_by_timestamps = 1; + */ + votePollsByTimestamps: GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp + */ +export interface GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp { + /** + * @generated from protobuf field: uint64 timestamp = 1 [jstype = JS_STRING]; + */ + timestamp: string; + /** + * @generated from protobuf field: repeated bytes serialized_vote_polls = 2; + */ + serializedVotePolls: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps + */ +export interface GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp vote_polls_by_timestamps = 1; + */ + votePollsByTimestamps: GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp[]; + /** + * @generated from protobuf field: bool finished_results = 2; + */ + finishedResults: boolean; +} +/** + * What's the state of a contested resource vote? (ie who is winning?) + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest + */ +export interface GetContestedResourceVoteStateRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0 v0 = 1; + */ + v0: GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0 + */ +export interface GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0 { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: string document_type_name = 2; + */ + documentTypeName: string; + /** + * @generated from protobuf field: string index_name = 3; + */ + indexName: string; + /** + * @generated from protobuf field: repeated bytes index_values = 4; + */ + indexValues: Uint8Array[]; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType result_type = 5; + */ + resultType: GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType; + /** + * @generated from protobuf field: bool allow_include_locked_and_abstaining_vote_tally = 6; + */ + allowIncludeLockedAndAbstainingVoteTally: boolean; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo start_at_identifier_info = 7; + */ + startAtIdentifierInfo?: GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo; + /** + * @generated from protobuf field: optional uint32 count = 8; + */ + count?: number; + /** + * @generated from protobuf field: bool prove = 9; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo + */ +export interface GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo { + /** + * @generated from protobuf field: bytes start_identifier = 1; + */ + startIdentifier: Uint8Array; + /** + * @generated from protobuf field: bool start_identifier_included = 2; + */ + startIdentifierIncluded: boolean; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType + */ +export declare enum GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType { + /** + * @generated from protobuf enum value: DOCUMENTS = 0; + */ + DOCUMENTS = 0, + /** + * @generated from protobuf enum value: VOTE_TALLY = 1; + */ + VOTE_TALLY = 1, + /** + * @generated from protobuf enum value: DOCUMENTS_AND_VOTE_TALLY = 2; + */ + DOCUMENTS_AND_VOTE_TALLY = 2 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse + */ +export interface GetContestedResourceVoteStateResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0 v0 = 1; + */ + v0: GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0 + */ +export interface GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "contestedResourceContenders"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders contested_resource_contenders = 1; + */ + contestedResourceContenders: GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo + */ +export interface GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome finished_vote_outcome = 1; + */ + finishedVoteOutcome: GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome; + /** + * @generated from protobuf field: optional bytes won_by_identity_id = 2; + */ + wonByIdentityId?: Uint8Array; + /** + * @generated from protobuf field: uint64 finished_at_block_height = 3 [jstype = JS_STRING]; + */ + finishedAtBlockHeight: string; + /** + * @generated from protobuf field: uint32 finished_at_core_block_height = 4; + */ + finishedAtCoreBlockHeight: number; + /** + * @generated from protobuf field: uint64 finished_at_block_time_ms = 5 [jstype = JS_STRING]; + */ + finishedAtBlockTimeMs: string; + /** + * @generated from protobuf field: uint32 finished_at_epoch = 6; + */ + finishedAtEpoch: number; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome + */ +export declare enum GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome { + /** + * @generated from protobuf enum value: TOWARDS_IDENTITY = 0; + */ + TOWARDS_IDENTITY = 0, + /** + * @generated from protobuf enum value: LOCKED = 1; + */ + LOCKED = 1, + /** + * @generated from protobuf enum value: NO_PREVIOUS_WINNER = 2; + */ + NO_PREVIOUS_WINNER = 2 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders + */ +export interface GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender contenders = 1; + */ + contenders: GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender[]; + /** + * @generated from protobuf field: optional uint32 abstain_vote_tally = 2; + */ + abstainVoteTally?: number; + /** + * @generated from protobuf field: optional uint32 lock_vote_tally = 3; + */ + lockVoteTally?: number; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo finished_vote_info = 4; + */ + finishedVoteInfo?: GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender + */ +export interface GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender { + /** + * @generated from protobuf field: bytes identifier = 1; + */ + identifier: Uint8Array; + /** + * @generated from protobuf field: optional uint32 vote_count = 2; + */ + voteCount?: number; + /** + * @generated from protobuf field: optional bytes document = 3; + */ + document?: Uint8Array; +} +/** + * Who voted for a contested resource to go to a specific identity? + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest + */ +export interface GetContestedResourceVotersForIdentityRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0 v0 = 1; + */ + v0: GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0 + */ +export interface GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0 { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: string document_type_name = 2; + */ + documentTypeName: string; + /** + * @generated from protobuf field: string index_name = 3; + */ + indexName: string; + /** + * @generated from protobuf field: repeated bytes index_values = 4; + */ + indexValues: Uint8Array[]; + /** + * @generated from protobuf field: bytes contestant_id = 5; + */ + contestantId: Uint8Array; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo start_at_identifier_info = 6; + */ + startAtIdentifierInfo?: GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo; + /** + * @generated from protobuf field: optional uint32 count = 7; + */ + count?: number; + /** + * @generated from protobuf field: bool order_ascending = 8; + */ + orderAscending: boolean; + /** + * @generated from protobuf field: bool prove = 9; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo + */ +export interface GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo { + /** + * @generated from protobuf field: bytes start_identifier = 1; + */ + startIdentifier: Uint8Array; + /** + * @generated from protobuf field: bool start_identifier_included = 2; + */ + startIdentifierIncluded: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse + */ +export interface GetContestedResourceVotersForIdentityResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0 v0 = 1; + */ + v0: GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0 + */ +export interface GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "contestedResourceVoters"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters contested_resource_voters = 1; + */ + contestedResourceVoters: GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters + */ +export interface GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters { + /** + * @generated from protobuf field: repeated bytes voters = 1; + */ + voters: Uint8Array[]; + /** + * @generated from protobuf field: bool finished_results = 2; + */ + finishedResults: boolean; +} +/** + * How did an identity vote? + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest + */ +export interface GetContestedResourceIdentityVotesRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0 v0 = 1; + */ + v0: GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0 + */ +export interface GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0 { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: google.protobuf.UInt32Value limit = 2; + */ + limit?: UInt32Value; + /** + * @generated from protobuf field: google.protobuf.UInt32Value offset = 3; + */ + offset?: UInt32Value; + /** + * @generated from protobuf field: bool order_ascending = 4; + */ + orderAscending: boolean; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo start_at_vote_poll_id_info = 5; + */ + startAtVotePollIdInfo?: GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo; + /** + * @generated from protobuf field: bool prove = 6; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo + */ +export interface GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo { + /** + * @generated from protobuf field: bytes start_at_poll_identifier = 1; + */ + startAtPollIdentifier: Uint8Array; + /** + * @generated from protobuf field: bool start_poll_identifier_included = 2; + */ + startPollIdentifierIncluded: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse + */ +export interface GetContestedResourceIdentityVotesResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0 v0 = 1; + */ + v0: GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0 + */ +export interface GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "votes"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes votes = 1; + */ + votes: GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes + */ +export interface GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote contested_resource_identity_votes = 1; + */ + contestedResourceIdentityVotes: GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote[]; + /** + * @generated from protobuf field: bool finished_results = 2; + */ + finishedResults: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice + */ +export interface GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType vote_choice_type = 1; + */ + voteChoiceType: GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType; + /** + * @generated from protobuf field: optional bytes identity_id = 2; + */ + identityId?: Uint8Array; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType + */ +export declare enum GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType { + /** + * @generated from protobuf enum value: TOWARDS_IDENTITY = 0; + */ + TOWARDS_IDENTITY = 0, + /** + * @generated from protobuf enum value: ABSTAIN = 1; + */ + ABSTAIN = 1, + /** + * @generated from protobuf enum value: LOCK = 2; + */ + LOCK = 2 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote + */ +export interface GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: string document_type_name = 2; + */ + documentTypeName: string; + /** + * @generated from protobuf field: repeated bytes serialized_index_storage_values = 3; + */ + serializedIndexStorageValues: Uint8Array[]; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice vote_choice = 4; + */ + voteChoice?: GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest + */ +export interface GetPrefundedSpecializedBalanceRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0 v0 = 1; + */ + v0: GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0 + */ +export interface GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0 { + /** + * @generated from protobuf field: bytes id = 1; + */ + id: Uint8Array; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse + */ +export interface GetPrefundedSpecializedBalanceResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0 v0 = 1; + */ + v0: GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0 + */ +export interface GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "balance"; + /** + * @generated from protobuf field: uint64 balance = 1 [jstype = JS_STRING]; + */ + balance: string; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest + */ +export interface GetTotalCreditsInPlatformRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0 v0 = 1; + */ + v0: GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0 + */ +export interface GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0 { + /** + * @generated from protobuf field: bool prove = 1; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse + */ +export interface GetTotalCreditsInPlatformResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0 v0 = 1; + */ + v0: GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0 + */ +export interface GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "credits"; + /** + * @generated from protobuf field: uint64 credits = 1 [jstype = JS_STRING]; + */ + credits: string; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPathElementsRequest + */ +export interface GetPathElementsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0 v0 = 1; + */ + v0: GetPathElementsRequest_GetPathElementsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0 + */ +export interface GetPathElementsRequest_GetPathElementsRequestV0 { + /** + * @generated from protobuf field: repeated bytes path = 1; + */ + path: Uint8Array[]; + /** + * @generated from protobuf field: repeated bytes keys = 2; + */ + keys: Uint8Array[]; + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse + */ +export interface GetPathElementsResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0 v0 = 1; + */ + v0: GetPathElementsResponse_GetPathElementsResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0 + */ +export interface GetPathElementsResponse_GetPathElementsResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "elements"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements elements = 1; + */ + elements: GetPathElementsResponse_GetPathElementsResponseV0_Elements; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements + */ +export interface GetPathElementsResponse_GetPathElementsResponseV0_Elements { + /** + * @generated from protobuf field: repeated bytes elements = 1; + */ + elements: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusRequest + */ +export interface GetStatusRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0 v0 = 1; + */ + v0: GetStatusRequest_GetStatusRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0 + */ +export interface GetStatusRequest_GetStatusRequestV0 { +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse + */ +export interface GetStatusResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0 v0 = 1; + */ + v0: GetStatusResponse_GetStatusResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0 + */ +export interface GetStatusResponse_GetStatusResponseV0 { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version version = 1; + */ + version?: GetStatusResponse_GetStatusResponseV0_Version; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node node = 2; + */ + node?: GetStatusResponse_GetStatusResponseV0_Node; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain chain = 3; + */ + chain?: GetStatusResponse_GetStatusResponseV0_Chain; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network network = 4; + */ + network?: GetStatusResponse_GetStatusResponseV0_Network; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync state_sync = 5; + */ + stateSync?: GetStatusResponse_GetStatusResponseV0_StateSync; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time time = 6; + */ + time?: GetStatusResponse_GetStatusResponseV0_Time; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version + */ +export interface GetStatusResponse_GetStatusResponseV0_Version { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software software = 1; + */ + software?: GetStatusResponse_GetStatusResponseV0_Version_Software; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol protocol = 2; + */ + protocol?: GetStatusResponse_GetStatusResponseV0_Version_Protocol; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software + */ +export interface GetStatusResponse_GetStatusResponseV0_Version_Software { + /** + * @generated from protobuf field: string dapi = 1; + */ + dapi: string; + /** + * It will be missing if Drive is not responding + * + * @generated from protobuf field: optional string drive = 2; + */ + drive?: string; + /** + * It will be missing if Tenderdash is not responding + * + * @generated from protobuf field: optional string tenderdash = 3; + */ + tenderdash?: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol + */ +export interface GetStatusResponse_GetStatusResponseV0_Version_Protocol { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash tenderdash = 1; + */ + tenderdash?: GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive drive = 2; + */ + drive?: GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash + */ +export interface GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash { + /** + * @generated from protobuf field: uint32 p2p = 1 [json_name = "p2p"]; + */ + p2P: number; + /** + * @generated from protobuf field: uint32 block = 2; + */ + block: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive + */ +export interface GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive { + /** + * @generated from protobuf field: uint32 latest = 3; + */ + latest: number; + /** + * @generated from protobuf field: uint32 current = 4; + */ + current: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time + */ +export interface GetStatusResponse_GetStatusResponseV0_Time { + /** + * @generated from protobuf field: uint64 local = 1 [jstype = JS_STRING]; + */ + local: string; + /** + * It will be missing if Drive is not responding + * + * @generated from protobuf field: optional uint64 block = 2 [jstype = JS_STRING]; + */ + block?: string; + /** + * It will be missing if Drive is not responding + * + * @generated from protobuf field: optional uint64 genesis = 3 [jstype = JS_STRING]; + */ + genesis?: string; + /** + * It will be missing if Drive is not responding + * + * @generated from protobuf field: optional uint32 epoch = 4; + */ + epoch?: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node + */ +export interface GetStatusResponse_GetStatusResponseV0_Node { + /** + * Platform node ID + * + * @generated from protobuf field: bytes id = 1; + */ + id: Uint8Array; + /** + * Evo masternode pro tx hash. It will be absent if the node is a fullnode + * + * @generated from protobuf field: optional bytes pro_tx_hash = 2; + */ + proTxHash?: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain + */ +export interface GetStatusResponse_GetStatusResponseV0_Chain { + /** + * @generated from protobuf field: bool catching_up = 1; + */ + catchingUp: boolean; + /** + * @generated from protobuf field: bytes latest_block_hash = 2; + */ + latestBlockHash: Uint8Array; + /** + * @generated from protobuf field: bytes latest_app_hash = 3; + */ + latestAppHash: Uint8Array; + /** + * @generated from protobuf field: uint64 latest_block_height = 4 [jstype = JS_STRING]; + */ + latestBlockHeight: string; + /** + * @generated from protobuf field: bytes earliest_block_hash = 5; + */ + earliestBlockHash: Uint8Array; + /** + * @generated from protobuf field: bytes earliest_app_hash = 6; + */ + earliestAppHash: Uint8Array; + /** + * @generated from protobuf field: uint64 earliest_block_height = 7 [jstype = JS_STRING]; + */ + earliestBlockHeight: string; + /** + * @generated from protobuf field: uint64 max_peer_block_height = 9 [jstype = JS_STRING]; + */ + maxPeerBlockHeight: string; + /** + * Latest known core height in consensus. + * It will be missing if Drive is not responding + * + * @generated from protobuf field: optional uint32 core_chain_locked_height = 10; + */ + coreChainLockedHeight?: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network + */ +export interface GetStatusResponse_GetStatusResponseV0_Network { + /** + * @generated from protobuf field: string chain_id = 1; + */ + chainId: string; + /** + * @generated from protobuf field: uint32 peers_count = 2; + */ + peersCount: number; + /** + * @generated from protobuf field: bool listening = 3; + */ + listening: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync + */ +export interface GetStatusResponse_GetStatusResponseV0_StateSync { + /** + * @generated from protobuf field: uint64 total_synced_time = 1 [jstype = JS_STRING]; + */ + totalSyncedTime: string; + /** + * @generated from protobuf field: uint64 remaining_time = 2 [jstype = JS_STRING]; + */ + remainingTime: string; + /** + * @generated from protobuf field: uint32 total_snapshots = 3; + */ + totalSnapshots: number; + /** + * @generated from protobuf field: uint64 chunk_process_avg_time = 4 [jstype = JS_STRING]; + */ + chunkProcessAvgTime: string; + /** + * @generated from protobuf field: uint64 snapshot_height = 5 [jstype = JS_STRING]; + */ + snapshotHeight: string; + /** + * @generated from protobuf field: uint64 snapshot_chunks_count = 6 [jstype = JS_STRING]; + */ + snapshotChunksCount: string; + /** + * @generated from protobuf field: uint64 backfilled_blocks = 7 [jstype = JS_STRING]; + */ + backfilledBlocks: string; + /** + * @generated from protobuf field: uint64 backfill_blocks_total = 8 [jstype = JS_STRING]; + */ + backfillBlocksTotal: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest + */ +export interface GetCurrentQuorumsInfoRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0 v0 = 1; + */ + v0: GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0 + */ +export interface GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0 { +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse + */ +export interface GetCurrentQuorumsInfoResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0 v0 = 1; + */ + v0: GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0 + */ +export interface GetCurrentQuorumsInfoResponse_ValidatorV0 { + /** + * @generated from protobuf field: bytes pro_tx_hash = 1; + */ + proTxHash: Uint8Array; + /** + * @generated from protobuf field: string node_ip = 2; + */ + nodeIp: string; + /** + * @generated from protobuf field: bool is_banned = 3; + */ + isBanned: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0 + */ +export interface GetCurrentQuorumsInfoResponse_ValidatorSetV0 { + /** + * @generated from protobuf field: bytes quorum_hash = 1; + */ + quorumHash: Uint8Array; + /** + * @generated from protobuf field: uint32 core_height = 2; + */ + coreHeight: number; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0 members = 3; + */ + members: GetCurrentQuorumsInfoResponse_ValidatorV0[]; + /** + * @generated from protobuf field: bytes threshold_public_key = 4; + */ + thresholdPublicKey: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0 + */ +export interface GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0 { + /** + * @generated from protobuf field: repeated bytes quorum_hashes = 1; + */ + quorumHashes: Uint8Array[]; + /** + * @generated from protobuf field: bytes current_quorum_hash = 2; + */ + currentQuorumHash: Uint8Array; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0 validator_sets = 3; + */ + validatorSets: GetCurrentQuorumsInfoResponse_ValidatorSetV0[]; + /** + * @generated from protobuf field: bytes last_block_proposer = 4; + */ + lastBlockProposer: Uint8Array; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 5; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + */ +export interface GetIdentityTokenBalancesRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 v0 = 1; + */ + v0: GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + */ +export interface GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: repeated bytes token_ids = 2; + */ + tokenIds: Uint8Array[]; + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + */ +export interface GetIdentityTokenBalancesResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 v0 = 1; + */ + v0: GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + */ +export interface GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "tokenBalances"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances token_balances = 1; + */ + tokenBalances: GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + */ +export interface GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: optional uint64 balance = 2; + */ + balance?: bigint; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + */ +export interface GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry token_balances = 1; + */ + tokenBalances: GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + */ +export interface GetIdentitiesTokenBalancesRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 v0 = 1; + */ + v0: GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + */ +export interface GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: repeated bytes identity_ids = 2; + */ + identityIds: Uint8Array[]; + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + */ +export interface GetIdentitiesTokenBalancesResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 v0 = 1; + */ + v0: GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + */ +export interface GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identityTokenBalances"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances identity_token_balances = 1; + */ + identityTokenBalances: GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + */ +export interface GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: optional uint64 balance = 2; + */ + balance?: bigint; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + */ +export interface GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry identity_token_balances = 1; + */ + identityTokenBalances: GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + */ +export interface GetIdentityTokenInfosRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 v0 = 1; + */ + v0: GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + */ +export interface GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: repeated bytes token_ids = 2; + */ + tokenIds: Uint8Array[]; + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + */ +export interface GetIdentityTokenInfosResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 v0 = 1; + */ + v0: GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + */ +export interface GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "tokenInfos"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos token_infos = 1; + */ + tokenInfos: GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + */ +export interface GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry { + /** + * @generated from protobuf field: bool frozen = 1; + */ + frozen: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + */ +export interface GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry info = 2; + */ + info?: GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + */ +export interface GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry token_infos = 1; + */ + tokenInfos: GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + */ +export interface GetIdentitiesTokenInfosRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 v0 = 1; + */ + v0: GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + */ +export interface GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: repeated bytes identity_ids = 2; + */ + identityIds: Uint8Array[]; + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + */ +export interface GetIdentitiesTokenInfosResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 v0 = 1; + */ + v0: GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + */ +export interface GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identityTokenInfos"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos identity_token_infos = 1; + */ + identityTokenInfos: GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + */ +export interface GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry { + /** + * @generated from protobuf field: bool frozen = 1; + */ + frozen: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + */ +export interface GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry info = 2; + */ + info?: GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + */ +export interface GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry token_infos = 1; + */ + tokenInfos: GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenStatusesRequest + */ +export interface GetTokenStatusesRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 v0 = 1; + */ + v0: GetTokenStatusesRequest_GetTokenStatusesRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + */ +export interface GetTokenStatusesRequest_GetTokenStatusesRequestV0 { + /** + * @generated from protobuf field: repeated bytes token_ids = 1; + */ + tokenIds: Uint8Array[]; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse + */ +export interface GetTokenStatusesResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 v0 = 1; + */ + v0: GetTokenStatusesResponse_GetTokenStatusesResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + */ +export interface GetTokenStatusesResponse_GetTokenStatusesResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "tokenStatuses"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses token_statuses = 1; + */ + tokenStatuses: GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + */ +export interface GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: optional bool paused = 2; + */ + paused?: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + */ +export interface GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry token_statuses = 1; + */ + tokenStatuses: GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + */ +export interface GetTokenPreProgrammedDistributionsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 v0 = 1; + */ + v0: GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + */ +export interface GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo start_at_info = 2; + */ + startAtInfo?: GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo; + /** + * @generated from protobuf field: optional uint32 limit = 3; + */ + limit?: number; + /** + * @generated from protobuf field: bool prove = 4; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + */ +export interface GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo { + /** + * @generated from protobuf field: uint64 start_time_ms = 1; + */ + startTimeMs: bigint; + /** + * @generated from protobuf field: optional bytes start_recipient = 2; + */ + startRecipient?: Uint8Array; + /** + * @generated from protobuf field: optional bool start_recipient_included = 3; + */ + startRecipientIncluded?: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + */ +export interface GetTokenPreProgrammedDistributionsResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 v0 = 1; + */ + v0: GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + */ +export interface GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "tokenDistributions"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions token_distributions = 1; + */ + tokenDistributions: GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + */ +export interface GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry { + /** + * @generated from protobuf field: bytes recipient_id = 1; + */ + recipientId: Uint8Array; + /** + * @generated from protobuf field: uint64 amount = 2; + */ + amount: bigint; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + */ +export interface GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry { + /** + * @generated from protobuf field: uint64 timestamp = 1; + */ + timestamp: bigint; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry distributions = 2; + */ + distributions: GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + */ +export interface GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry token_distributions = 1; + */ + tokenDistributions: GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + */ +export interface GetTokenTotalSupplyRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 v0 = 1; + */ + v0: GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + */ +export interface GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + */ +export interface GetTokenTotalSupplyResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 v0 = 1; + */ + v0: GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + */ +export interface GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "tokenTotalSupply"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry token_total_supply = 1; + */ + tokenTotalSupply: GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + */ +export interface GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: uint64 total_aggregated_amount_in_user_accounts = 2; + */ + totalAggregatedAmountInUserAccounts: bigint; + /** + * @generated from protobuf field: uint64 total_system_amount = 3; + */ + totalSystemAmount: bigint; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfoRequest + */ +export interface GetGroupInfoRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 v0 = 1; + */ + v0: GetGroupInfoRequest_GetGroupInfoRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + */ +export interface GetGroupInfoRequest_GetGroupInfoRequestV0 { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: uint32 group_contract_position = 2; + */ + groupContractPosition: number; + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse + */ +export interface GetGroupInfoResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 v0 = 1; + */ + v0: GetGroupInfoResponse_GetGroupInfoResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + */ +export interface GetGroupInfoResponse_GetGroupInfoResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "groupInfo"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo group_info = 1; + */ + groupInfo: GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 4; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + */ +export interface GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry { + /** + * @generated from protobuf field: bytes member_id = 1; + */ + memberId: Uint8Array; + /** + * @generated from protobuf field: uint32 power = 2; + */ + power: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + */ +export interface GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry members = 1; + */ + members: GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry[]; + /** + * @generated from protobuf field: uint32 group_required_power = 2; + */ + groupRequiredPower: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + */ +export interface GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo { + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry group_info = 1; + */ + groupInfo?: GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest + */ +export interface GetGroupInfosRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 v0 = 1; + */ + v0: GetGroupInfosRequest_GetGroupInfosRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + */ +export interface GetGroupInfosRequest_StartAtGroupContractPosition { + /** + * @generated from protobuf field: uint32 start_group_contract_position = 1; + */ + startGroupContractPosition: number; + /** + * @generated from protobuf field: bool start_group_contract_position_included = 2; + */ + startGroupContractPositionIncluded: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + */ +export interface GetGroupInfosRequest_GetGroupInfosRequestV0 { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition start_at_group_contract_position = 2; + */ + startAtGroupContractPosition?: GetGroupInfosRequest_StartAtGroupContractPosition; + /** + * @generated from protobuf field: optional uint32 count = 3; + */ + count?: number; + /** + * @generated from protobuf field: bool prove = 4; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse + */ +export interface GetGroupInfosResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 v0 = 1; + */ + v0: GetGroupInfosResponse_GetGroupInfosResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + */ +export interface GetGroupInfosResponse_GetGroupInfosResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "groupInfos"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos group_infos = 1; + */ + groupInfos: GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 4; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + */ +export interface GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry { + /** + * @generated from protobuf field: bytes member_id = 1; + */ + memberId: Uint8Array; + /** + * @generated from protobuf field: uint32 power = 2; + */ + power: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + */ +export interface GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry { + /** + * @generated from protobuf field: uint32 group_contract_position = 1; + */ + groupContractPosition: number; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry members = 2; + */ + members: GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry[]; + /** + * @generated from protobuf field: uint32 group_required_power = 3; + */ + groupRequiredPower: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + */ +export interface GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry group_infos = 1; + */ + groupInfos: GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest + */ +export interface GetGroupActionsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 v0 = 1; + */ + v0: GetGroupActionsRequest_GetGroupActionsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + */ +export interface GetGroupActionsRequest_StartAtActionId { + /** + * @generated from protobuf field: bytes start_action_id = 1; + */ + startActionId: Uint8Array; + /** + * @generated from protobuf field: bool start_action_id_included = 2; + */ + startActionIdIncluded: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + */ +export interface GetGroupActionsRequest_GetGroupActionsRequestV0 { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: uint32 group_contract_position = 2; + */ + groupContractPosition: number; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus status = 3; + */ + status: GetGroupActionsRequest_ActionStatus; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId start_at_action_id = 4; + */ + startAtActionId?: GetGroupActionsRequest_StartAtActionId; + /** + * @generated from protobuf field: optional uint32 count = 5; + */ + count?: number; + /** + * @generated from protobuf field: bool prove = 6; + */ + prove: boolean; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus + */ +export declare enum GetGroupActionsRequest_ActionStatus { + /** + * Request the active actions + * + * @generated from protobuf enum value: ACTIVE = 0; + */ + ACTIVE = 0, + /** + * Request the closed actions + * + * @generated from protobuf enum value: CLOSED = 1; + */ + CLOSED = 1 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse + */ +export interface GetGroupActionsResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 v0 = 1; + */ + v0: GetGroupActionsResponse_GetGroupActionsResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "groupActions"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions group_actions = 1; + */ + groupActions: GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * Mint event + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent { + /** + * @generated from protobuf field: uint64 amount = 1; + */ + amount: bigint; + /** + * @generated from protobuf field: bytes recipient_id = 2; + */ + recipientId: Uint8Array; + /** + * @generated from protobuf field: optional string public_note = 3; + */ + publicNote?: string; +} +/** + * Burn event + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent { + /** + * @generated from protobuf field: uint64 amount = 1; + */ + amount: bigint; + /** + * @generated from protobuf field: optional string public_note = 2; + */ + publicNote?: string; +} +/** + * Freeze event + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent { + /** + * @generated from protobuf field: bytes frozen_id = 1; + */ + frozenId: Uint8Array; + /** + * @generated from protobuf field: optional string public_note = 2; + */ + publicNote?: string; +} +/** + * Unfreeze event + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent { + /** + * @generated from protobuf field: bytes frozen_id = 1; + */ + frozenId: Uint8Array; + /** + * @generated from protobuf field: optional string public_note = 2; + */ + publicNote?: string; +} +/** + * Destroy frozen funds event + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent { + /** + * @generated from protobuf field: bytes frozen_id = 1; + */ + frozenId: Uint8Array; + /** + * @generated from protobuf field: uint64 amount = 2; + */ + amount: bigint; + /** + * @generated from protobuf field: optional string public_note = 3; + */ + publicNote?: string; +} +/** + * Shared encrypted note + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote { + /** + * @generated from protobuf field: uint32 sender_key_index = 1; + */ + senderKeyIndex: number; + /** + * @generated from protobuf field: uint32 recipient_key_index = 2; + */ + recipientKeyIndex: number; + /** + * @generated from protobuf field: bytes encrypted_data = 3; + */ + encryptedData: Uint8Array; +} +/** + * Personal encrypted note + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote { + /** + * @generated from protobuf field: uint32 root_encryption_key_index = 1; + */ + rootEncryptionKeyIndex: number; + /** + * @generated from protobuf field: uint32 derivation_encryption_key_index = 2; + */ + derivationEncryptionKeyIndex: number; + /** + * @generated from protobuf field: bytes encrypted_data = 3; + */ + encryptedData: Uint8Array; +} +/** + * Emergency action event + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType action_type = 1; + */ + actionType: GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType; + /** + * @generated from protobuf field: optional string public_note = 2; + */ + publicNote?: string; +} +/** + * Enum for emergency action types + * + * @generated from protobuf enum org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType + */ +export declare enum GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType { + /** + * Pause action + * + * @generated from protobuf enum value: PAUSE = 0; + */ + PAUSE = 0, + /** + * Resume action + * + * @generated from protobuf enum value: RESUME = 1; + */ + RESUME = 1 +} +/** + * Token config update event + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent { + /** + * @generated from protobuf field: bytes token_config_update_item = 1; + */ + tokenConfigUpdateItem: Uint8Array; + /** + * @generated from protobuf field: optional string public_note = 2; + */ + publicNote?: string; +} +/** + * Event associated with this action + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent { + /** + * @generated from protobuf oneof: event_type + */ + eventType: { + oneofKind: "tokenEvent"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent token_event = 1; + */ + tokenEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent; + } | { + oneofKind: "documentEvent"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent document_event = 2; + */ + documentEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent; + } | { + oneofKind: "contractEvent"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent contract_event = 3; + */ + contractEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent { + /** + * @generated from protobuf oneof: type + */ + type: { + oneofKind: "create"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent create = 1; + */ + create: GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent { + /** + * @generated from protobuf field: bytes created_document = 1; + */ + createdDocument: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent { + /** + * @generated from protobuf field: bytes updated_contract = 1; + */ + updatedContract: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent { + /** + * @generated from protobuf oneof: type + */ + type: { + oneofKind: "update"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent update = 1; + */ + update: GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent; + } | { + oneofKind: undefined; + }; +} +/** + * Details for token events + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent { + /** + * @generated from protobuf oneof: type + */ + type: { + oneofKind: "mint"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent mint = 1; + */ + mint: GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent; + } | { + oneofKind: "burn"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent burn = 2; + */ + burn: GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent; + } | { + oneofKind: "freeze"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent freeze = 3; + */ + freeze: GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent; + } | { + oneofKind: "unfreeze"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent unfreeze = 4; + */ + unfreeze: GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent; + } | { + oneofKind: "destroyFrozenFunds"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent destroy_frozen_funds = 5; + */ + destroyFrozenFunds: GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent; + } | { + oneofKind: "emergencyAction"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent emergency_action = 6; + */ + emergencyAction: GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent; + } | { + oneofKind: "tokenConfigUpdate"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent token_config_update = 7; + */ + tokenConfigUpdate: GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry { + /** + * @generated from protobuf field: bytes action_id = 1; + */ + actionId: Uint8Array; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent event = 2; + */ + event?: GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry group_actions = 1; + */ + groupActions: GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersRequest + */ +export interface GetGroupActionSignersRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 v0 = 1; + */ + v0: GetGroupActionSignersRequest_GetGroupActionSignersRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + */ +export interface GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: uint32 group_contract_position = 2; + */ + groupContractPosition: number; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus status = 3; + */ + status: GetGroupActionSignersRequest_ActionStatus; + /** + * @generated from protobuf field: bytes action_id = 4; + */ + actionId: Uint8Array; + /** + * @generated from protobuf field: bool prove = 5; + */ + prove: boolean; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus + */ +export declare enum GetGroupActionSignersRequest_ActionStatus { + /** + * Request the active actions + * + * @generated from protobuf enum value: ACTIVE = 0; + */ + ACTIVE = 0, + /** + * Request the closed actions + * + * @generated from protobuf enum value: CLOSED = 1; + */ + CLOSED = 1 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse + */ +export interface GetGroupActionSignersResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 v0 = 1; + */ + v0: GetGroupActionSignersResponse_GetGroupActionSignersResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + */ +export interface GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "groupActionSigners"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners group_action_signers = 1; + */ + groupActionSigners: GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + */ +export interface GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner { + /** + * @generated from protobuf field: bytes signer_id = 1; + */ + signerId: Uint8Array; + /** + * @generated from protobuf field: uint32 power = 2; + */ + power: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + */ +export interface GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner signers = 1; + */ + signers: GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner[]; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.KeyPurpose + */ +export declare enum KeyPurpose { + /** + * @generated from protobuf enum value: AUTHENTICATION = 0; + */ + AUTHENTICATION = 0, + /** + * @generated from protobuf enum value: ENCRYPTION = 1; + */ + ENCRYPTION = 1, + /** + * @generated from protobuf enum value: DECRYPTION = 2; + */ + DECRYPTION = 2, + /** + * @generated from protobuf enum value: TRANSFER = 3; + */ + TRANSFER = 3, + /** + * @generated from protobuf enum value: VOTING = 5; + */ + VOTING = 5 +} +declare class Proof$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.Proof + */ +export declare const Proof: Proof$Type; +declare class ResponseMetadata$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.ResponseMetadata + */ +export declare const ResponseMetadata: ResponseMetadata$Type; +declare class StateTransitionBroadcastError$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.StateTransitionBroadcastError + */ +export declare const StateTransitionBroadcastError: StateTransitionBroadcastError$Type; +declare class BroadcastStateTransitionRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BroadcastStateTransitionRequest + */ +export declare const BroadcastStateTransitionRequest: BroadcastStateTransitionRequest$Type; +declare class BroadcastStateTransitionResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BroadcastStateTransitionResponse + */ +export declare const BroadcastStateTransitionResponse: BroadcastStateTransitionResponse$Type; +declare class GetIdentityRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityRequest + */ +export declare const GetIdentityRequest: GetIdentityRequest$Type; +declare class GetIdentityRequest_GetIdentityRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0 + */ +export declare const GetIdentityRequest_GetIdentityRequestV0: GetIdentityRequest_GetIdentityRequestV0$Type; +declare class GetIdentityNonceRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityNonceRequest + */ +export declare const GetIdentityNonceRequest: GetIdentityNonceRequest$Type; +declare class GetIdentityNonceRequest_GetIdentityNonceRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0 + */ +export declare const GetIdentityNonceRequest_GetIdentityNonceRequestV0: GetIdentityNonceRequest_GetIdentityNonceRequestV0$Type; +declare class GetIdentityContractNonceRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceRequest + */ +export declare const GetIdentityContractNonceRequest: GetIdentityContractNonceRequest$Type; +declare class GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0 + */ +export declare const GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0: GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0$Type; +declare class GetIdentityBalanceRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceRequest + */ +export declare const GetIdentityBalanceRequest: GetIdentityBalanceRequest$Type; +declare class GetIdentityBalanceRequest_GetIdentityBalanceRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0 + */ +export declare const GetIdentityBalanceRequest_GetIdentityBalanceRequestV0: GetIdentityBalanceRequest_GetIdentityBalanceRequestV0$Type; +declare class GetIdentityBalanceAndRevisionRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest + */ +export declare const GetIdentityBalanceAndRevisionRequest: GetIdentityBalanceAndRevisionRequest$Type; +declare class GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0 + */ +export declare const GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0: GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0$Type; +declare class GetIdentityResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityResponse + */ +export declare const GetIdentityResponse: GetIdentityResponse$Type; +declare class GetIdentityResponse_GetIdentityResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0 + */ +export declare const GetIdentityResponse_GetIdentityResponseV0: GetIdentityResponse_GetIdentityResponseV0$Type; +declare class GetIdentityNonceResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityNonceResponse + */ +export declare const GetIdentityNonceResponse: GetIdentityNonceResponse$Type; +declare class GetIdentityNonceResponse_GetIdentityNonceResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0 + */ +export declare const GetIdentityNonceResponse_GetIdentityNonceResponseV0: GetIdentityNonceResponse_GetIdentityNonceResponseV0$Type; +declare class GetIdentityContractNonceResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceResponse + */ +export declare const GetIdentityContractNonceResponse: GetIdentityContractNonceResponse$Type; +declare class GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0 + */ +export declare const GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0: GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0$Type; +declare class GetIdentityBalanceResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceResponse + */ +export declare const GetIdentityBalanceResponse: GetIdentityBalanceResponse$Type; +declare class GetIdentityBalanceResponse_GetIdentityBalanceResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0 + */ +export declare const GetIdentityBalanceResponse_GetIdentityBalanceResponseV0: GetIdentityBalanceResponse_GetIdentityBalanceResponseV0$Type; +declare class GetIdentityBalanceAndRevisionResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse + */ +export declare const GetIdentityBalanceAndRevisionResponse: GetIdentityBalanceAndRevisionResponse$Type; +declare class GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0 + */ +export declare const GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0: GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0$Type; +declare class GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision + */ +export declare const GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision: GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision$Type; +declare class KeyRequestType$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.KeyRequestType + */ +export declare const KeyRequestType: KeyRequestType$Type; +declare class AllKeys$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.AllKeys + */ +export declare const AllKeys: AllKeys$Type; +declare class SpecificKeys$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.SpecificKeys + */ +export declare const SpecificKeys: SpecificKeys$Type; +declare class SearchKey$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.SearchKey + */ +export declare const SearchKey: SearchKey$Type; +declare class SecurityLevelMap$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.SecurityLevelMap + */ +export declare const SecurityLevelMap: SecurityLevelMap$Type; +declare class GetIdentityKeysRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysRequest + */ +export declare const GetIdentityKeysRequest: GetIdentityKeysRequest$Type; +declare class GetIdentityKeysRequest_GetIdentityKeysRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0 + */ +export declare const GetIdentityKeysRequest_GetIdentityKeysRequestV0: GetIdentityKeysRequest_GetIdentityKeysRequestV0$Type; +declare class GetIdentityKeysResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse + */ +export declare const GetIdentityKeysResponse: GetIdentityKeysResponse$Type; +declare class GetIdentityKeysResponse_GetIdentityKeysResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0 + */ +export declare const GetIdentityKeysResponse_GetIdentityKeysResponseV0: GetIdentityKeysResponse_GetIdentityKeysResponseV0$Type; +declare class GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys + */ +export declare const GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys: GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys$Type; +declare class GetIdentitiesContractKeysRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest + */ +export declare const GetIdentitiesContractKeysRequest: GetIdentitiesContractKeysRequest$Type; +declare class GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0 + */ +export declare const GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0: GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0$Type; +declare class GetIdentitiesContractKeysResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse + */ +export declare const GetIdentitiesContractKeysResponse: GetIdentitiesContractKeysResponse$Type; +declare class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0 + */ +export declare const GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0: GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0$Type; +declare class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys + */ +export declare const GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys: GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys$Type; +declare class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys + */ +export declare const GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys: GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys$Type; +declare class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys + */ +export declare const GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys: GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys$Type; +declare class GetEvonodesProposedEpochBlocksByIdsRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + */ +export declare const GetEvonodesProposedEpochBlocksByIdsRequest: GetEvonodesProposedEpochBlocksByIdsRequest$Type; +declare class GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + */ +export declare const GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0: GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0$Type; +declare class GetEvonodesProposedEpochBlocksResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + */ +export declare const GetEvonodesProposedEpochBlocksResponse: GetEvonodesProposedEpochBlocksResponse$Type; +declare class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + */ +export declare const GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0: GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0$Type; +declare class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + */ +export declare const GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks: GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks$Type; +declare class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + */ +export declare const GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks: GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks$Type; +declare class GetEvonodesProposedEpochBlocksByRangeRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + */ +export declare const GetEvonodesProposedEpochBlocksByRangeRequest: GetEvonodesProposedEpochBlocksByRangeRequest$Type; +declare class GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + */ +export declare const GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0: GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0$Type; +declare class GetIdentitiesBalancesRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + */ +export declare const GetIdentitiesBalancesRequest: GetIdentitiesBalancesRequest$Type; +declare class GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + */ +export declare const GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0: GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0$Type; +declare class GetIdentitiesBalancesResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + */ +export declare const GetIdentitiesBalancesResponse: GetIdentitiesBalancesResponse$Type; +declare class GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + */ +export declare const GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0: GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0$Type; +declare class GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + */ +export declare const GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance: GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance$Type; +declare class GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + */ +export declare const GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances: GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances$Type; +declare class GetProofsRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest + */ +export declare const GetProofsRequest: GetProofsRequest$Type; +declare class GetProofsRequest_GetProofsRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 + */ +export declare const GetProofsRequest_GetProofsRequestV0: GetProofsRequest_GetProofsRequestV0$Type; +declare class GetProofsRequest_GetProofsRequestV0_DocumentRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest + */ +export declare const GetProofsRequest_GetProofsRequestV0_DocumentRequest: GetProofsRequest_GetProofsRequestV0_DocumentRequest$Type; +declare class GetProofsRequest_GetProofsRequestV0_IdentityRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest + */ +export declare const GetProofsRequest_GetProofsRequestV0_IdentityRequest: GetProofsRequest_GetProofsRequestV0_IdentityRequest$Type; +declare class GetProofsRequest_GetProofsRequestV0_ContractRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest + */ +export declare const GetProofsRequest_GetProofsRequestV0_ContractRequest: GetProofsRequest_GetProofsRequestV0_ContractRequest$Type; +declare class GetProofsRequest_GetProofsRequestV0_VoteStatusRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest + */ +export declare const GetProofsRequest_GetProofsRequestV0_VoteStatusRequest: GetProofsRequest_GetProofsRequestV0_VoteStatusRequest$Type; +declare class GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest + */ +export declare const GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest: GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest$Type; +declare class GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + */ +export declare const GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest: GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest$Type; +declare class GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + */ +export declare const GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest: GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest$Type; +declare class GetProofsRequest_GetProofsRequestV0_TokenStatusRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + */ +export declare const GetProofsRequest_GetProofsRequestV0_TokenStatusRequest: GetProofsRequest_GetProofsRequestV0_TokenStatusRequest$Type; +declare class GetProofsResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsResponse + */ +export declare const GetProofsResponse: GetProofsResponse$Type; +declare class GetProofsResponse_GetProofsResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0 + */ +export declare const GetProofsResponse_GetProofsResponseV0: GetProofsResponse_GetProofsResponseV0$Type; +declare class GetDataContractRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractRequest + */ +export declare const GetDataContractRequest: GetDataContractRequest$Type; +declare class GetDataContractRequest_GetDataContractRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0 + */ +export declare const GetDataContractRequest_GetDataContractRequestV0: GetDataContractRequest_GetDataContractRequestV0$Type; +declare class GetDataContractResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractResponse + */ +export declare const GetDataContractResponse: GetDataContractResponse$Type; +declare class GetDataContractResponse_GetDataContractResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0 + */ +export declare const GetDataContractResponse_GetDataContractResponseV0: GetDataContractResponse_GetDataContractResponseV0$Type; +declare class GetDataContractsRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsRequest + */ +export declare const GetDataContractsRequest: GetDataContractsRequest$Type; +declare class GetDataContractsRequest_GetDataContractsRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0 + */ +export declare const GetDataContractsRequest_GetDataContractsRequestV0: GetDataContractsRequest_GetDataContractsRequestV0$Type; +declare class GetDataContractsResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse + */ +export declare const GetDataContractsResponse: GetDataContractsResponse$Type; +declare class GetDataContractsResponse_DataContractEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry + */ +export declare const GetDataContractsResponse_DataContractEntry: GetDataContractsResponse_DataContractEntry$Type; +declare class GetDataContractsResponse_DataContracts$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts + */ +export declare const GetDataContractsResponse_DataContracts: GetDataContractsResponse_DataContracts$Type; +declare class GetDataContractsResponse_GetDataContractsResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0 + */ +export declare const GetDataContractsResponse_GetDataContractsResponseV0: GetDataContractsResponse_GetDataContractsResponseV0$Type; +declare class GetDataContractHistoryRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryRequest + */ +export declare const GetDataContractHistoryRequest: GetDataContractHistoryRequest$Type; +declare class GetDataContractHistoryRequest_GetDataContractHistoryRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0 + */ +export declare const GetDataContractHistoryRequest_GetDataContractHistoryRequestV0: GetDataContractHistoryRequest_GetDataContractHistoryRequestV0$Type; +declare class GetDataContractHistoryResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse + */ +export declare const GetDataContractHistoryResponse: GetDataContractHistoryResponse$Type; +declare class GetDataContractHistoryResponse_GetDataContractHistoryResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0 + */ +export declare const GetDataContractHistoryResponse_GetDataContractHistoryResponseV0: GetDataContractHistoryResponse_GetDataContractHistoryResponseV0$Type; +declare class GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry + */ +export declare const GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry: GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry$Type; +declare class GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory + */ +export declare const GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory: GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory$Type; +declare class GetDocumentsRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsRequest + */ +export declare const GetDocumentsRequest: GetDocumentsRequest$Type; +declare class GetDocumentsRequest_GetDocumentsRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0 + */ +export declare const GetDocumentsRequest_GetDocumentsRequestV0: GetDocumentsRequest_GetDocumentsRequestV0$Type; +declare class GetDocumentsResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse + */ +export declare const GetDocumentsResponse: GetDocumentsResponse$Type; +declare class GetDocumentsResponse_GetDocumentsResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0 + */ +export declare const GetDocumentsResponse_GetDocumentsResponseV0: GetDocumentsResponse_GetDocumentsResponseV0$Type; +declare class GetDocumentsResponse_GetDocumentsResponseV0_Documents$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents + */ +export declare const GetDocumentsResponse_GetDocumentsResponseV0_Documents: GetDocumentsResponse_GetDocumentsResponseV0_Documents$Type; +declare class GetIdentityByPublicKeyHashRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest + */ +export declare const GetIdentityByPublicKeyHashRequest: GetIdentityByPublicKeyHashRequest$Type; +declare class GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0 + */ +export declare const GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0: GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0$Type; +declare class GetIdentityByPublicKeyHashResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse + */ +export declare const GetIdentityByPublicKeyHashResponse: GetIdentityByPublicKeyHashResponse$Type; +declare class GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0 + */ +export declare const GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0: GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0$Type; +declare class WaitForStateTransitionResultRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest + */ +export declare const WaitForStateTransitionResultRequest: WaitForStateTransitionResultRequest$Type; +declare class WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0 + */ +export declare const WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0: WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0$Type; +declare class WaitForStateTransitionResultResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse + */ +export declare const WaitForStateTransitionResultResponse: WaitForStateTransitionResultResponse$Type; +declare class WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0 + */ +export declare const WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0: WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0$Type; +declare class GetConsensusParamsRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsRequest + */ +export declare const GetConsensusParamsRequest: GetConsensusParamsRequest$Type; +declare class GetConsensusParamsRequest_GetConsensusParamsRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0 + */ +export declare const GetConsensusParamsRequest_GetConsensusParamsRequestV0: GetConsensusParamsRequest_GetConsensusParamsRequestV0$Type; +declare class GetConsensusParamsResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse + */ +export declare const GetConsensusParamsResponse: GetConsensusParamsResponse$Type; +declare class GetConsensusParamsResponse_ConsensusParamsBlock$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock + */ +export declare const GetConsensusParamsResponse_ConsensusParamsBlock: GetConsensusParamsResponse_ConsensusParamsBlock$Type; +declare class GetConsensusParamsResponse_ConsensusParamsEvidence$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence + */ +export declare const GetConsensusParamsResponse_ConsensusParamsEvidence: GetConsensusParamsResponse_ConsensusParamsEvidence$Type; +declare class GetConsensusParamsResponse_GetConsensusParamsResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0 + */ +export declare const GetConsensusParamsResponse_GetConsensusParamsResponseV0: GetConsensusParamsResponse_GetConsensusParamsResponseV0$Type; +declare class GetProtocolVersionUpgradeStateRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest + */ +export declare const GetProtocolVersionUpgradeStateRequest: GetProtocolVersionUpgradeStateRequest$Type; +declare class GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0 + */ +export declare const GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0: GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0$Type; +declare class GetProtocolVersionUpgradeStateResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse + */ +export declare const GetProtocolVersionUpgradeStateResponse: GetProtocolVersionUpgradeStateResponse$Type; +declare class GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0 + */ +export declare const GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0: GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0$Type; +declare class GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions + */ +export declare const GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions: GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions$Type; +declare class GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry + */ +export declare const GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry: GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry$Type; +declare class GetProtocolVersionUpgradeVoteStatusRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest + */ +export declare const GetProtocolVersionUpgradeVoteStatusRequest: GetProtocolVersionUpgradeVoteStatusRequest$Type; +declare class GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0 + */ +export declare const GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0: GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0$Type; +declare class GetProtocolVersionUpgradeVoteStatusResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse + */ +export declare const GetProtocolVersionUpgradeVoteStatusResponse: GetProtocolVersionUpgradeVoteStatusResponse$Type; +declare class GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0 + */ +export declare const GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0: GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0$Type; +declare class GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals + */ +export declare const GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals: GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals$Type; +declare class GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal + */ +export declare const GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal: GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal$Type; +declare class GetEpochsInfoRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoRequest + */ +export declare const GetEpochsInfoRequest: GetEpochsInfoRequest$Type; +declare class GetEpochsInfoRequest_GetEpochsInfoRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0 + */ +export declare const GetEpochsInfoRequest_GetEpochsInfoRequestV0: GetEpochsInfoRequest_GetEpochsInfoRequestV0$Type; +declare class GetEpochsInfoResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse + */ +export declare const GetEpochsInfoResponse: GetEpochsInfoResponse$Type; +declare class GetEpochsInfoResponse_GetEpochsInfoResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0 + */ +export declare const GetEpochsInfoResponse_GetEpochsInfoResponseV0: GetEpochsInfoResponse_GetEpochsInfoResponseV0$Type; +declare class GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos + */ +export declare const GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos: GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos$Type; +declare class GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo + */ +export declare const GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo: GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo$Type; +declare class GetContestedResourcesRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest + */ +export declare const GetContestedResourcesRequest: GetContestedResourcesRequest$Type; +declare class GetContestedResourcesRequest_GetContestedResourcesRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0 + */ +export declare const GetContestedResourcesRequest_GetContestedResourcesRequestV0: GetContestedResourcesRequest_GetContestedResourcesRequestV0$Type; +declare class GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo + */ +export declare const GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo: GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo$Type; +declare class GetContestedResourcesResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse + */ +export declare const GetContestedResourcesResponse: GetContestedResourcesResponse$Type; +declare class GetContestedResourcesResponse_GetContestedResourcesResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0 + */ +export declare const GetContestedResourcesResponse_GetContestedResourcesResponseV0: GetContestedResourcesResponse_GetContestedResourcesResponseV0$Type; +declare class GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues + */ +export declare const GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues: GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues$Type; +declare class GetVotePollsByEndDateRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest + */ +export declare const GetVotePollsByEndDateRequest: GetVotePollsByEndDateRequest$Type; +declare class GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0 + */ +export declare const GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0: GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0$Type; +declare class GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo + */ +export declare const GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo: GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo$Type; +declare class GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo + */ +export declare const GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo: GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo$Type; +declare class GetVotePollsByEndDateResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse + */ +export declare const GetVotePollsByEndDateResponse: GetVotePollsByEndDateResponse$Type; +declare class GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0 + */ +export declare const GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0: GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0$Type; +declare class GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp + */ +export declare const GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp: GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp$Type; +declare class GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps + */ +export declare const GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps: GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps$Type; +declare class GetContestedResourceVoteStateRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest + */ +export declare const GetContestedResourceVoteStateRequest: GetContestedResourceVoteStateRequest$Type; +declare class GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0 + */ +export declare const GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0: GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0$Type; +declare class GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo + */ +export declare const GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo: GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo$Type; +declare class GetContestedResourceVoteStateResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse + */ +export declare const GetContestedResourceVoteStateResponse: GetContestedResourceVoteStateResponse$Type; +declare class GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0 + */ +export declare const GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0: GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0$Type; +declare class GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo + */ +export declare const GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo: GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo$Type; +declare class GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders + */ +export declare const GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders: GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders$Type; +declare class GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender + */ +export declare const GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender: GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender$Type; +declare class GetContestedResourceVotersForIdentityRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest + */ +export declare const GetContestedResourceVotersForIdentityRequest: GetContestedResourceVotersForIdentityRequest$Type; +declare class GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0 + */ +export declare const GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0: GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0$Type; +declare class GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo + */ +export declare const GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo: GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo$Type; +declare class GetContestedResourceVotersForIdentityResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse + */ +export declare const GetContestedResourceVotersForIdentityResponse: GetContestedResourceVotersForIdentityResponse$Type; +declare class GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0 + */ +export declare const GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0: GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0$Type; +declare class GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters + */ +export declare const GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters: GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters$Type; +declare class GetContestedResourceIdentityVotesRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest + */ +export declare const GetContestedResourceIdentityVotesRequest: GetContestedResourceIdentityVotesRequest$Type; +declare class GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0 + */ +export declare const GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0: GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0$Type; +declare class GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo + */ +export declare const GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo: GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo$Type; +declare class GetContestedResourceIdentityVotesResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse + */ +export declare const GetContestedResourceIdentityVotesResponse: GetContestedResourceIdentityVotesResponse$Type; +declare class GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0 + */ +export declare const GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0: GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0$Type; +declare class GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes + */ +export declare const GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes: GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes$Type; +declare class GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice + */ +export declare const GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice: GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice$Type; +declare class GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote + */ +export declare const GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote: GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote$Type; +declare class GetPrefundedSpecializedBalanceRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest + */ +export declare const GetPrefundedSpecializedBalanceRequest: GetPrefundedSpecializedBalanceRequest$Type; +declare class GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0 + */ +export declare const GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0: GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0$Type; +declare class GetPrefundedSpecializedBalanceResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse + */ +export declare const GetPrefundedSpecializedBalanceResponse: GetPrefundedSpecializedBalanceResponse$Type; +declare class GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0 + */ +export declare const GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0: GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0$Type; +declare class GetTotalCreditsInPlatformRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest + */ +export declare const GetTotalCreditsInPlatformRequest: GetTotalCreditsInPlatformRequest$Type; +declare class GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0 + */ +export declare const GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0: GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0$Type; +declare class GetTotalCreditsInPlatformResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse + */ +export declare const GetTotalCreditsInPlatformResponse: GetTotalCreditsInPlatformResponse$Type; +declare class GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0 + */ +export declare const GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0: GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0$Type; +declare class GetPathElementsRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsRequest + */ +export declare const GetPathElementsRequest: GetPathElementsRequest$Type; +declare class GetPathElementsRequest_GetPathElementsRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0 + */ +export declare const GetPathElementsRequest_GetPathElementsRequestV0: GetPathElementsRequest_GetPathElementsRequestV0$Type; +declare class GetPathElementsResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse + */ +export declare const GetPathElementsResponse: GetPathElementsResponse$Type; +declare class GetPathElementsResponse_GetPathElementsResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0 + */ +export declare const GetPathElementsResponse_GetPathElementsResponseV0: GetPathElementsResponse_GetPathElementsResponseV0$Type; +declare class GetPathElementsResponse_GetPathElementsResponseV0_Elements$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements + */ +export declare const GetPathElementsResponse_GetPathElementsResponseV0_Elements: GetPathElementsResponse_GetPathElementsResponseV0_Elements$Type; +declare class GetStatusRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusRequest + */ +export declare const GetStatusRequest: GetStatusRequest$Type; +declare class GetStatusRequest_GetStatusRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0 + */ +export declare const GetStatusRequest_GetStatusRequestV0: GetStatusRequest_GetStatusRequestV0$Type; +declare class GetStatusResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse + */ +export declare const GetStatusResponse: GetStatusResponse$Type; +declare class GetStatusResponse_GetStatusResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0 + */ +export declare const GetStatusResponse_GetStatusResponseV0: GetStatusResponse_GetStatusResponseV0$Type; +declare class GetStatusResponse_GetStatusResponseV0_Version$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version + */ +export declare const GetStatusResponse_GetStatusResponseV0_Version: GetStatusResponse_GetStatusResponseV0_Version$Type; +declare class GetStatusResponse_GetStatusResponseV0_Version_Software$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software + */ +export declare const GetStatusResponse_GetStatusResponseV0_Version_Software: GetStatusResponse_GetStatusResponseV0_Version_Software$Type; +declare class GetStatusResponse_GetStatusResponseV0_Version_Protocol$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol + */ +export declare const GetStatusResponse_GetStatusResponseV0_Version_Protocol: GetStatusResponse_GetStatusResponseV0_Version_Protocol$Type; +declare class GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash + */ +export declare const GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash: GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash$Type; +declare class GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive + */ +export declare const GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive: GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive$Type; +declare class GetStatusResponse_GetStatusResponseV0_Time$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time + */ +export declare const GetStatusResponse_GetStatusResponseV0_Time: GetStatusResponse_GetStatusResponseV0_Time$Type; +declare class GetStatusResponse_GetStatusResponseV0_Node$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node + */ +export declare const GetStatusResponse_GetStatusResponseV0_Node: GetStatusResponse_GetStatusResponseV0_Node$Type; +declare class GetStatusResponse_GetStatusResponseV0_Chain$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain + */ +export declare const GetStatusResponse_GetStatusResponseV0_Chain: GetStatusResponse_GetStatusResponseV0_Chain$Type; +declare class GetStatusResponse_GetStatusResponseV0_Network$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network + */ +export declare const GetStatusResponse_GetStatusResponseV0_Network: GetStatusResponse_GetStatusResponseV0_Network$Type; +declare class GetStatusResponse_GetStatusResponseV0_StateSync$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync + */ +export declare const GetStatusResponse_GetStatusResponseV0_StateSync: GetStatusResponse_GetStatusResponseV0_StateSync$Type; +declare class GetCurrentQuorumsInfoRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest + */ +export declare const GetCurrentQuorumsInfoRequest: GetCurrentQuorumsInfoRequest$Type; +declare class GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0 + */ +export declare const GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0: GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0$Type; +declare class GetCurrentQuorumsInfoResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse + */ +export declare const GetCurrentQuorumsInfoResponse: GetCurrentQuorumsInfoResponse$Type; +declare class GetCurrentQuorumsInfoResponse_ValidatorV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0 + */ +export declare const GetCurrentQuorumsInfoResponse_ValidatorV0: GetCurrentQuorumsInfoResponse_ValidatorV0$Type; +declare class GetCurrentQuorumsInfoResponse_ValidatorSetV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0 + */ +export declare const GetCurrentQuorumsInfoResponse_ValidatorSetV0: GetCurrentQuorumsInfoResponse_ValidatorSetV0$Type; +declare class GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0 + */ +export declare const GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0: GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0$Type; +declare class GetIdentityTokenBalancesRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + */ +export declare const GetIdentityTokenBalancesRequest: GetIdentityTokenBalancesRequest$Type; +declare class GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + */ +export declare const GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0: GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0$Type; +declare class GetIdentityTokenBalancesResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + */ +export declare const GetIdentityTokenBalancesResponse: GetIdentityTokenBalancesResponse$Type; +declare class GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + */ +export declare const GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0: GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0$Type; +declare class GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + */ +export declare const GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry: GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry$Type; +declare class GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + */ +export declare const GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances: GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances$Type; +declare class GetIdentitiesTokenBalancesRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + */ +export declare const GetIdentitiesTokenBalancesRequest: GetIdentitiesTokenBalancesRequest$Type; +declare class GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + */ +export declare const GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0: GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0$Type; +declare class GetIdentitiesTokenBalancesResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + */ +export declare const GetIdentitiesTokenBalancesResponse: GetIdentitiesTokenBalancesResponse$Type; +declare class GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + */ +export declare const GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0: GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0$Type; +declare class GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + */ +export declare const GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry: GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry$Type; +declare class GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + */ +export declare const GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances: GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances$Type; +declare class GetIdentityTokenInfosRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + */ +export declare const GetIdentityTokenInfosRequest: GetIdentityTokenInfosRequest$Type; +declare class GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + */ +export declare const GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0: GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0$Type; +declare class GetIdentityTokenInfosResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + */ +export declare const GetIdentityTokenInfosResponse: GetIdentityTokenInfosResponse$Type; +declare class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + */ +export declare const GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0: GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0$Type; +declare class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + */ +export declare const GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry: GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry$Type; +declare class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + */ +export declare const GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry: GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry$Type; +declare class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + */ +export declare const GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos: GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos$Type; +declare class GetIdentitiesTokenInfosRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + */ +export declare const GetIdentitiesTokenInfosRequest: GetIdentitiesTokenInfosRequest$Type; +declare class GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + */ +export declare const GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0: GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0$Type; +declare class GetIdentitiesTokenInfosResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + */ +export declare const GetIdentitiesTokenInfosResponse: GetIdentitiesTokenInfosResponse$Type; +declare class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + */ +export declare const GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0: GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0$Type; +declare class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + */ +export declare const GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry: GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry$Type; +declare class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + */ +export declare const GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry: GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry$Type; +declare class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + */ +export declare const GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos: GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos$Type; +declare class GetTokenStatusesRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesRequest + */ +export declare const GetTokenStatusesRequest: GetTokenStatusesRequest$Type; +declare class GetTokenStatusesRequest_GetTokenStatusesRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + */ +export declare const GetTokenStatusesRequest_GetTokenStatusesRequestV0: GetTokenStatusesRequest_GetTokenStatusesRequestV0$Type; +declare class GetTokenStatusesResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse + */ +export declare const GetTokenStatusesResponse: GetTokenStatusesResponse$Type; +declare class GetTokenStatusesResponse_GetTokenStatusesResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + */ +export declare const GetTokenStatusesResponse_GetTokenStatusesResponseV0: GetTokenStatusesResponse_GetTokenStatusesResponseV0$Type; +declare class GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + */ +export declare const GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry: GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry$Type; +declare class GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + */ +export declare const GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses: GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses$Type; +declare class GetTokenPreProgrammedDistributionsRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + */ +export declare const GetTokenPreProgrammedDistributionsRequest: GetTokenPreProgrammedDistributionsRequest$Type; +declare class GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + */ +export declare const GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0: GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0$Type; +declare class GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + */ +export declare const GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo: GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo$Type; +declare class GetTokenPreProgrammedDistributionsResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + */ +export declare const GetTokenPreProgrammedDistributionsResponse: GetTokenPreProgrammedDistributionsResponse$Type; +declare class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + */ +export declare const GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0: GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0$Type; +declare class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + */ +export declare const GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry: GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry$Type; +declare class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + */ +export declare const GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry: GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry$Type; +declare class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + */ +export declare const GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions: GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions$Type; +declare class GetTokenTotalSupplyRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + */ +export declare const GetTokenTotalSupplyRequest: GetTokenTotalSupplyRequest$Type; +declare class GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + */ +export declare const GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0: GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0$Type; +declare class GetTokenTotalSupplyResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + */ +export declare const GetTokenTotalSupplyResponse: GetTokenTotalSupplyResponse$Type; +declare class GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + */ +export declare const GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0: GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0$Type; +declare class GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + */ +export declare const GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry: GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry$Type; +declare class GetGroupInfoRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoRequest + */ +export declare const GetGroupInfoRequest: GetGroupInfoRequest$Type; +declare class GetGroupInfoRequest_GetGroupInfoRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + */ +export declare const GetGroupInfoRequest_GetGroupInfoRequestV0: GetGroupInfoRequest_GetGroupInfoRequestV0$Type; +declare class GetGroupInfoResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse + */ +export declare const GetGroupInfoResponse: GetGroupInfoResponse$Type; +declare class GetGroupInfoResponse_GetGroupInfoResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + */ +export declare const GetGroupInfoResponse_GetGroupInfoResponseV0: GetGroupInfoResponse_GetGroupInfoResponseV0$Type; +declare class GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + */ +export declare const GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry: GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry$Type; +declare class GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + */ +export declare const GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry: GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry$Type; +declare class GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + */ +export declare const GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo: GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo$Type; +declare class GetGroupInfosRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest + */ +export declare const GetGroupInfosRequest: GetGroupInfosRequest$Type; +declare class GetGroupInfosRequest_StartAtGroupContractPosition$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + */ +export declare const GetGroupInfosRequest_StartAtGroupContractPosition: GetGroupInfosRequest_StartAtGroupContractPosition$Type; +declare class GetGroupInfosRequest_GetGroupInfosRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + */ +export declare const GetGroupInfosRequest_GetGroupInfosRequestV0: GetGroupInfosRequest_GetGroupInfosRequestV0$Type; +declare class GetGroupInfosResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse + */ +export declare const GetGroupInfosResponse: GetGroupInfosResponse$Type; +declare class GetGroupInfosResponse_GetGroupInfosResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + */ +export declare const GetGroupInfosResponse_GetGroupInfosResponseV0: GetGroupInfosResponse_GetGroupInfosResponseV0$Type; +declare class GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + */ +export declare const GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry: GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry$Type; +declare class GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + */ +export declare const GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry: GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry$Type; +declare class GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + */ +export declare const GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos: GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos$Type; +declare class GetGroupActionsRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest + */ +export declare const GetGroupActionsRequest: GetGroupActionsRequest$Type; +declare class GetGroupActionsRequest_StartAtActionId$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + */ +export declare const GetGroupActionsRequest_StartAtActionId: GetGroupActionsRequest_StartAtActionId$Type; +declare class GetGroupActionsRequest_GetGroupActionsRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + */ +export declare const GetGroupActionsRequest_GetGroupActionsRequestV0: GetGroupActionsRequest_GetGroupActionsRequestV0$Type; +declare class GetGroupActionsResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse + */ +export declare const GetGroupActionsResponse: GetGroupActionsResponse$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0: GetGroupActionsResponse_GetGroupActionsResponseV0$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote: GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote: GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry: GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry$Type; +declare class GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + */ +export declare const GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions: GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions$Type; +declare class GetGroupActionSignersRequest$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersRequest + */ +export declare const GetGroupActionSignersRequest: GetGroupActionSignersRequest$Type; +declare class GetGroupActionSignersRequest_GetGroupActionSignersRequestV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + */ +export declare const GetGroupActionSignersRequest_GetGroupActionSignersRequestV0: GetGroupActionSignersRequest_GetGroupActionSignersRequestV0$Type; +declare class GetGroupActionSignersResponse$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse + */ +export declare const GetGroupActionSignersResponse: GetGroupActionSignersResponse$Type; +declare class GetGroupActionSignersResponse_GetGroupActionSignersResponseV0$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + */ +export declare const GetGroupActionSignersResponse_GetGroupActionSignersResponseV0: GetGroupActionSignersResponse_GetGroupActionSignersResponseV0$Type; +declare class GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + */ +export declare const GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner: GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner$Type; +declare class GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners$Type extends MessageType { + constructor(); +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + */ +export declare const GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners: GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners$Type; +/** + * @generated ServiceType for protobuf service org.dash.platform.dapi.v0.Platform + */ +export declare const Platform: ServiceType; +export {}; diff --git a/built/DashPlatform.js/src/generated/platform/v0/platform.js b/built/DashPlatform.js/src/generated/platform/v0/platform.js new file mode 100644 index 0000000..6083954 --- /dev/null +++ b/built/DashPlatform.js/src/generated/platform/v0/platform.js @@ -0,0 +1,3934 @@ +// @generated by protobuf-ts 2.9.6 with parameter optimize_code_size +// @generated from protobuf file "platform/v0/platform.proto" (package "org.dash.platform.dapi.v0", syntax proto3) +// tslint:disable +import { ServiceType } from "@protobuf-ts/runtime-rpc"; +import { MessageType } from "@protobuf-ts/runtime"; +import { BytesValue } from "../../google/protobuf/wrappers.js"; +import { UInt32Value } from "../../google/protobuf/wrappers.js"; +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType + */ +export var SecurityLevelMap_KeyKindRequestType; +(function (SecurityLevelMap_KeyKindRequestType) { + /** + * Request the current key of a particular kind + * + * @generated from protobuf enum value: CURRENT_KEY_OF_KIND_REQUEST = 0; + */ + SecurityLevelMap_KeyKindRequestType[SecurityLevelMap_KeyKindRequestType["CURRENT_KEY_OF_KIND_REQUEST"] = 0] = "CURRENT_KEY_OF_KIND_REQUEST"; + /** + * Request all keys of a particular kind + * + * @generated from protobuf enum value: ALL_KEYS_OF_KIND_REQUEST = 1; + */ + SecurityLevelMap_KeyKindRequestType[SecurityLevelMap_KeyKindRequestType["ALL_KEYS_OF_KIND_REQUEST"] = 1] = "ALL_KEYS_OF_KIND_REQUEST"; +})(SecurityLevelMap_KeyKindRequestType || (SecurityLevelMap_KeyKindRequestType = {})); +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus + */ +export var GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus; +(function (GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus) { + /** + * @generated from protobuf enum value: NOT_CONTESTED = 0; + */ + GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus[GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus["NOT_CONTESTED"] = 0] = "NOT_CONTESTED"; + /** + * @generated from protobuf enum value: MAYBE_CONTESTED = 1; + */ + GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus[GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus["MAYBE_CONTESTED"] = 1] = "MAYBE_CONTESTED"; + /** + * @generated from protobuf enum value: CONTESTED = 2; + */ + GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus[GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus["CONTESTED"] = 2] = "CONTESTED"; +})(GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus || (GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus = {})); +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type + */ +export var GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type; +(function (GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type) { + /** + * Request for the full identity + * + * @generated from protobuf enum value: FULL_IDENTITY = 0; + */ + GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type[GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type["FULL_IDENTITY"] = 0] = "FULL_IDENTITY"; + /** + * Request for the identity's balance + * + * @generated from protobuf enum value: BALANCE = 1; + */ + GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type[GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type["BALANCE"] = 1] = "BALANCE"; + /** + * Request for the identity's keys + * + * @generated from protobuf enum value: KEYS = 2; + */ + GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type[GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type["KEYS"] = 2] = "KEYS"; + /** + * Request for the identity's revision + * + * @generated from protobuf enum value: REVISION = 3; + */ + GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type[GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type["REVISION"] = 3] = "REVISION"; +})(GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type || (GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type = {})); +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType + */ +export var GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType; +(function (GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType) { + /** + * @generated from protobuf enum value: DOCUMENTS = 0; + */ + GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType[GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType["DOCUMENTS"] = 0] = "DOCUMENTS"; + /** + * @generated from protobuf enum value: VOTE_TALLY = 1; + */ + GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType[GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType["VOTE_TALLY"] = 1] = "VOTE_TALLY"; + /** + * @generated from protobuf enum value: DOCUMENTS_AND_VOTE_TALLY = 2; + */ + GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType[GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType["DOCUMENTS_AND_VOTE_TALLY"] = 2] = "DOCUMENTS_AND_VOTE_TALLY"; +})(GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType || (GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType = {})); +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome + */ +export var GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome; +(function (GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome) { + /** + * @generated from protobuf enum value: TOWARDS_IDENTITY = 0; + */ + GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome[GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome["TOWARDS_IDENTITY"] = 0] = "TOWARDS_IDENTITY"; + /** + * @generated from protobuf enum value: LOCKED = 1; + */ + GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome[GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome["LOCKED"] = 1] = "LOCKED"; + /** + * @generated from protobuf enum value: NO_PREVIOUS_WINNER = 2; + */ + GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome[GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome["NO_PREVIOUS_WINNER"] = 2] = "NO_PREVIOUS_WINNER"; +})(GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome || (GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome = {})); +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType + */ +export var GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType; +(function (GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType) { + /** + * @generated from protobuf enum value: TOWARDS_IDENTITY = 0; + */ + GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType[GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType["TOWARDS_IDENTITY"] = 0] = "TOWARDS_IDENTITY"; + /** + * @generated from protobuf enum value: ABSTAIN = 1; + */ + GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType[GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType["ABSTAIN"] = 1] = "ABSTAIN"; + /** + * @generated from protobuf enum value: LOCK = 2; + */ + GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType[GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType["LOCK"] = 2] = "LOCK"; +})(GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType || (GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType = {})); +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus + */ +export var GetGroupActionsRequest_ActionStatus; +(function (GetGroupActionsRequest_ActionStatus) { + /** + * Request the active actions + * + * @generated from protobuf enum value: ACTIVE = 0; + */ + GetGroupActionsRequest_ActionStatus[GetGroupActionsRequest_ActionStatus["ACTIVE"] = 0] = "ACTIVE"; + /** + * Request the closed actions + * + * @generated from protobuf enum value: CLOSED = 1; + */ + GetGroupActionsRequest_ActionStatus[GetGroupActionsRequest_ActionStatus["CLOSED"] = 1] = "CLOSED"; +})(GetGroupActionsRequest_ActionStatus || (GetGroupActionsRequest_ActionStatus = {})); +/** + * Enum for emergency action types + * + * @generated from protobuf enum org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType + */ +export var GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType; +(function (GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType) { + /** + * Pause action + * + * @generated from protobuf enum value: PAUSE = 0; + */ + GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType[GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType["PAUSE"] = 0] = "PAUSE"; + /** + * Resume action + * + * @generated from protobuf enum value: RESUME = 1; + */ + GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType[GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType["RESUME"] = 1] = "RESUME"; +})(GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType || (GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType = {})); +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus + */ +export var GetGroupActionSignersRequest_ActionStatus; +(function (GetGroupActionSignersRequest_ActionStatus) { + /** + * Request the active actions + * + * @generated from protobuf enum value: ACTIVE = 0; + */ + GetGroupActionSignersRequest_ActionStatus[GetGroupActionSignersRequest_ActionStatus["ACTIVE"] = 0] = "ACTIVE"; + /** + * Request the closed actions + * + * @generated from protobuf enum value: CLOSED = 1; + */ + GetGroupActionSignersRequest_ActionStatus[GetGroupActionSignersRequest_ActionStatus["CLOSED"] = 1] = "CLOSED"; +})(GetGroupActionSignersRequest_ActionStatus || (GetGroupActionSignersRequest_ActionStatus = {})); +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.KeyPurpose + */ +export var KeyPurpose; +(function (KeyPurpose) { + /** + * @generated from protobuf enum value: AUTHENTICATION = 0; + */ + KeyPurpose[KeyPurpose["AUTHENTICATION"] = 0] = "AUTHENTICATION"; + /** + * @generated from protobuf enum value: ENCRYPTION = 1; + */ + KeyPurpose[KeyPurpose["ENCRYPTION"] = 1] = "ENCRYPTION"; + /** + * @generated from protobuf enum value: DECRYPTION = 2; + */ + KeyPurpose[KeyPurpose["DECRYPTION"] = 2] = "DECRYPTION"; + /** + * @generated from protobuf enum value: TRANSFER = 3; + */ + KeyPurpose[KeyPurpose["TRANSFER"] = 3] = "TRANSFER"; + /** + * @generated from protobuf enum value: VOTING = 5; + */ + KeyPurpose[KeyPurpose["VOTING"] = 5] = "VOTING"; +})(KeyPurpose || (KeyPurpose = {})); +// @generated message type with reflection information, may provide speed optimized methods +class Proof$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.Proof", [ + { no: 1, name: "grovedb_proof", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "quorum_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "signature", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 4, name: "round", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 5, name: "block_id_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 6, name: "quorum_type", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.Proof + */ +export const Proof = new Proof$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ResponseMetadata$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.ResponseMetadata", [ + { no: 1, name: "height", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "core_chain_locked_height", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "epoch", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "time_ms", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 5, name: "protocol_version", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 6, name: "chain_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.ResponseMetadata + */ +export const ResponseMetadata = new ResponseMetadata$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class StateTransitionBroadcastError$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.StateTransitionBroadcastError", [ + { no: 1, name: "code", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.StateTransitionBroadcastError + */ +export const StateTransitionBroadcastError = new StateTransitionBroadcastError$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BroadcastStateTransitionRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BroadcastStateTransitionRequest", [ + { no: 1, name: "state_transition", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BroadcastStateTransitionRequest + */ +export const BroadcastStateTransitionRequest = new BroadcastStateTransitionRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BroadcastStateTransitionResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BroadcastStateTransitionResponse", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BroadcastStateTransitionResponse + */ +export const BroadcastStateTransitionResponse = new BroadcastStateTransitionResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityRequest_GetIdentityRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityRequest + */ +export const GetIdentityRequest = new GetIdentityRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityRequest_GetIdentityRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0", [ + { no: 1, name: "id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0 + */ +export const GetIdentityRequest_GetIdentityRequestV0 = new GetIdentityRequest_GetIdentityRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityNonceRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityNonceRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityNonceRequest_GetIdentityNonceRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityNonceRequest + */ +export const GetIdentityNonceRequest = new GetIdentityNonceRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityNonceRequest_GetIdentityNonceRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0 + */ +export const GetIdentityNonceRequest_GetIdentityNonceRequestV0 = new GetIdentityNonceRequest_GetIdentityNonceRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityContractNonceRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityContractNonceRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceRequest + */ +export const GetIdentityContractNonceRequest = new GetIdentityContractNonceRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0 + */ +export const GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0 = new GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityBalanceRequest_GetIdentityBalanceRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceRequest + */ +export const GetIdentityBalanceRequest = new GetIdentityBalanceRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceRequest_GetIdentityBalanceRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0", [ + { no: 1, name: "id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0 + */ +export const GetIdentityBalanceRequest_GetIdentityBalanceRequestV0 = new GetIdentityBalanceRequest_GetIdentityBalanceRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceAndRevisionRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest + */ +export const GetIdentityBalanceAndRevisionRequest = new GetIdentityBalanceAndRevisionRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0", [ + { no: 1, name: "id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0 + */ +export const GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0 = new GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityResponse_GetIdentityResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityResponse + */ +export const GetIdentityResponse = new GetIdentityResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityResponse_GetIdentityResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0", [ + { no: 1, name: "identity", kind: "scalar", oneof: "result", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0 + */ +export const GetIdentityResponse_GetIdentityResponseV0 = new GetIdentityResponse_GetIdentityResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityNonceResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityNonceResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityNonceResponse_GetIdentityNonceResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityNonceResponse + */ +export const GetIdentityNonceResponse = new GetIdentityNonceResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityNonceResponse_GetIdentityNonceResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0", [ + { no: 1, name: "identity_nonce", kind: "scalar", oneof: "result", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0 + */ +export const GetIdentityNonceResponse_GetIdentityNonceResponseV0 = new GetIdentityNonceResponse_GetIdentityNonceResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityContractNonceResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityContractNonceResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceResponse + */ +export const GetIdentityContractNonceResponse = new GetIdentityContractNonceResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0", [ + { no: 1, name: "identity_contract_nonce", kind: "scalar", oneof: "result", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0 + */ +export const GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0 = new GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityBalanceResponse_GetIdentityBalanceResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceResponse + */ +export const GetIdentityBalanceResponse = new GetIdentityBalanceResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceResponse_GetIdentityBalanceResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0", [ + { no: 1, name: "balance", kind: "scalar", oneof: "result", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0 + */ +export const GetIdentityBalanceResponse_GetIdentityBalanceResponseV0 = new GetIdentityBalanceResponse_GetIdentityBalanceResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceAndRevisionResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse + */ +export const GetIdentityBalanceAndRevisionResponse = new GetIdentityBalanceAndRevisionResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0", [ + { no: 1, name: "balance_and_revision", kind: "message", oneof: "result", T: () => GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0 + */ +export const GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0 = new GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision", [ + { no: 1, name: "balance", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "revision", kind: "scalar", T: 4 /*ScalarType.UINT64*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision + */ +export const GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision = new GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class KeyRequestType$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.KeyRequestType", [ + { no: 1, name: "all_keys", kind: "message", oneof: "request", T: () => AllKeys }, + { no: 2, name: "specific_keys", kind: "message", oneof: "request", T: () => SpecificKeys }, + { no: 3, name: "search_key", kind: "message", oneof: "request", T: () => SearchKey } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.KeyRequestType + */ +export const KeyRequestType = new KeyRequestType$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AllKeys$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.AllKeys", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.AllKeys + */ +export const AllKeys = new AllKeys$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SpecificKeys$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.SpecificKeys", [ + { no: 1, name: "key_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.SpecificKeys + */ +export const SpecificKeys = new SpecificKeys$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SearchKey$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.SearchKey", [ + { no: 1, name: "purpose_map", kind: "map", K: 13 /*ScalarType.UINT32*/, V: { kind: "message", T: () => SecurityLevelMap } } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.SearchKey + */ +export const SearchKey = new SearchKey$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SecurityLevelMap$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.SecurityLevelMap", [ + { no: 1, name: "security_level_map", kind: "map", K: 13 /*ScalarType.UINT32*/, V: { kind: "enum", T: () => ["org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType", SecurityLevelMap_KeyKindRequestType] } } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.SecurityLevelMap + */ +export const SecurityLevelMap = new SecurityLevelMap$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityKeysRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityKeysRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityKeysRequest_GetIdentityKeysRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysRequest + */ +export const GetIdentityKeysRequest = new GetIdentityKeysRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityKeysRequest_GetIdentityKeysRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "request_type", kind: "message", T: () => KeyRequestType }, + { no: 3, name: "limit", kind: "message", T: () => UInt32Value }, + { no: 4, name: "offset", kind: "message", T: () => UInt32Value }, + { no: 5, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0 + */ +export const GetIdentityKeysRequest_GetIdentityKeysRequestV0 = new GetIdentityKeysRequest_GetIdentityKeysRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityKeysResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityKeysResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityKeysResponse_GetIdentityKeysResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse + */ +export const GetIdentityKeysResponse = new GetIdentityKeysResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityKeysResponse_GetIdentityKeysResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0", [ + { no: 1, name: "keys", kind: "message", oneof: "result", T: () => GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0 + */ +export const GetIdentityKeysResponse_GetIdentityKeysResponseV0 = new GetIdentityKeysResponse_GetIdentityKeysResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys", [ + { no: 1, name: "keys_bytes", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys + */ +export const GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys = new GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesContractKeysRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest + */ +export const GetIdentitiesContractKeysRequest = new GetIdentitiesContractKeysRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0", [ + { no: 1, name: "identities_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "document_type_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "purposes", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["org.dash.platform.dapi.v0.KeyPurpose", KeyPurpose] }, + { no: 5, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0 + */ +export const GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0 = new GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesContractKeysResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse + */ +export const GetIdentitiesContractKeysResponse = new GetIdentitiesContractKeysResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0", [ + { no: 1, name: "identities_keys", kind: "message", oneof: "result", T: () => GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0 + */ +export const GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0 = new GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys", [ + { no: 1, name: "purpose", kind: "enum", T: () => ["org.dash.platform.dapi.v0.KeyPurpose", KeyPurpose] }, + { no: 2, name: "keys_bytes", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys + */ +export const GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys = new GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "keys", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys + */ +export const GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys = new GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys", [ + { no: 1, name: "entries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys + */ +export const GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys = new GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksByIdsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + */ +export const GetEvonodesProposedEpochBlocksByIdsRequest = new GetEvonodesProposedEpochBlocksByIdsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0", [ + { no: 1, name: "epoch", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + */ +export const GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 = new GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + */ +export const GetEvonodesProposedEpochBlocksResponse = new GetEvonodesProposedEpochBlocksResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0", [ + { no: 1, name: "evonodes_proposed_block_counts_info", kind: "message", oneof: "result", T: () => GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + */ +export const GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 = new GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks", [ + { no: 1, name: "pro_tx_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "count", kind: "scalar", T: 4 /*ScalarType.UINT64*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + */ +export const GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks = new GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks", [ + { no: 1, name: "evonodes_proposed_block_counts", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + */ +export const GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks = new GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksByRangeRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + */ +export const GetEvonodesProposedEpochBlocksByRangeRequest = new GetEvonodesProposedEpochBlocksByRangeRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0", [ + { no: 1, name: "epoch", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "limit", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "start_after", kind: "scalar", oneof: "start", T: 12 /*ScalarType.BYTES*/ }, + { no: 4, name: "start_at", kind: "scalar", oneof: "start", T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + */ +export const GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 = new GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesBalancesRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + */ +export const GetIdentitiesBalancesRequest = new GetIdentitiesBalancesRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0", [ + { no: 1, name: "ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + */ +export const GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 = new GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesBalancesResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + */ +export const GetIdentitiesBalancesResponse = new GetIdentitiesBalancesResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0", [ + { no: 1, name: "identities_balances", kind: "message", oneof: "result", T: () => GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + */ +export const GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 = new GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "balance", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + */ +export const GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance = new GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances", [ + { no: 1, name: "entries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + */ +export const GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances = new GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetProofsRequest_GetProofsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest + */ +export const GetProofsRequest = new GetProofsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0", [ + { no: 1, name: "identities", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProofsRequest_GetProofsRequestV0_IdentityRequest }, + { no: 2, name: "contracts", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProofsRequest_GetProofsRequestV0_ContractRequest }, + { no: 3, name: "documents", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProofsRequest_GetProofsRequestV0_DocumentRequest }, + { no: 4, name: "votes", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProofsRequest_GetProofsRequestV0_VoteStatusRequest }, + { no: 5, name: "identity_token_balances", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest }, + { no: 6, name: "identity_token_infos", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest }, + { no: 7, name: "token_statuses", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProofsRequest_GetProofsRequestV0_TokenStatusRequest } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 + */ +export const GetProofsRequest_GetProofsRequestV0 = new GetProofsRequest_GetProofsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_DocumentRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "document_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "document_type_keeps_history", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 4, name: "document_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "document_contested_status", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus", GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus] } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest + */ +export const GetProofsRequest_GetProofsRequestV0_DocumentRequest = new GetProofsRequest_GetProofsRequestV0_DocumentRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_IdentityRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "request_type", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type", GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type] } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest + */ +export const GetProofsRequest_GetProofsRequestV0_IdentityRequest = new GetProofsRequest_GetProofsRequestV0_IdentityRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_ContractRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest + */ +export const GetProofsRequest_GetProofsRequestV0_ContractRequest = new GetProofsRequest_GetProofsRequestV0_ContractRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_VoteStatusRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest", [ + { no: 1, name: "contested_resource_vote_status_request", kind: "message", oneof: "requestType", T: () => GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest + */ +export const GetProofsRequest_GetProofsRequestV0_VoteStatusRequest = new GetProofsRequest_GetProofsRequestV0_VoteStatusRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "document_type_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "index_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "index_values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "voter_identifier", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest + */ +export const GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest = new GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + */ +export const GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest = new GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + */ +export const GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest = new GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_TokenStatusRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + */ +export const GetProofsRequest_GetProofsRequestV0_TokenStatusRequest = new GetProofsRequest_GetProofsRequestV0_TokenStatusRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetProofsResponse_GetProofsResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsResponse + */ +export const GetProofsResponse = new GetProofsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsResponse_GetProofsResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0", [ + { no: 1, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 2, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0 + */ +export const GetProofsResponse_GetProofsResponseV0 = new GetProofsResponse_GetProofsResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDataContractRequest_GetDataContractRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractRequest + */ +export const GetDataContractRequest = new GetDataContractRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractRequest_GetDataContractRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0", [ + { no: 1, name: "id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0 + */ +export const GetDataContractRequest_GetDataContractRequestV0 = new GetDataContractRequest_GetDataContractRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDataContractResponse_GetDataContractResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractResponse + */ +export const GetDataContractResponse = new GetDataContractResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractResponse_GetDataContractResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0", [ + { no: 1, name: "data_contract", kind: "scalar", oneof: "result", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0 + */ +export const GetDataContractResponse_GetDataContractResponseV0 = new GetDataContractResponse_GetDataContractResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDataContractsRequest_GetDataContractsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsRequest + */ +export const GetDataContractsRequest = new GetDataContractsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractsRequest_GetDataContractsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0", [ + { no: 1, name: "ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0 + */ +export const GetDataContractsRequest_GetDataContractsRequestV0 = new GetDataContractsRequest_GetDataContractsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractsResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDataContractsResponse_GetDataContractsResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse + */ +export const GetDataContractsResponse = new GetDataContractsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractsResponse_DataContractEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry", [ + { no: 1, name: "identifier", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "data_contract", kind: "message", T: () => BytesValue } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry + */ +export const GetDataContractsResponse_DataContractEntry = new GetDataContractsResponse_DataContractEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractsResponse_DataContracts$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts", [ + { no: 1, name: "data_contract_entries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetDataContractsResponse_DataContractEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts + */ +export const GetDataContractsResponse_DataContracts = new GetDataContractsResponse_DataContracts$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractsResponse_GetDataContractsResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0", [ + { no: 1, name: "data_contracts", kind: "message", oneof: "result", T: () => GetDataContractsResponse_DataContracts }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0 + */ +export const GetDataContractsResponse_GetDataContractsResponseV0 = new GetDataContractsResponse_GetDataContractsResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractHistoryRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractHistoryRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDataContractHistoryRequest_GetDataContractHistoryRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryRequest + */ +export const GetDataContractHistoryRequest = new GetDataContractHistoryRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractHistoryRequest_GetDataContractHistoryRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0", [ + { no: 1, name: "id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "limit", kind: "message", T: () => UInt32Value }, + { no: 3, name: "offset", kind: "message", T: () => UInt32Value }, + { no: 4, name: "start_at_ms", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 5, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0 + */ +export const GetDataContractHistoryRequest_GetDataContractHistoryRequestV0 = new GetDataContractHistoryRequest_GetDataContractHistoryRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractHistoryResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractHistoryResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDataContractHistoryResponse_GetDataContractHistoryResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse + */ +export const GetDataContractHistoryResponse = new GetDataContractHistoryResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractHistoryResponse_GetDataContractHistoryResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0", [ + { no: 1, name: "data_contract_history", kind: "message", oneof: "result", T: () => GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0 + */ +export const GetDataContractHistoryResponse_GetDataContractHistoryResponseV0 = new GetDataContractHistoryResponse_GetDataContractHistoryResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry", [ + { no: 1, name: "date", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry + */ +export const GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry = new GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory", [ + { no: 1, name: "data_contract_entries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory + */ +export const GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory = new GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDocumentsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDocumentsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDocumentsRequest_GetDocumentsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsRequest + */ +export const GetDocumentsRequest = new GetDocumentsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDocumentsRequest_GetDocumentsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0", [ + { no: 1, name: "data_contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "document_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "where", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 4, name: "order_by", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "limit", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 6, name: "start_after", kind: "scalar", oneof: "start", T: 12 /*ScalarType.BYTES*/ }, + { no: 7, name: "start_at", kind: "scalar", oneof: "start", T: 12 /*ScalarType.BYTES*/ }, + { no: 8, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0 + */ +export const GetDocumentsRequest_GetDocumentsRequestV0 = new GetDocumentsRequest_GetDocumentsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDocumentsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDocumentsResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDocumentsResponse_GetDocumentsResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse + */ +export const GetDocumentsResponse = new GetDocumentsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDocumentsResponse_GetDocumentsResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0", [ + { no: 1, name: "documents", kind: "message", oneof: "result", T: () => GetDocumentsResponse_GetDocumentsResponseV0_Documents }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0 + */ +export const GetDocumentsResponse_GetDocumentsResponseV0 = new GetDocumentsResponse_GetDocumentsResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDocumentsResponse_GetDocumentsResponseV0_Documents$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents", [ + { no: 1, name: "documents", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents + */ +export const GetDocumentsResponse_GetDocumentsResponseV0_Documents = new GetDocumentsResponse_GetDocumentsResponseV0_Documents$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityByPublicKeyHashRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest + */ +export const GetIdentityByPublicKeyHashRequest = new GetIdentityByPublicKeyHashRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0", [ + { no: 1, name: "public_key_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0 + */ +export const GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0 = new GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityByPublicKeyHashResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse + */ +export const GetIdentityByPublicKeyHashResponse = new GetIdentityByPublicKeyHashResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0", [ + { no: 1, name: "identity", kind: "scalar", oneof: "result", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0 + */ +export const GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0 = new GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class WaitForStateTransitionResultRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest + */ +export const WaitForStateTransitionResultRequest = new WaitForStateTransitionResultRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0", [ + { no: 1, name: "state_transition_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0 + */ +export const WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0 = new WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class WaitForStateTransitionResultResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse + */ +export const WaitForStateTransitionResultResponse = new WaitForStateTransitionResultResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0", [ + { no: 1, name: "error", kind: "message", oneof: "result", T: () => StateTransitionBroadcastError }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0 + */ +export const WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0 = new WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetConsensusParamsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetConsensusParamsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetConsensusParamsRequest_GetConsensusParamsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsRequest + */ +export const GetConsensusParamsRequest = new GetConsensusParamsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetConsensusParamsRequest_GetConsensusParamsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0", [ + { no: 1, name: "height", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0 + */ +export const GetConsensusParamsRequest_GetConsensusParamsRequestV0 = new GetConsensusParamsRequest_GetConsensusParamsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetConsensusParamsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetConsensusParamsResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetConsensusParamsResponse_GetConsensusParamsResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse + */ +export const GetConsensusParamsResponse = new GetConsensusParamsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetConsensusParamsResponse_ConsensusParamsBlock$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock", [ + { no: 1, name: "max_bytes", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "max_gas", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "time_iota_ms", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock + */ +export const GetConsensusParamsResponse_ConsensusParamsBlock = new GetConsensusParamsResponse_ConsensusParamsBlock$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetConsensusParamsResponse_ConsensusParamsEvidence$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence", [ + { no: 1, name: "max_age_num_blocks", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "max_age_duration", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "max_bytes", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence + */ +export const GetConsensusParamsResponse_ConsensusParamsEvidence = new GetConsensusParamsResponse_ConsensusParamsEvidence$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetConsensusParamsResponse_GetConsensusParamsResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0", [ + { no: 1, name: "block", kind: "message", T: () => GetConsensusParamsResponse_ConsensusParamsBlock }, + { no: 2, name: "evidence", kind: "message", T: () => GetConsensusParamsResponse_ConsensusParamsEvidence } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0 + */ +export const GetConsensusParamsResponse_GetConsensusParamsResponseV0 = new GetConsensusParamsResponse_GetConsensusParamsResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeStateRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest + */ +export const GetProtocolVersionUpgradeStateRequest = new GetProtocolVersionUpgradeStateRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0", [ + { no: 1, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0 + */ +export const GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0 = new GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeStateResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse + */ +export const GetProtocolVersionUpgradeStateResponse = new GetProtocolVersionUpgradeStateResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0", [ + { no: 1, name: "versions", kind: "message", oneof: "result", T: () => GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0 + */ +export const GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0 = new GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions", [ + { no: 1, name: "versions", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions + */ +export const GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions = new GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry", [ + { no: 1, name: "version_number", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "vote_count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry + */ +export const GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry = new GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeVoteStatusRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest + */ +export const GetProtocolVersionUpgradeVoteStatusRequest = new GetProtocolVersionUpgradeVoteStatusRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0", [ + { no: 1, name: "start_pro_tx_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0 + */ +export const GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0 = new GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeVoteStatusResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse + */ +export const GetProtocolVersionUpgradeVoteStatusResponse = new GetProtocolVersionUpgradeVoteStatusResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0", [ + { no: 1, name: "versions", kind: "message", oneof: "result", T: () => GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0 + */ +export const GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0 = new GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals", [ + { no: 1, name: "version_signals", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals + */ +export const GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals = new GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal", [ + { no: 1, name: "pro_tx_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "version", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal + */ +export const GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal = new GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEpochsInfoRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEpochsInfoRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetEpochsInfoRequest_GetEpochsInfoRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoRequest + */ +export const GetEpochsInfoRequest = new GetEpochsInfoRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEpochsInfoRequest_GetEpochsInfoRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0", [ + { no: 1, name: "start_epoch", kind: "message", T: () => UInt32Value }, + { no: 2, name: "count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "ascending", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 4, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0 + */ +export const GetEpochsInfoRequest_GetEpochsInfoRequestV0 = new GetEpochsInfoRequest_GetEpochsInfoRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEpochsInfoResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEpochsInfoResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetEpochsInfoResponse_GetEpochsInfoResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse + */ +export const GetEpochsInfoResponse = new GetEpochsInfoResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEpochsInfoResponse_GetEpochsInfoResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0", [ + { no: 1, name: "epochs", kind: "message", oneof: "result", T: () => GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0 + */ +export const GetEpochsInfoResponse_GetEpochsInfoResponseV0 = new GetEpochsInfoResponse_GetEpochsInfoResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos", [ + { no: 1, name: "epoch_infos", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos + */ +export const GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos = new GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo", [ + { no: 1, name: "number", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "first_block_height", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 3, name: "first_core_block_height", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "start_time", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 5, name: "fee_multiplier", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, + { no: 6, name: "protocol_version", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo + */ +export const GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo = new GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourcesRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourcesRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourcesRequest_GetContestedResourcesRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest + */ +export const GetContestedResourcesRequest = new GetContestedResourcesRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourcesRequest_GetContestedResourcesRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "document_type_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "index_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "start_index_values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "end_index_values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 6, name: "start_at_value_info", kind: "message", T: () => GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo }, + { no: 7, name: "count", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 8, name: "order_ascending", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 9, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0 + */ +export const GetContestedResourcesRequest_GetContestedResourcesRequestV0 = new GetContestedResourcesRequest_GetContestedResourcesRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo", [ + { no: 1, name: "start_value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "start_value_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo + */ +export const GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo = new GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourcesResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourcesResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourcesResponse_GetContestedResourcesResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse + */ +export const GetContestedResourcesResponse = new GetContestedResourcesResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourcesResponse_GetContestedResourcesResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0", [ + { no: 1, name: "contested_resource_values", kind: "message", oneof: "result", T: () => GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0 + */ +export const GetContestedResourcesResponse_GetContestedResourcesResponseV0 = new GetContestedResourcesResponse_GetContestedResourcesResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues", [ + { no: 1, name: "contested_resource_values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues + */ +export const GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues = new GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest + */ +export const GetVotePollsByEndDateRequest = new GetVotePollsByEndDateRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0", [ + { no: 1, name: "start_time_info", kind: "message", T: () => GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo }, + { no: 2, name: "end_time_info", kind: "message", T: () => GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo }, + { no: 3, name: "limit", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "offset", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 5, name: "ascending", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0 + */ +export const GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0 = new GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo", [ + { no: 1, name: "start_time_ms", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "start_time_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo + */ +export const GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo = new GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo", [ + { no: 1, name: "end_time_ms", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "end_time_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo + */ +export const GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo = new GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse + */ +export const GetVotePollsByEndDateResponse = new GetVotePollsByEndDateResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0", [ + { no: 1, name: "vote_polls_by_timestamps", kind: "message", oneof: "result", T: () => GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0 + */ +export const GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0 = new GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp", [ + { no: 1, name: "timestamp", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "serialized_vote_polls", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp + */ +export const GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp = new GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps", [ + { no: 1, name: "vote_polls_by_timestamps", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp }, + { no: 2, name: "finished_results", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps + */ +export const GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps = new GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest + */ +export const GetContestedResourceVoteStateRequest = new GetContestedResourceVoteStateRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "document_type_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "index_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "index_values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "result_type", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType", GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType] }, + { no: 6, name: "allow_include_locked_and_abstaining_vote_tally", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 7, name: "start_at_identifier_info", kind: "message", T: () => GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo }, + { no: 8, name: "count", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 9, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0 + */ +export const GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0 = new GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo", [ + { no: 1, name: "start_identifier", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "start_identifier_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo + */ +export const GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo = new GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse + */ +export const GetContestedResourceVoteStateResponse = new GetContestedResourceVoteStateResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0", [ + { no: 1, name: "contested_resource_contenders", kind: "message", oneof: "result", T: () => GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0 + */ +export const GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0 = new GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo", [ + { no: 1, name: "finished_vote_outcome", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome", GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome] }, + { no: 2, name: "won_by_identity_id", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "finished_at_block_height", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 4, name: "finished_at_core_block_height", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 5, name: "finished_at_block_time_ms", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 6, name: "finished_at_epoch", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo + */ +export const GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo = new GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders", [ + { no: 1, name: "contenders", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender }, + { no: 2, name: "abstain_vote_tally", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "lock_vote_tally", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "finished_vote_info", kind: "message", T: () => GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders + */ +export const GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders = new GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender", [ + { no: 1, name: "identifier", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "vote_count", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "document", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender + */ +export const GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender = new GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVotersForIdentityRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest + */ +export const GetContestedResourceVotersForIdentityRequest = new GetContestedResourceVotersForIdentityRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "document_type_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "index_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "index_values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "contestant_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 6, name: "start_at_identifier_info", kind: "message", T: () => GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo }, + { no: 7, name: "count", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 8, name: "order_ascending", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 9, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0 + */ +export const GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0 = new GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo", [ + { no: 1, name: "start_identifier", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "start_identifier_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo + */ +export const GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo = new GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVotersForIdentityResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse + */ +export const GetContestedResourceVotersForIdentityResponse = new GetContestedResourceVotersForIdentityResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0", [ + { no: 1, name: "contested_resource_voters", kind: "message", oneof: "result", T: () => GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0 + */ +export const GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0 = new GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters", [ + { no: 1, name: "voters", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "finished_results", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters + */ +export const GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters = new GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest + */ +export const GetContestedResourceIdentityVotesRequest = new GetContestedResourceIdentityVotesRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "limit", kind: "message", T: () => UInt32Value }, + { no: 3, name: "offset", kind: "message", T: () => UInt32Value }, + { no: 4, name: "order_ascending", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 5, name: "start_at_vote_poll_id_info", kind: "message", T: () => GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo }, + { no: 6, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0 + */ +export const GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0 = new GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo", [ + { no: 1, name: "start_at_poll_identifier", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "start_poll_identifier_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo + */ +export const GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo = new GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse + */ +export const GetContestedResourceIdentityVotesResponse = new GetContestedResourceIdentityVotesResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0", [ + { no: 1, name: "votes", kind: "message", oneof: "result", T: () => GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0 + */ +export const GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0 = new GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes", [ + { no: 1, name: "contested_resource_identity_votes", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote }, + { no: 2, name: "finished_results", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes + */ +export const GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes = new GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice", [ + { no: 1, name: "vote_choice_type", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType", GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType] }, + { no: 2, name: "identity_id", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice + */ +export const GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice = new GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "document_type_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "serialized_index_storage_values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 4, name: "vote_choice", kind: "message", T: () => GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote + */ +export const GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote = new GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPrefundedSpecializedBalanceRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest + */ +export const GetPrefundedSpecializedBalanceRequest = new GetPrefundedSpecializedBalanceRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0", [ + { no: 1, name: "id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0 + */ +export const GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0 = new GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPrefundedSpecializedBalanceResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse + */ +export const GetPrefundedSpecializedBalanceResponse = new GetPrefundedSpecializedBalanceResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0", [ + { no: 1, name: "balance", kind: "scalar", oneof: "result", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0 + */ +export const GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0 = new GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTotalCreditsInPlatformRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest + */ +export const GetTotalCreditsInPlatformRequest = new GetTotalCreditsInPlatformRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0", [ + { no: 1, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0 + */ +export const GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0 = new GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTotalCreditsInPlatformResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse + */ +export const GetTotalCreditsInPlatformResponse = new GetTotalCreditsInPlatformResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0", [ + { no: 1, name: "credits", kind: "scalar", oneof: "result", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0 + */ +export const GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0 = new GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPathElementsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPathElementsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetPathElementsRequest_GetPathElementsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsRequest + */ +export const GetPathElementsRequest = new GetPathElementsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPathElementsRequest_GetPathElementsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0", [ + { no: 1, name: "path", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "keys", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0 + */ +export const GetPathElementsRequest_GetPathElementsRequestV0 = new GetPathElementsRequest_GetPathElementsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPathElementsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPathElementsResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetPathElementsResponse_GetPathElementsResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse + */ +export const GetPathElementsResponse = new GetPathElementsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPathElementsResponse_GetPathElementsResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0", [ + { no: 1, name: "elements", kind: "message", oneof: "result", T: () => GetPathElementsResponse_GetPathElementsResponseV0_Elements }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0 + */ +export const GetPathElementsResponse_GetPathElementsResponseV0 = new GetPathElementsResponse_GetPathElementsResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPathElementsResponse_GetPathElementsResponseV0_Elements$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements", [ + { no: 1, name: "elements", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements + */ +export const GetPathElementsResponse_GetPathElementsResponseV0_Elements = new GetPathElementsResponse_GetPathElementsResponseV0_Elements$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetStatusRequest_GetStatusRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusRequest + */ +export const GetStatusRequest = new GetStatusRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusRequest_GetStatusRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0 + */ +export const GetStatusRequest_GetStatusRequestV0 = new GetStatusRequest_GetStatusRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetStatusResponse_GetStatusResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse + */ +export const GetStatusResponse = new GetStatusResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0", [ + { no: 1, name: "version", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Version }, + { no: 2, name: "node", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Node }, + { no: 3, name: "chain", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Chain }, + { no: 4, name: "network", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Network }, + { no: 5, name: "state_sync", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_StateSync }, + { no: 6, name: "time", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Time } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0 + */ +export const GetStatusResponse_GetStatusResponseV0 = new GetStatusResponse_GetStatusResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Version$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version", [ + { no: 1, name: "software", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Version_Software }, + { no: 2, name: "protocol", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Version_Protocol } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version + */ +export const GetStatusResponse_GetStatusResponseV0_Version = new GetStatusResponse_GetStatusResponseV0_Version$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Version_Software$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software", [ + { no: 1, name: "dapi", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "drive", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "tenderdash", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software + */ +export const GetStatusResponse_GetStatusResponseV0_Version_Software = new GetStatusResponse_GetStatusResponseV0_Version_Software$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Version_Protocol$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol", [ + { no: 1, name: "tenderdash", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash }, + { no: 2, name: "drive", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol + */ +export const GetStatusResponse_GetStatusResponseV0_Version_Protocol = new GetStatusResponse_GetStatusResponseV0_Version_Protocol$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash", [ + { no: 1, name: "p2p", kind: "scalar", jsonName: "p2p", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "block", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash + */ +export const GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash = new GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive", [ + { no: 3, name: "latest", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "current", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive + */ +export const GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive = new GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Time$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time", [ + { no: 1, name: "local", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "block", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ }, + { no: 3, name: "genesis", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ }, + { no: 4, name: "epoch", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time + */ +export const GetStatusResponse_GetStatusResponseV0_Time = new GetStatusResponse_GetStatusResponseV0_Time$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Node$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node", [ + { no: 1, name: "id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "pro_tx_hash", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node + */ +export const GetStatusResponse_GetStatusResponseV0_Node = new GetStatusResponse_GetStatusResponseV0_Node$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Chain$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain", [ + { no: 1, name: "catching_up", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 2, name: "latest_block_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "latest_app_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 4, name: "latest_block_height", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 5, name: "earliest_block_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 6, name: "earliest_app_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 7, name: "earliest_block_height", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 9, name: "max_peer_block_height", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 10, name: "core_chain_locked_height", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain + */ +export const GetStatusResponse_GetStatusResponseV0_Chain = new GetStatusResponse_GetStatusResponseV0_Chain$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Network$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network", [ + { no: 1, name: "chain_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "peers_count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "listening", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network + */ +export const GetStatusResponse_GetStatusResponseV0_Network = new GetStatusResponse_GetStatusResponseV0_Network$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_StateSync$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync", [ + { no: 1, name: "total_synced_time", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "remaining_time", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 3, name: "total_snapshots", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "chunk_process_avg_time", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 5, name: "snapshot_height", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 6, name: "snapshot_chunks_count", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 7, name: "backfilled_blocks", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 8, name: "backfill_blocks_total", kind: "scalar", T: 4 /*ScalarType.UINT64*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync + */ +export const GetStatusResponse_GetStatusResponseV0_StateSync = new GetStatusResponse_GetStatusResponseV0_StateSync$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetCurrentQuorumsInfoRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest + */ +export const GetCurrentQuorumsInfoRequest = new GetCurrentQuorumsInfoRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0 + */ +export const GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0 = new GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetCurrentQuorumsInfoResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse + */ +export const GetCurrentQuorumsInfoResponse = new GetCurrentQuorumsInfoResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetCurrentQuorumsInfoResponse_ValidatorV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0", [ + { no: 1, name: "pro_tx_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "node_ip", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "is_banned", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0 + */ +export const GetCurrentQuorumsInfoResponse_ValidatorV0 = new GetCurrentQuorumsInfoResponse_ValidatorV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetCurrentQuorumsInfoResponse_ValidatorSetV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0", [ + { no: 1, name: "quorum_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "core_height", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "members", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetCurrentQuorumsInfoResponse_ValidatorV0 }, + { no: 4, name: "threshold_public_key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0 + */ +export const GetCurrentQuorumsInfoResponse_ValidatorSetV0 = new GetCurrentQuorumsInfoResponse_ValidatorSetV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0", [ + { no: 1, name: "quorum_hashes", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "current_quorum_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "validator_sets", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetCurrentQuorumsInfoResponse_ValidatorSetV0 }, + { no: 4, name: "last_block_proposer", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0 + */ +export const GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0 = new GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenBalancesRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + */ +export const GetIdentityTokenBalancesRequest = new GetIdentityTokenBalancesRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "token_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + */ +export const GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 = new GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenBalancesResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + */ +export const GetIdentityTokenBalancesResponse = new GetIdentityTokenBalancesResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0", [ + { no: 1, name: "token_balances", kind: "message", oneof: "result", T: () => GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + */ +export const GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 = new GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "balance", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + */ +export const GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry = new GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances", [ + { no: 1, name: "token_balances", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + */ +export const GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances = new GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenBalancesRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + */ +export const GetIdentitiesTokenBalancesRequest = new GetIdentitiesTokenBalancesRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "identity_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + */ +export const GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 = new GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenBalancesResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + */ +export const GetIdentitiesTokenBalancesResponse = new GetIdentitiesTokenBalancesResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0", [ + { no: 1, name: "identity_token_balances", kind: "message", oneof: "result", T: () => GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + */ +export const GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 = new GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "balance", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + */ +export const GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry = new GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances", [ + { no: 1, name: "identity_token_balances", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + */ +export const GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances = new GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenInfosRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + */ +export const GetIdentityTokenInfosRequest = new GetIdentityTokenInfosRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "token_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + */ +export const GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 = new GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenInfosResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + */ +export const GetIdentityTokenInfosResponse = new GetIdentityTokenInfosResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0", [ + { no: 1, name: "token_infos", kind: "message", oneof: "result", T: () => GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + */ +export const GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 = new GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry", [ + { no: 1, name: "frozen", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + */ +export const GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry = new GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "info", kind: "message", T: () => GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + */ +export const GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry = new GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos", [ + { no: 1, name: "token_infos", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + */ +export const GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos = new GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenInfosRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + */ +export const GetIdentitiesTokenInfosRequest = new GetIdentitiesTokenInfosRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "identity_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + */ +export const GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 = new GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenInfosResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + */ +export const GetIdentitiesTokenInfosResponse = new GetIdentitiesTokenInfosResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0", [ + { no: 1, name: "identity_token_infos", kind: "message", oneof: "result", T: () => GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + */ +export const GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 = new GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry", [ + { no: 1, name: "frozen", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + */ +export const GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry = new GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "info", kind: "message", T: () => GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + */ +export const GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry = new GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos", [ + { no: 1, name: "token_infos", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + */ +export const GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos = new GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenStatusesRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenStatusesRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTokenStatusesRequest_GetTokenStatusesRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesRequest + */ +export const GetTokenStatusesRequest = new GetTokenStatusesRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenStatusesRequest_GetTokenStatusesRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0", [ + { no: 1, name: "token_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + */ +export const GetTokenStatusesRequest_GetTokenStatusesRequestV0 = new GetTokenStatusesRequest_GetTokenStatusesRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenStatusesResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenStatusesResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTokenStatusesResponse_GetTokenStatusesResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse + */ +export const GetTokenStatusesResponse = new GetTokenStatusesResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenStatusesResponse_GetTokenStatusesResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0", [ + { no: 1, name: "token_statuses", kind: "message", oneof: "result", T: () => GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + */ +export const GetTokenStatusesResponse_GetTokenStatusesResponseV0 = new GetTokenStatusesResponse_GetTokenStatusesResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "paused", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + */ +export const GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry = new GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses", [ + { no: 1, name: "token_statuses", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + */ +export const GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses = new GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + */ +export const GetTokenPreProgrammedDistributionsRequest = new GetTokenPreProgrammedDistributionsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "start_at_info", kind: "message", T: () => GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo }, + { no: 3, name: "limit", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + */ +export const GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 = new GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo", [ + { no: 1, name: "start_time_ms", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 2, name: "start_recipient", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "start_recipient_included", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + */ +export const GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo = new GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + */ +export const GetTokenPreProgrammedDistributionsResponse = new GetTokenPreProgrammedDistributionsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0", [ + { no: 1, name: "token_distributions", kind: "message", oneof: "result", T: () => GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + */ +export const GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 = new GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry", [ + { no: 1, name: "recipient_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "amount", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + */ +export const GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry = new GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry", [ + { no: 1, name: "timestamp", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 2, name: "distributions", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + */ +export const GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry = new GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions", [ + { no: 1, name: "token_distributions", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + */ +export const GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions = new GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenTotalSupplyRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + */ +export const GetTokenTotalSupplyRequest = new GetTokenTotalSupplyRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + */ +export const GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 = new GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenTotalSupplyResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + */ +export const GetTokenTotalSupplyResponse = new GetTokenTotalSupplyResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0", [ + { no: 1, name: "token_total_supply", kind: "message", oneof: "result", T: () => GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + */ +export const GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 = new GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "total_aggregated_amount_in_user_accounts", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 3, name: "total_system_amount", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + */ +export const GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry = new GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfoRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfoRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupInfoRequest_GetGroupInfoRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoRequest + */ +export const GetGroupInfoRequest = new GetGroupInfoRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfoRequest_GetGroupInfoRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "group_contract_position", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + */ +export const GetGroupInfoRequest_GetGroupInfoRequestV0 = new GetGroupInfoRequest_GetGroupInfoRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfoResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfoResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupInfoResponse_GetGroupInfoResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse + */ +export const GetGroupInfoResponse = new GetGroupInfoResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfoResponse_GetGroupInfoResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0", [ + { no: 1, name: "group_info", kind: "message", oneof: "result", T: () => GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 4, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + */ +export const GetGroupInfoResponse_GetGroupInfoResponseV0 = new GetGroupInfoResponse_GetGroupInfoResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry", [ + { no: 1, name: "member_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "power", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + */ +export const GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry = new GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry", [ + { no: 1, name: "members", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry }, + { no: 2, name: "group_required_power", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + */ +export const GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry = new GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo", [ + { no: 1, name: "group_info", kind: "message", T: () => GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + */ +export const GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo = new GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupInfosRequest_GetGroupInfosRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest + */ +export const GetGroupInfosRequest = new GetGroupInfosRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosRequest_StartAtGroupContractPosition$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition", [ + { no: 1, name: "start_group_contract_position", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "start_group_contract_position_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + */ +export const GetGroupInfosRequest_StartAtGroupContractPosition = new GetGroupInfosRequest_StartAtGroupContractPosition$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosRequest_GetGroupInfosRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "start_at_group_contract_position", kind: "message", T: () => GetGroupInfosRequest_StartAtGroupContractPosition }, + { no: 3, name: "count", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + */ +export const GetGroupInfosRequest_GetGroupInfosRequestV0 = new GetGroupInfosRequest_GetGroupInfosRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupInfosResponse_GetGroupInfosResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse + */ +export const GetGroupInfosResponse = new GetGroupInfosResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosResponse_GetGroupInfosResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0", [ + { no: 1, name: "group_infos", kind: "message", oneof: "result", T: () => GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 4, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + */ +export const GetGroupInfosResponse_GetGroupInfosResponseV0 = new GetGroupInfosResponse_GetGroupInfosResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry", [ + { no: 1, name: "member_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "power", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + */ +export const GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry = new GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry", [ + { no: 1, name: "group_contract_position", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "members", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry }, + { no: 3, name: "group_required_power", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + */ +export const GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry = new GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos", [ + { no: 1, name: "group_infos", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + */ +export const GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos = new GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupActionsRequest_GetGroupActionsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest + */ +export const GetGroupActionsRequest = new GetGroupActionsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsRequest_StartAtActionId$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId", [ + { no: 1, name: "start_action_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "start_action_id_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + */ +export const GetGroupActionsRequest_StartAtActionId = new GetGroupActionsRequest_StartAtActionId$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsRequest_GetGroupActionsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "group_contract_position", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "status", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus", GetGroupActionsRequest_ActionStatus] }, + { no: 4, name: "start_at_action_id", kind: "message", T: () => GetGroupActionsRequest_StartAtActionId }, + { no: 5, name: "count", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 6, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + */ +export const GetGroupActionsRequest_GetGroupActionsRequestV0 = new GetGroupActionsRequest_GetGroupActionsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse + */ +export const GetGroupActionsResponse = new GetGroupActionsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0", [ + { no: 1, name: "group_actions", kind: "message", oneof: "result", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0 = new GetGroupActionsResponse_GetGroupActionsResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent", [ + { no: 1, name: "amount", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 2, name: "recipient_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "public_note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent", [ + { no: 1, name: "amount", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 2, name: "public_note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent", [ + { no: 1, name: "frozen_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "public_note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent", [ + { no: 1, name: "frozen_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "public_note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent", [ + { no: 1, name: "frozen_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "amount", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 3, name: "public_note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote", [ + { no: 1, name: "sender_key_index", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "recipient_key_index", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "encrypted_data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote = new GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote", [ + { no: 1, name: "root_encryption_key_index", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "derivation_encryption_key_index", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "encrypted_data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote = new GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent", [ + { no: 1, name: "action_type", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType", GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType] }, + { no: 2, name: "public_note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent", [ + { no: 1, name: "token_config_update_item", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "public_note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent", [ + { no: 1, name: "token_event", kind: "message", oneof: "eventType", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent }, + { no: 2, name: "document_event", kind: "message", oneof: "eventType", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent }, + { no: 3, name: "contract_event", kind: "message", oneof: "eventType", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent", [ + { no: 1, name: "create", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent", [ + { no: 1, name: "created_document", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent", [ + { no: 1, name: "updated_contract", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent", [ + { no: 1, name: "update", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent", [ + { no: 1, name: "mint", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent }, + { no: 2, name: "burn", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent }, + { no: 3, name: "freeze", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent }, + { no: 4, name: "unfreeze", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent }, + { no: 5, name: "destroy_frozen_funds", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent }, + { no: 6, name: "emergency_action", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent }, + { no: 7, name: "token_config_update", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry", [ + { no: 1, name: "action_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "event", kind: "message", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry = new GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions", [ + { no: 1, name: "group_actions", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions = new GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionSignersRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionSignersRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersRequest + */ +export const GetGroupActionSignersRequest = new GetGroupActionSignersRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionSignersRequest_GetGroupActionSignersRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "group_contract_position", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "status", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus", GetGroupActionSignersRequest_ActionStatus] }, + { no: 4, name: "action_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + */ +export const GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 = new GetGroupActionSignersRequest_GetGroupActionSignersRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionSignersResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionSignersResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse + */ +export const GetGroupActionSignersResponse = new GetGroupActionSignersResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionSignersResponse_GetGroupActionSignersResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0", [ + { no: 1, name: "group_action_signers", kind: "message", oneof: "result", T: () => GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + */ +export const GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 = new GetGroupActionSignersResponse_GetGroupActionSignersResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner", [ + { no: 1, name: "signer_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "power", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + */ +export const GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner = new GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners", [ + { no: 1, name: "signers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + */ +export const GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners = new GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners$Type(); +/** + * @generated ServiceType for protobuf service org.dash.platform.dapi.v0.Platform + */ +export const Platform = new ServiceType("org.dash.platform.dapi.v0.Platform", [ + { name: "broadcastStateTransition", options: {}, I: BroadcastStateTransitionRequest, O: BroadcastStateTransitionResponse }, + { name: "getIdentity", options: {}, I: GetIdentityRequest, O: GetIdentityResponse }, + { name: "getIdentityKeys", options: {}, I: GetIdentityKeysRequest, O: GetIdentityKeysResponse }, + { name: "getIdentitiesContractKeys", options: {}, I: GetIdentitiesContractKeysRequest, O: GetIdentitiesContractKeysResponse }, + { name: "getIdentityNonce", options: {}, I: GetIdentityNonceRequest, O: GetIdentityNonceResponse }, + { name: "getIdentityContractNonce", options: {}, I: GetIdentityContractNonceRequest, O: GetIdentityContractNonceResponse }, + { name: "getIdentityBalance", options: {}, I: GetIdentityBalanceRequest, O: GetIdentityBalanceResponse }, + { name: "getIdentitiesBalances", options: {}, I: GetIdentitiesBalancesRequest, O: GetIdentitiesBalancesResponse }, + { name: "getIdentityBalanceAndRevision", options: {}, I: GetIdentityBalanceAndRevisionRequest, O: GetIdentityBalanceAndRevisionResponse }, + { name: "getEvonodesProposedEpochBlocksByIds", options: {}, I: GetEvonodesProposedEpochBlocksByIdsRequest, O: GetEvonodesProposedEpochBlocksResponse }, + { name: "getEvonodesProposedEpochBlocksByRange", options: {}, I: GetEvonodesProposedEpochBlocksByRangeRequest, O: GetEvonodesProposedEpochBlocksResponse }, + { name: "getProofs", options: {}, I: GetProofsRequest, O: GetProofsResponse }, + { name: "getDataContract", options: {}, I: GetDataContractRequest, O: GetDataContractResponse }, + { name: "getDataContractHistory", options: {}, I: GetDataContractHistoryRequest, O: GetDataContractHistoryResponse }, + { name: "getDataContracts", options: {}, I: GetDataContractsRequest, O: GetDataContractsResponse }, + { name: "getDocuments", options: {}, I: GetDocumentsRequest, O: GetDocumentsResponse }, + { name: "getIdentityByPublicKeyHash", options: {}, I: GetIdentityByPublicKeyHashRequest, O: GetIdentityByPublicKeyHashResponse }, + { name: "waitForStateTransitionResult", options: {}, I: WaitForStateTransitionResultRequest, O: WaitForStateTransitionResultResponse }, + { name: "getConsensusParams", options: {}, I: GetConsensusParamsRequest, O: GetConsensusParamsResponse }, + { name: "getProtocolVersionUpgradeState", options: {}, I: GetProtocolVersionUpgradeStateRequest, O: GetProtocolVersionUpgradeStateResponse }, + { name: "getProtocolVersionUpgradeVoteStatus", options: {}, I: GetProtocolVersionUpgradeVoteStatusRequest, O: GetProtocolVersionUpgradeVoteStatusResponse }, + { name: "getEpochsInfo", options: {}, I: GetEpochsInfoRequest, O: GetEpochsInfoResponse }, + { name: "getContestedResources", options: {}, I: GetContestedResourcesRequest, O: GetContestedResourcesResponse }, + { name: "getContestedResourceVoteState", options: {}, I: GetContestedResourceVoteStateRequest, O: GetContestedResourceVoteStateResponse }, + { name: "getContestedResourceVotersForIdentity", options: {}, I: GetContestedResourceVotersForIdentityRequest, O: GetContestedResourceVotersForIdentityResponse }, + { name: "getContestedResourceIdentityVotes", options: {}, I: GetContestedResourceIdentityVotesRequest, O: GetContestedResourceIdentityVotesResponse }, + { name: "getVotePollsByEndDate", options: {}, I: GetVotePollsByEndDateRequest, O: GetVotePollsByEndDateResponse }, + { name: "getPrefundedSpecializedBalance", options: {}, I: GetPrefundedSpecializedBalanceRequest, O: GetPrefundedSpecializedBalanceResponse }, + { name: "getTotalCreditsInPlatform", options: {}, I: GetTotalCreditsInPlatformRequest, O: GetTotalCreditsInPlatformResponse }, + { name: "getPathElements", options: {}, I: GetPathElementsRequest, O: GetPathElementsResponse }, + { name: "getStatus", options: {}, I: GetStatusRequest, O: GetStatusResponse }, + { name: "getCurrentQuorumsInfo", options: {}, I: GetCurrentQuorumsInfoRequest, O: GetCurrentQuorumsInfoResponse }, + { name: "getIdentityTokenBalances", options: {}, I: GetIdentityTokenBalancesRequest, O: GetIdentityTokenBalancesResponse }, + { name: "getIdentitiesTokenBalances", options: {}, I: GetIdentitiesTokenBalancesRequest, O: GetIdentitiesTokenBalancesResponse }, + { name: "getIdentityTokenInfos", options: {}, I: GetIdentityTokenInfosRequest, O: GetIdentityTokenInfosResponse }, + { name: "getIdentitiesTokenInfos", options: {}, I: GetIdentitiesTokenInfosRequest, O: GetIdentitiesTokenInfosResponse }, + { name: "getTokenStatuses", options: {}, I: GetTokenStatusesRequest, O: GetTokenStatusesResponse }, + { name: "getTokenPreProgrammedDistributions", options: {}, I: GetTokenPreProgrammedDistributionsRequest, O: GetTokenPreProgrammedDistributionsResponse }, + { name: "getTokenTotalSupply", options: {}, I: GetTokenTotalSupplyRequest, O: GetTokenTotalSupplyResponse }, + { name: "getGroupInfo", options: {}, I: GetGroupInfoRequest, O: GetGroupInfoResponse }, + { name: "getGroupInfos", options: {}, I: GetGroupInfosRequest, O: GetGroupInfosResponse }, + { name: "getGroupActions", options: {}, I: GetGroupActionsRequest, O: GetGroupActionsResponse }, + { name: "getGroupActionSigners", options: {}, I: GetGroupActionSignersRequest, O: GetGroupActionSignersResponse } +]); diff --git a/built/DashPlatform.js/src/hex.d.ts b/built/DashPlatform.js/src/hex.d.ts new file mode 100644 index 0000000..ff6a030 --- /dev/null +++ b/built/DashPlatform.js/src/hex.d.ts @@ -0,0 +1,8 @@ +/** + * @param {ArrayBuffer | Uint8Array} arrayBuffer + */ +export function toHex(arrayBuffer: ArrayBuffer | Uint8Array): string; +/** + * @param {string} string + */ +export function fromHex(string: string): Uint8Array; diff --git a/built/DashPlatform.js/src/hex.js b/built/DashPlatform.js/src/hex.js new file mode 100644 index 0000000..323a6ac --- /dev/null +++ b/built/DashPlatform.js/src/hex.js @@ -0,0 +1,27 @@ +/** + * @type {string[]} + */ +const byteToHex = []; +for (let n = 0; n <= 0xff; ++n) { + const hexOctet = n.toString(16).padStart(2, "0"); + byteToHex.push(hexOctet); +} +/** + * @param {ArrayBuffer | Uint8Array} arrayBuffer + */ +export function toHex(arrayBuffer) { + const buff = new Uint8Array(arrayBuffer); + const hexOctets = []; // new Array(buff.length) is even faster (preallocates necessary array size), then use hexOctets[i] instead of .push() + for (let i = 0; i < buff.length; ++i) + hexOctets.push(byteToHex[buff[i]]); + return hexOctets.join(""); +} +/** + * @param {string} string + */ +export function fromHex(string) { + const uint8array = new Uint8Array(Math.ceil(string.length / 2)); + for (let i = 0; i < string.length;) + uint8array[i / 2] = Number.parseInt(string.slice(i, i += 2), 16); + return uint8array; +} diff --git a/built/DashPlatform.js/src/key-utils.d.ts b/built/DashPlatform.js/src/key-utils.d.ts new file mode 100644 index 0000000..f2a4f57 --- /dev/null +++ b/built/DashPlatform.js/src/key-utils.d.ts @@ -0,0 +1,76 @@ +/** + * @param {String} id - typically address + * @param {KeyInfo} keyInfo + */ +export function set(id: string, keyInfo: KeyInfo): void; +/** + * @param {Uint8Array} privKeyBytes + * @param {Uint8Array} hashBytes + */ +export function sign(privKeyBytes: Uint8Array, hashBytes: Uint8Array): Promise; +/** + * @param {Uint8Array} privKeyBytes + * @param {Uint8Array} hashBytes + */ +export function signAsn1(privKeyBytes: Uint8Array, hashBytes: Uint8Array): Promise; +/** + * @param {Uint8Array} bytes + */ +export function doubleSha256(bytes: Uint8Array): Promise>; +/** + * @param {Uint8Array} bytes + */ +export function sha256(bytes: Uint8Array): Promise>; +/** + * Sha256 then RIPEMD-160 + * @param {Uint8Array} bytes + */ +export function pubkeyHash(bytes: Uint8Array): Promise; +/** + * This is called "Simple Sign" by the Rust SDK. + * @param {Object} opts + * @param {Uint8Array} opts.privKeyBytes + * @param {Uint8Array} opts.doubleSha256Bytes + */ +export function magicSign({ privKeyBytes, doubleSha256Bytes }: { + privKeyBytes: Uint8Array; + doubleSha256Bytes: Uint8Array; +}): Promise>; +/** + * @param {Uint8Array} privKeyBytes + * @param {Uint8Array} hashBytes + * @param {Uint8Array} [sigBytes] - preallocated 64 bytes + */ +export function signP1363(privKeyBytes: Uint8Array, hashBytes: Uint8Array, sigBytes?: Uint8Array): Promise>; +/** + * @param {Uint8Array} asn1 + * @param {Uint8Array} [p1363Signature] + */ +export function asn1ToP1363Signature(asn1: Uint8Array, p1363Signature?: Uint8Array): Uint8Array; +/** + * @param {{ address?: string; txid: any; outputIndex: any; }} input + */ +export function getPrivateKey(input: { + address?: string; + txid: any; + outputIndex: any; +}): Promise; +/** + * @param {{ address?: string; txid: any; outputIndex: any; }} txInput + * @param {any} i + */ +export function getPublicKey(txInput: { + address?: string; + txid: any; + outputIndex: any; +}, i: any): Promise; +/** + * @param {Uint8Array} privKeyBytes + */ +export function toPublicKey(privKeyBytes: Uint8Array): Promise; +export type KeyInfo = { + address: string; + privateKey: Uint8Array; + publicKey: Uint8Array; + pubKeyHash: string; +}; diff --git a/built/DashPlatform.js/src/key-utils.js b/built/DashPlatform.js/src/key-utils.js new file mode 100644 index 0000000..9475a8e --- /dev/null +++ b/built/DashPlatform.js/src/key-utils.js @@ -0,0 +1,184 @@ +"use strict"; +// @ts-expect-error no types +import Secp256k1 from "@dashincubator/secp256k1"; +import ripemd160 from "ripemd160-js"; +/** + * @typedef KeyInfo + * @prop {String} address + * @prop {Uint8Array} privateKey + * @prop {Uint8Array} publicKey + * @prop {String} pubKeyHash + */ +/** @type {Object.} */ +const keysMap = {}; +/** + * @param {String} id - typically address + * @param {KeyInfo} keyInfo + */ +export function set(id, keyInfo) { + if (!id) { + throw new Error(`key identifier is not defined)`); + } + keysMap[id] = keyInfo; +} +; +/** + * @param {Uint8Array} privKeyBytes + * @param {Uint8Array} hashBytes + */ +export async function sign(privKeyBytes, hashBytes) { + let asn1Bytes = await signAsn1(privKeyBytes, hashBytes); + return asn1Bytes; +} +; +/** + * @param {Uint8Array} privKeyBytes + * @param {Uint8Array} hashBytes + */ +export async function signAsn1(privKeyBytes, hashBytes) { + let testing = true; + let sigOpts = { canonical: true }; + if (!testing) { + Object.assign({ extraEntropy: true }); + } + let sigBytes = await Secp256k1.sign(hashBytes, privKeyBytes, sigOpts); + return sigBytes; +} +; +/** + * @param {Uint8Array} bytes + */ +export async function doubleSha256(bytes) { + let firstHash = await sha256(bytes); + let secondHash = await sha256(firstHash); + return secondHash; +} +; +/** + * @param {Uint8Array} bytes + */ +export async function sha256(bytes) { + let hashBuffer = await crypto.subtle.digest("SHA-256", bytes); + let hashBytes = new Uint8Array(hashBuffer); + return hashBytes; +} +/** + * Sha256 then RIPEMD-160 + * @param {Uint8Array} bytes + */ +export async function pubkeyHash(bytes) { + let firstHash = await sha256(bytes); + return ripemd160(Buffer.from(firstHash)); +} +/** + * This is called "Simple Sign" by the Rust SDK. + * @param {Object} opts + * @param {Uint8Array} opts.privKeyBytes + * @param {Uint8Array} opts.doubleSha256Bytes + */ +export async function magicSign({ privKeyBytes, doubleSha256Bytes }) { + if (doubleSha256Bytes?.length !== 32) { + throw new Error(`'doubleSha256Bytes' must be a 32-byte double sha256 hash`); + } + let MAGIC_OFFSET = 27 + 4; // 27 because bitcoin, 4 because "compressed" key + let testing = true; + let sigOpts = { canonical: true, der: false, recovered: true }; + if (!testing) { + Object.assign({ extraEntropy: true }); + } + let recoverySig = await Secp256k1.sign(doubleSha256Bytes, privKeyBytes, sigOpts); + let magicSig = new Uint8Array(65); + // the magic byte is prepended (the signature is NOT reversed) + magicSig[0] = MAGIC_OFFSET + recoverySig[1]; + magicSig.set(recoverySig[0], 1); + return magicSig; +} +; +/** + * @param {Uint8Array} privKeyBytes + * @param {Uint8Array} hashBytes + * @param {Uint8Array} [sigBytes] - preallocated 64 bytes + */ +export async function signP1363(privKeyBytes, hashBytes, sigBytes) { + let asn1Bytes = await signAsn1(privKeyBytes, hashBytes); + let p1363Bytes = asn1ToP1363Signature(asn1Bytes, sigBytes); + // TODO DEBUG TESTING + // for (let i = 0; i < p1363Bytes.length; i += 1) { + // p1363Bytes[i] = 0xff; + // } + return p1363Bytes; +} +; +/** + * @param {Uint8Array} asn1 + * @param {Uint8Array} [p1363Signature] + */ +export function asn1ToP1363Signature(asn1, p1363Signature) { + if (asn1[0] !== 0x30) { + throw new Error("Invalid DER signature format"); + } + let offset = 0; + offset += 2; // skip SEQUENCE and length bytes + offset += 1; // skip type byte + let rLength = asn1[offset]; + offset += 1; + let r = asn1.slice(offset, offset + rLength); + offset += rLength; + offset += 1; // skip type byte + let sLength = asn1[offset]; + offset += 1; + let s = asn1.slice(offset, offset + sLength); + if (!p1363Signature) { + p1363Signature = new Uint8Array(64); + } + // remove ASN1 padding, or zero-pad the start of r and s, if needed + let rStart = 32 - r.length; + if (rStart === -1) { + r = r.subarray(1); + rStart = 0; + } + p1363Signature.set(r, rStart); + let sStart = 64 - s.length; + if (sStart === 31) { + s = s.subarray(1); + sStart = 32; + } + p1363Signature.set(s, sStart); + return p1363Signature; +} +; +/** + * @param {{ address?: string; txid: any; outputIndex: any; }} input + */ +export async function getPrivateKey(input) { + if (!input.address) { + //throw new Error('should put the address on the input there buddy...'); + console.warn("missing address:", input.txid, input.outputIndex); + return null; + } + let keyInfo = keysMap[input.address]; + return keyInfo.privateKey; +} +; +/** + * @param {{ address?: string; txid: any; outputIndex: any; }} txInput + * @param {any} i + */ +export async function getPublicKey(txInput, i) { + let privKeyBytes = await getPrivateKey(txInput, i); + if (!privKeyBytes) { + return null; + } + let pubKeyBytes = await toPublicKey(privKeyBytes); + return pubKeyBytes; +} +; +/** + * @param {Uint8Array} privKeyBytes + */ +export async function toPublicKey(privKeyBytes) { + let isCompressed = true; + let pubKeyBytes = Secp256k1.getPublicKey(privKeyBytes, isCompressed); + return pubKeyBytes; +} +; diff --git a/built/DashPlatform.js/src/opcodes.d.ts b/built/DashPlatform.js/src/opcodes.d.ts new file mode 100644 index 0000000..5b9e86b --- /dev/null +++ b/built/DashPlatform.js/src/opcodes.d.ts @@ -0,0 +1,516 @@ +export declare const OP: { + /** Push an empty array onto the stack. */ + OP_PUSHBYTES_0: number; + /** Push the next byte as an array onto the stack. */ + OP_PUSHBYTES_1: number; + /** Push the next 2 bytes as an array onto the stack. */ + OP_PUSHBYTES_2: number; + /** Push the next 3 bytes as an array onto the stack. */ + OP_PUSHBYTES_3: number; + /** Push the next 4 bytes as an array onto the stack. */ + OP_PUSHBYTES_4: number; + /** Push the next 5 bytes as an array onto the stack. */ + OP_PUSHBYTES_5: number; + /** Push the next 6 bytes as an array onto the stack. */ + OP_PUSHBYTES_6: number; + /** Push the next 7 bytes as an array onto the stack. */ + OP_PUSHBYTES_7: number; + /** Push the next 8 bytes as an array onto the stack. */ + OP_PUSHBYTES_8: number; + /** Push the next 9 bytes as an array onto the stack. */ + OP_PUSHBYTES_9: number; + /** Push the next 10 bytes as an array onto the stack. */ + OP_PUSHBYTES_10: number; + /** Push the next 11 bytes as an array onto the stack. */ + OP_PUSHBYTES_11: number; + /** Push the next 12 bytes as an array onto the stack. */ + OP_PUSHBYTES_12: number; + /** Push the next 13 bytes as an array onto the stack. */ + OP_PUSHBYTES_13: number; + /** Push the next 14 bytes as an array onto the stack. */ + OP_PUSHBYTES_14: number; + /** Push the next 15 bytes as an array onto the stack. */ + OP_PUSHBYTES_15: number; + /** Push the next 16 bytes as an array onto the stack. */ + OP_PUSHBYTES_16: number; + /** Push the next 17 bytes as an array onto the stack. */ + OP_PUSHBYTES_17: number; + /** Push the next 18 bytes as an array onto the stack. */ + OP_PUSHBYTES_18: number; + /** Push the next 19 bytes as an array onto the stack. */ + OP_PUSHBYTES_19: number; + /** Push the next 20 bytes as an array onto the stack. */ + OP_PUSHBYTES_20: number; + /** Push the next 21 bytes as an array onto the stack. */ + OP_PUSHBYTES_21: number; + /** Push the next 22 bytes as an array onto the stack. */ + OP_PUSHBYTES_22: number; + /** Push the next 23 bytes as an array onto the stack. */ + OP_PUSHBYTES_23: number; + /** Push the next 24 bytes as an array onto the stack. */ + OP_PUSHBYTES_24: number; + /** Push the next 25 bytes as an array onto the stack. */ + OP_PUSHBYTES_25: number; + /** Push the next 26 bytes as an array onto the stack. */ + OP_PUSHBYTES_26: number; + /** Push the next 27 bytes as an array onto the stack. */ + OP_PUSHBYTES_27: number; + /** Push the next 28 bytes as an array onto the stack. */ + OP_PUSHBYTES_28: number; + /** Push the next 29 bytes as an array onto the stack. */ + OP_PUSHBYTES_29: number; + /** Push the next 30 bytes as an array onto the stack. */ + OP_PUSHBYTES_30: number; + /** Push the next 31 bytes as an array onto the stack. */ + OP_PUSHBYTES_31: number; + /** Push the next 32 bytes as an array onto the stack. */ + OP_PUSHBYTES_32: number; + /** Push the next 33 bytes as an array onto the stack. */ + OP_PUSHBYTES_33: number; + /** Push the next 34 bytes as an array onto the stack. */ + OP_PUSHBYTES_34: number; + /** Push the next 35 bytes as an array onto the stack. */ + OP_PUSHBYTES_35: number; + /** Push the next 36 bytes as an array onto the stack. */ + OP_PUSHBYTES_36: number; + /** Push the next 37 bytes as an array onto the stack. */ + OP_PUSHBYTES_37: number; + /** Push the next 38 bytes as an array onto the stack. */ + OP_PUSHBYTES_38: number; + /** Push the next 39 bytes as an array onto the stack. */ + OP_PUSHBYTES_39: number; + /** Push the next 40 bytes as an array onto the stack. */ + OP_PUSHBYTES_40: number; + /** Push the next 41 bytes as an array onto the stack. */ + OP_PUSHBYTES_41: number; + /** Push the next 42 bytes as an array onto the stack. */ + OP_PUSHBYTES_42: number; + /** Push the next 43 bytes as an array onto the stack. */ + OP_PUSHBYTES_43: number; + /** Push the next 44 bytes as an array onto the stack. */ + OP_PUSHBYTES_44: number; + /** Push the next 45 bytes as an array onto the stack. */ + OP_PUSHBYTES_45: number; + /** Push the next 46 bytes as an array onto the stack. */ + OP_PUSHBYTES_46: number; + /** Push the next 47 bytes as an array onto the stack. */ + OP_PUSHBYTES_47: number; + /** Push the next 48 bytes as an array onto the stack. */ + OP_PUSHBYTES_48: number; + /** Push the next 49 bytes as an array onto the stack. */ + OP_PUSHBYTES_49: number; + /** Push the next 50 bytes as an array onto the stack. */ + OP_PUSHBYTES_50: number; + /** Push the next 51 bytes as an array onto the stack. */ + OP_PUSHBYTES_51: number; + /** Push the next 52 bytes as an array onto the stack. */ + OP_PUSHBYTES_52: number; + /** Push the next 53 bytes as an array onto the stack. */ + OP_PUSHBYTES_53: number; + /** Push the next 54 bytes as an array onto the stack. */ + OP_PUSHBYTES_54: number; + /** Push the next 55 bytes as an array onto the stack. */ + OP_PUSHBYTES_55: number; + /** Push the next 56 bytes as an array onto the stack. */ + OP_PUSHBYTES_56: number; + /** Push the next 57 bytes as an array onto the stack. */ + OP_PUSHBYTES_57: number; + /** Push the next 58 bytes as an array onto the stack. */ + OP_PUSHBYTES_58: number; + /** Push the next 59 bytes as an array onto the stack. */ + OP_PUSHBYTES_59: number; + /** Push the next 60 bytes as an array onto the stack. */ + OP_PUSHBYTES_60: number; + /** Push the next 61 bytes as an array onto the stack. */ + OP_PUSHBYTES_61: number; + /** Push the next 62 bytes as an array onto the stack. */ + OP_PUSHBYTES_62: number; + /** Push the next 63 bytes as an array onto the stack. */ + OP_PUSHBYTES_63: number; + /** Push the next 64 bytes as an array onto the stack. */ + OP_PUSHBYTES_64: number; + /** Push the next 65 bytes as an array onto the stack. */ + OP_PUSHBYTES_65: number; + /** Push the next 66 bytes as an array onto the stack. */ + OP_PUSHBYTES_66: number; + /** Push the next 67 bytes as an array onto the stack. */ + OP_PUSHBYTES_67: number; + /** Push the next 68 bytes as an array onto the stack. */ + OP_PUSHBYTES_68: number; + /** Push the next 69 bytes as an array onto the stack. */ + OP_PUSHBYTES_69: number; + /** Push the next 70 bytes as an array onto the stack. */ + OP_PUSHBYTES_70: number; + /** Push the next 71 bytes as an array onto the stack. */ + OP_PUSHBYTES_71: number; + /** Push the next 72 bytes as an array onto the stack. */ + OP_PUSHBYTES_72: number; + /** Push the next 73 bytes as an array onto the stack. */ + OP_PUSHBYTES_73: number; + /** Push the next 74 bytes as an array onto the stack. */ + OP_PUSHBYTES_74: number; + /** Push the next 75 bytes as an array onto the stack. */ + OP_PUSHBYTES_75: number; + /** Read the next byte as N; push the next N bytes as an array onto the stack. */ + OP_PUSHDATA1: number; + /** Read the next 2 bytes as N; push the next N bytes as an array onto the stack. */ + OP_PUSHDATA2: number; + /** Read the next 4 bytes as N; push the next N bytes as an array onto the stack. */ + OP_PUSHDATA4: number; + /** Push the array `0x81` onto the stack. */ + OP_PUSHNUM_NEG1: number; + /** Synonym for OP_RETURN. */ + OP_RESERVED: number; + /** Push the array `0x01` onto the stack. */ + OP_PUSHNUM_1: number; + /** the array `0x02` onto the stack. */ + OP_PUSHNUM_2: number; + /** Push the array `0x03` onto the stack. */ + OP_PUSHNUM_3: number; + /** Push the array `0x04` onto the stack. */ + OP_PUSHNUM_4: number; + /** Push the array `0x05` onto the stack. */ + OP_PUSHNUM_5: number; + /** Push the array `0x06` onto the stack. */ + OP_PUSHNUM_6: number; + /** Push the array `0x07` onto the stack. */ + OP_PUSHNUM_7: number; + /** Push the array `0x08` onto the stack. */ + OP_PUSHNUM_8: number; + /** Push the array `0x09` onto the stack. */ + OP_PUSHNUM_9: number; + /** Push the array `0x0a` onto the stack. */ + OP_PUSHNUM_10: number; + /** Push the array `0x0b` onto the stack. */ + OP_PUSHNUM_11: number; + /** Push the array `0x0c` onto the stack. */ + OP_PUSHNUM_12: number; + /** Push the array `0x0d` onto the stack. */ + OP_PUSHNUM_13: number; + /** Push the array `0x0e` onto the stack. */ + OP_PUSHNUM_14: number; + /** Push the array `0x0f` onto the stack. */ + OP_PUSHNUM_15: number; + /** Push the array `0x10` onto the stack. */ + OP_PUSHNUM_16: number; + /** Does nothing. */ + OP_NOP: number; + /** Synonym for OP_RETURN. */ + OP_VER: number; + /** Pop and execute the next statements if a nonzero element was popped. */ + OP_IF: number; + /** Pop and execute the next statements if a zero element was popped. */ + OP_NOTIF: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_VERIF: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_VERNOTIF: number; + /** Execute statements if those after the previous OP_IF were not, and vice-versa. + If there is no previous OP_IF, this acts as a RETURN. */ + OP_ELSE: number; + /** Pop and execute the next statements if a zero element was popped. */ + OP_ENDIF: number; + /** If the top value is zero or the stack is empty, fail; otherwise, pop the stack. */ + OP_VERIFY: number; + /** Fail the script immediately. (Must be executed.). */ + OP_RETURN: number; + /** Pop one element from the main stack onto the alt stack. */ + OP_TOALTSTACK: number; + /** Pop one element from the alt stack onto the main stack. */ + OP_FROMALTSTACK: number; + /** Drops the top two stack items. */ + OP_2DROP: number; + /** Duplicates the top two stack items as AB -> ABAB. */ + OP_2DUP: number; + /** Duplicates the two three stack items as ABC -> ABCABC. */ + OP_3DUP: number; + /** Copies the two stack items of items two spaces back to the front, as xxAB -> ABxxAB. */ + OP_2OVER: number; + /** Moves the two stack items four spaces back to the front, as xxxxAB -> ABxxxx. */ + OP_2ROT: number; + /** Swaps the top two pairs, as ABCD -> CDAB. */ + OP_2SWAP: number; + /** Duplicate the top stack element unless it is zero. */ + OP_IFDUP: number; + /** Push the current number of stack items onto the stack. */ + OP_DEPTH: number; + /** Drops the top stack item. */ + OP_DROP: number; + /** Duplicates the top stack item. */ + OP_DUP: number; + /** Drops the second-to-top stack item. */ + OP_NIP: number; + /** Copies the second-to-top stack item, as xA -> AxA. */ + OP_OVER: number; + /** Pop the top stack element as N. Copy the Nth stack element to the top. */ + OP_PICK: number; + /** Pop the top stack element as N. Move the Nth stack element to the top. */ + OP_ROLL: number; + /** Rotate the top three stack items, as [top next1 next2] -> [next2 top next1]. */ + OP_ROT: number; + /** Swap the top two stack items. */ + OP_SWAP: number; + /** Copy the top stack item to before the second item, as [top next] -> [top next top]. */ + OP_TUCK: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_CAT: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_SUBSTR: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_LEFT: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_RIGHT: number; + /** Pushes the length of the top stack item onto the stack. */ + OP_SIZE: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_INVERT: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_AND: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_OR: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_XOR: number; + /** Pushes 1 if the inputs are exactly equal, 0 otherwise. */ + OP_EQUAL: number; + /** Returns success if the inputs are exactly equal, failure otherwise. */ + OP_EQUALVERIFY: number; + /** Synonym for OP_RETURN. */ + OP_RESERVED1: number; + /** Synonym for OP_RETURN. */ + OP_RESERVED2: number; + /** Increment the top stack element in place. */ + OP_1ADD: number; + /** Decrement the top stack element in place. */ + OP_1SUB: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_2MUL: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_2DIV: number; + /** Multiply the top stack item by -1 in place. */ + OP_NEGATE: number; + /** Absolute value the top stack item in place. */ + OP_ABS: number; + /** Map 0 to 1 and everything else to 0, in place. */ + OP_NOT: number; + /** Map 0 to 0 and everything else to 1, in place. */ + OP_0NOTEQUAL: number; + /** Pop two stack items and push their sum. */ + OP_ADD: number; + /** Pop two stack items and push the second minus the top. */ + OP_SUB: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_MUL: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_DIV: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_MOD: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_LSHIFT: number; + /** Fail the script unconditionally, does not even need to be executed. */ + OP_RSHIFT: number; + /** Pop the top two stack items and push 1 if both are nonzero, else push 0. */ + OP_BOOLAND: number; + /** Pop the top two stack items and push 1 if either is nonzero, else push 0. */ + OP_BOOLOR: number; + /** Pop the top two stack items and push 1 if both are numerically equal, else push 0. */ + OP_NUMEQUAL: number; + /** Pop the top two stack items and return success if both are numerically equal, else return failure. */ + OP_NUMEQUALVERIFY: number; + /** Pop the top two stack items and push 0 if both are numerically equal, else push 1. */ + OP_NUMNOTEQUAL: number; + /** Pop the top two items; push 1 if the second is less than the top, 0 otherwise. */ + OP_LESSTHAN: number; + /** Pop the top two items; push 1 if the second is greater than the top, 0 otherwise. */ + OP_GREATERTHAN: number; + /** Pop the top two items; push 1 if the second is <= the top, 0 otherwise. */ + OP_LESSTHANOREQUAL: number; + /** Pop the top two items; push 1 if the second is >= the top, 0 otherwise. */ + OP_GREATERTHANOREQUAL: number; + /** Pop the top two items; push the smaller. */ + OP_MIN: number; + /** Pop the top two items; push the larger. */ + OP_MAX: number; + /** Pop the top three items; if the top is >= the second and < the third, push 1, otherwise push 0. */ + OP_WITHIN: number; + /** Pop the top stack item and push its RIPEMD160 hash. */ + OP_RIPEMD160: number; + /** Pop the top stack item and push its SHA1 hash. */ + OP_SHA1: number; + /** Pop the top stack item and push its SHA256 hash. */ + OP_SHA256: number; + /** Pop the top stack item and push its RIPEMD(SHA256) hash. */ + OP_HASH160: number; + /** Pop the top stack item and push its SHA256(SHA256) hash. */ + OP_HASH256: number; + /** Ignore this and everything preceding when deciding what to sign when signature-checking. */ + OP_CODESEPARATOR: number; + /** pushing 1/0 for success/failure. */ + OP_CHECKSIG: number; + /** returning success/failure. */ + OP_CHECKSIGVERIFY: number; + /** Pop N, N pubkeys, M, M signatures, a dummy (due to bug in reference code), + and verify that all M signatures are valid. Push 1 for 'all valid', 0 otherwise. */ + OP_CHECKMULTISIG: number; + /** Like the above but return success/failure. */ + OP_CHECKMULTISIGVERIFY: number; + /** Does nothing. */ + OP_NOP1: number; + /** */ + OP_CLTV: number; + /** */ + OP_CSV: number; + /** Does nothing. */ + OP_NOP4: number; + /** Does nothing. */ + OP_NOP5: number; + /** Does nothing. */ + OP_NOP6: number; + /** Does nothing. */ + OP_NOP7: number; + /** Does nothing. */ + OP_NOP8: number; + /** Does nothing. */ + OP_NOP9: number; + /** Does nothing. */ + OP_NOP10: number; + /** OP_CHECKSIGADD post tapscript. */ + OP_CHECKSIGADD: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_187: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_188: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_189: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_190: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_191: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_192: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_193: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_194: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_195: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_196: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_197: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_198: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_199: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_200: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_201: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_202: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_203: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_204: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_205: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_206: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_207: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_208: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_209: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_210: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_211: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_212: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_213: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_214: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_215: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_216: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_217: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_218: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_219: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_220: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_221: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_222: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_223: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_224: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_225: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_226: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_227: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_228: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_229: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_230: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_231: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_232: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_233: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_234: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_235: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_236: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_237: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_238: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_239: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_240: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_241: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_242: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_243: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_244: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_245: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_246: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_247: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_248: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_249: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_250: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_251: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_252: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_253: number; + /** Synonym for OP_RETURN. */ + OP_RETURN_254: number; + /** Synonym for OP_RETURN */ + OP_INVALIDOPCODE: number; +}; diff --git a/built/DashPlatform.js/src/opcodes.js b/built/DashPlatform.js/src/opcodes.js new file mode 100644 index 0000000..474cceb --- /dev/null +++ b/built/DashPlatform.js/src/opcodes.js @@ -0,0 +1,517 @@ +export const OP = { + /** Push an empty array onto the stack. */ + OP_PUSHBYTES_0: 0x00, + /** Push the next byte as an array onto the stack. */ + OP_PUSHBYTES_1: 0x01, + /** Push the next 2 bytes as an array onto the stack. */ + OP_PUSHBYTES_2: 0x02, + /** Push the next 3 bytes as an array onto the stack. */ + OP_PUSHBYTES_3: 0x03, + /** Push the next 4 bytes as an array onto the stack. */ + OP_PUSHBYTES_4: 0x04, + /** Push the next 5 bytes as an array onto the stack. */ + OP_PUSHBYTES_5: 0x05, + /** Push the next 6 bytes as an array onto the stack. */ + OP_PUSHBYTES_6: 0x06, + /** Push the next 7 bytes as an array onto the stack. */ + OP_PUSHBYTES_7: 0x07, + /** Push the next 8 bytes as an array onto the stack. */ + OP_PUSHBYTES_8: 0x08, + /** Push the next 9 bytes as an array onto the stack. */ + OP_PUSHBYTES_9: 0x09, + /** Push the next 10 bytes as an array onto the stack. */ + OP_PUSHBYTES_10: 0x0a, + /** Push the next 11 bytes as an array onto the stack. */ + OP_PUSHBYTES_11: 0x0b, + /** Push the next 12 bytes as an array onto the stack. */ + OP_PUSHBYTES_12: 0x0c, + /** Push the next 13 bytes as an array onto the stack. */ + OP_PUSHBYTES_13: 0x0d, + /** Push the next 14 bytes as an array onto the stack. */ + OP_PUSHBYTES_14: 0x0e, + /** Push the next 15 bytes as an array onto the stack. */ + OP_PUSHBYTES_15: 0x0f, + /** Push the next 16 bytes as an array onto the stack. */ + OP_PUSHBYTES_16: 0x10, + /** Push the next 17 bytes as an array onto the stack. */ + OP_PUSHBYTES_17: 0x11, + /** Push the next 18 bytes as an array onto the stack. */ + OP_PUSHBYTES_18: 0x12, + /** Push the next 19 bytes as an array onto the stack. */ + OP_PUSHBYTES_19: 0x13, + /** Push the next 20 bytes as an array onto the stack. */ + OP_PUSHBYTES_20: 0x14, + /** Push the next 21 bytes as an array onto the stack. */ + OP_PUSHBYTES_21: 0x15, + /** Push the next 22 bytes as an array onto the stack. */ + OP_PUSHBYTES_22: 0x16, + /** Push the next 23 bytes as an array onto the stack. */ + OP_PUSHBYTES_23: 0x17, + /** Push the next 24 bytes as an array onto the stack. */ + OP_PUSHBYTES_24: 0x18, + /** Push the next 25 bytes as an array onto the stack. */ + OP_PUSHBYTES_25: 0x19, + /** Push the next 26 bytes as an array onto the stack. */ + OP_PUSHBYTES_26: 0x1a, + /** Push the next 27 bytes as an array onto the stack. */ + OP_PUSHBYTES_27: 0x1b, + /** Push the next 28 bytes as an array onto the stack. */ + OP_PUSHBYTES_28: 0x1c, + /** Push the next 29 bytes as an array onto the stack. */ + OP_PUSHBYTES_29: 0x1d, + /** Push the next 30 bytes as an array onto the stack. */ + OP_PUSHBYTES_30: 0x1e, + /** Push the next 31 bytes as an array onto the stack. */ + OP_PUSHBYTES_31: 0x1f, + /** Push the next 32 bytes as an array onto the stack. */ + OP_PUSHBYTES_32: 0x20, + /** Push the next 33 bytes as an array onto the stack. */ + OP_PUSHBYTES_33: 0x21, + /** Push the next 34 bytes as an array onto the stack. */ + OP_PUSHBYTES_34: 0x22, + /** Push the next 35 bytes as an array onto the stack. */ + OP_PUSHBYTES_35: 0x23, + /** Push the next 36 bytes as an array onto the stack. */ + OP_PUSHBYTES_36: 0x24, + /** Push the next 37 bytes as an array onto the stack. */ + OP_PUSHBYTES_37: 0x25, + /** Push the next 38 bytes as an array onto the stack. */ + OP_PUSHBYTES_38: 0x26, + /** Push the next 39 bytes as an array onto the stack. */ + OP_PUSHBYTES_39: 0x27, + /** Push the next 40 bytes as an array onto the stack. */ + OP_PUSHBYTES_40: 0x28, + /** Push the next 41 bytes as an array onto the stack. */ + OP_PUSHBYTES_41: 0x29, + /** Push the next 42 bytes as an array onto the stack. */ + OP_PUSHBYTES_42: 0x2a, + /** Push the next 43 bytes as an array onto the stack. */ + OP_PUSHBYTES_43: 0x2b, + /** Push the next 44 bytes as an array onto the stack. */ + OP_PUSHBYTES_44: 0x2c, + /** Push the next 45 bytes as an array onto the stack. */ + OP_PUSHBYTES_45: 0x2d, + /** Push the next 46 bytes as an array onto the stack. */ + OP_PUSHBYTES_46: 0x2e, + /** Push the next 47 bytes as an array onto the stack. */ + OP_PUSHBYTES_47: 0x2f, + /** Push the next 48 bytes as an array onto the stack. */ + OP_PUSHBYTES_48: 0x30, + /** Push the next 49 bytes as an array onto the stack. */ + OP_PUSHBYTES_49: 0x31, + /** Push the next 50 bytes as an array onto the stack. */ + OP_PUSHBYTES_50: 0x32, + /** Push the next 51 bytes as an array onto the stack. */ + OP_PUSHBYTES_51: 0x33, + /** Push the next 52 bytes as an array onto the stack. */ + OP_PUSHBYTES_52: 0x34, + /** Push the next 53 bytes as an array onto the stack. */ + OP_PUSHBYTES_53: 0x35, + /** Push the next 54 bytes as an array onto the stack. */ + OP_PUSHBYTES_54: 0x36, + /** Push the next 55 bytes as an array onto the stack. */ + OP_PUSHBYTES_55: 0x37, + /** Push the next 56 bytes as an array onto the stack. */ + OP_PUSHBYTES_56: 0x38, + /** Push the next 57 bytes as an array onto the stack. */ + OP_PUSHBYTES_57: 0x39, + /** Push the next 58 bytes as an array onto the stack. */ + OP_PUSHBYTES_58: 0x3a, + /** Push the next 59 bytes as an array onto the stack. */ + OP_PUSHBYTES_59: 0x3b, + /** Push the next 60 bytes as an array onto the stack. */ + OP_PUSHBYTES_60: 0x3c, + /** Push the next 61 bytes as an array onto the stack. */ + OP_PUSHBYTES_61: 0x3d, + /** Push the next 62 bytes as an array onto the stack. */ + OP_PUSHBYTES_62: 0x3e, + /** Push the next 63 bytes as an array onto the stack. */ + OP_PUSHBYTES_63: 0x3f, + /** Push the next 64 bytes as an array onto the stack. */ + OP_PUSHBYTES_64: 0x40, + /** Push the next 65 bytes as an array onto the stack. */ + OP_PUSHBYTES_65: 0x41, + /** Push the next 66 bytes as an array onto the stack. */ + OP_PUSHBYTES_66: 0x42, + /** Push the next 67 bytes as an array onto the stack. */ + OP_PUSHBYTES_67: 0x43, + /** Push the next 68 bytes as an array onto the stack. */ + OP_PUSHBYTES_68: 0x44, + /** Push the next 69 bytes as an array onto the stack. */ + OP_PUSHBYTES_69: 0x45, + /** Push the next 70 bytes as an array onto the stack. */ + OP_PUSHBYTES_70: 0x46, + /** Push the next 71 bytes as an array onto the stack. */ + OP_PUSHBYTES_71: 0x47, + /** Push the next 72 bytes as an array onto the stack. */ + OP_PUSHBYTES_72: 0x48, + /** Push the next 73 bytes as an array onto the stack. */ + OP_PUSHBYTES_73: 0x49, + /** Push the next 74 bytes as an array onto the stack. */ + OP_PUSHBYTES_74: 0x4a, + /** Push the next 75 bytes as an array onto the stack. */ + OP_PUSHBYTES_75: 0x4b, + /** Read the next byte as N; push the next N bytes as an array onto the stack. */ + OP_PUSHDATA1: 0x4c, + /** Read the next 2 bytes as N; push the next N bytes as an array onto the stack. */ + OP_PUSHDATA2: 0x4d, + /** Read the next 4 bytes as N; push the next N bytes as an array onto the stack. */ + OP_PUSHDATA4: 0x4e, + /** Push the array `0x81` onto the stack. */ + OP_PUSHNUM_NEG1: 0x4f, + /** Synonym for OP_RETURN. */ + OP_RESERVED: 0x50, + /** Push the array `0x01` onto the stack. */ + OP_PUSHNUM_1: 0x51, + /** the array `0x02` onto the stack. */ + OP_PUSHNUM_2: 0x52, + /** Push the array `0x03` onto the stack. */ + OP_PUSHNUM_3: 0x53, + /** Push the array `0x04` onto the stack. */ + OP_PUSHNUM_4: 0x54, + /** Push the array `0x05` onto the stack. */ + OP_PUSHNUM_5: 0x55, + /** Push the array `0x06` onto the stack. */ + OP_PUSHNUM_6: 0x56, + /** Push the array `0x07` onto the stack. */ + OP_PUSHNUM_7: 0x57, + /** Push the array `0x08` onto the stack. */ + OP_PUSHNUM_8: 0x58, + /** Push the array `0x09` onto the stack. */ + OP_PUSHNUM_9: 0x59, + /** Push the array `0x0a` onto the stack. */ + OP_PUSHNUM_10: 0x5a, + /** Push the array `0x0b` onto the stack. */ + OP_PUSHNUM_11: 0x5b, + /** Push the array `0x0c` onto the stack. */ + OP_PUSHNUM_12: 0x5c, + /** Push the array `0x0d` onto the stack. */ + OP_PUSHNUM_13: 0x5d, + /** Push the array `0x0e` onto the stack. */ + OP_PUSHNUM_14: 0x5e, + /** Push the array `0x0f` onto the stack. */ + OP_PUSHNUM_15: 0x5f, + /** Push the array `0x10` onto the stack. */ + OP_PUSHNUM_16: 0x60, + /** Does nothing. */ + OP_NOP: 0x61, + /** Synonym for OP_RETURN. */ + OP_VER: 0x62, + /** Pop and execute the next statements if a nonzero element was popped. */ + OP_IF: 0x63, + /** Pop and execute the next statements if a zero element was popped. */ + OP_NOTIF: 0x64, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_VERIF: 0x65, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_VERNOTIF: 0x66, + /** Execute statements if those after the previous OP_IF were not, and vice-versa. + If there is no previous OP_IF, this acts as a RETURN. */ + OP_ELSE: 0x67, + /** Pop and execute the next statements if a zero element was popped. */ + OP_ENDIF: 0x68, + /** If the top value is zero or the stack is empty, fail; otherwise, pop the stack. */ + OP_VERIFY: 0x69, + /** Fail the script immediately. (Must be executed.). */ + OP_RETURN: 0x6a, + /** Pop one element from the main stack onto the alt stack. */ + OP_TOALTSTACK: 0x6b, + /** Pop one element from the alt stack onto the main stack. */ + OP_FROMALTSTACK: 0x6c, + /** Drops the top two stack items. */ + OP_2DROP: 0x6d, + /** Duplicates the top two stack items as AB -> ABAB. */ + OP_2DUP: 0x6e, + /** Duplicates the two three stack items as ABC -> ABCABC. */ + OP_3DUP: 0x6f, + /** Copies the two stack items of items two spaces back to the front, as xxAB -> ABxxAB. */ + OP_2OVER: 0x70, + /** Moves the two stack items four spaces back to the front, as xxxxAB -> ABxxxx. */ + OP_2ROT: 0x71, + /** Swaps the top two pairs, as ABCD -> CDAB. */ + OP_2SWAP: 0x72, + /** Duplicate the top stack element unless it is zero. */ + OP_IFDUP: 0x73, + /** Push the current number of stack items onto the stack. */ + OP_DEPTH: 0x74, + /** Drops the top stack item. */ + OP_DROP: 0x75, + /** Duplicates the top stack item. */ + OP_DUP: 0x76, + /** Drops the second-to-top stack item. */ + OP_NIP: 0x77, + /** Copies the second-to-top stack item, as xA -> AxA. */ + OP_OVER: 0x78, + /** Pop the top stack element as N. Copy the Nth stack element to the top. */ + OP_PICK: 0x79, + /** Pop the top stack element as N. Move the Nth stack element to the top. */ + OP_ROLL: 0x7a, + /** Rotate the top three stack items, as [top next1 next2] -> [next2 top next1]. */ + OP_ROT: 0x7b, + /** Swap the top two stack items. */ + OP_SWAP: 0x7c, + /** Copy the top stack item to before the second item, as [top next] -> [top next top]. */ + OP_TUCK: 0x7d, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_CAT: 0x7e, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_SUBSTR: 0x7f, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_LEFT: 0x80, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_RIGHT: 0x81, + /** Pushes the length of the top stack item onto the stack. */ + OP_SIZE: 0x82, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_INVERT: 0x83, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_AND: 0x84, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_OR: 0x85, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_XOR: 0x86, + /** Pushes 1 if the inputs are exactly equal, 0 otherwise. */ + OP_EQUAL: 0x87, + /** Returns success if the inputs are exactly equal, failure otherwise. */ + OP_EQUALVERIFY: 0x88, + /** Synonym for OP_RETURN. */ + OP_RESERVED1: 0x89, + /** Synonym for OP_RETURN. */ + OP_RESERVED2: 0x8a, + /** Increment the top stack element in place. */ + OP_1ADD: 0x8b, + /** Decrement the top stack element in place. */ + OP_1SUB: 0x8c, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_2MUL: 0x8d, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_2DIV: 0x8e, + /** Multiply the top stack item by -1 in place. */ + OP_NEGATE: 0x8f, + /** Absolute value the top stack item in place. */ + OP_ABS: 0x90, + /** Map 0 to 1 and everything else to 0, in place. */ + OP_NOT: 0x91, + /** Map 0 to 0 and everything else to 1, in place. */ + OP_0NOTEQUAL: 0x92, + /** Pop two stack items and push their sum. */ + OP_ADD: 0x93, + /** Pop two stack items and push the second minus the top. */ + OP_SUB: 0x94, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_MUL: 0x95, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_DIV: 0x96, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_MOD: 0x97, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_LSHIFT: 0x98, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_RSHIFT: 0x99, + /** Pop the top two stack items and push 1 if both are nonzero, else push 0. */ + OP_BOOLAND: 0x9a, + /** Pop the top two stack items and push 1 if either is nonzero, else push 0. */ + OP_BOOLOR: 0x9b, + /** Pop the top two stack items and push 1 if both are numerically equal, else push 0. */ + OP_NUMEQUAL: 0x9c, + /** Pop the top two stack items and return success if both are numerically equal, else return failure. */ + OP_NUMEQUALVERIFY: 0x9d, + /** Pop the top two stack items and push 0 if both are numerically equal, else push 1. */ + OP_NUMNOTEQUAL: 0x9e, + /** Pop the top two items; push 1 if the second is less than the top, 0 otherwise. */ + OP_LESSTHAN: 0x9f, + /** Pop the top two items; push 1 if the second is greater than the top, 0 otherwise. */ + OP_GREATERTHAN: 0xa0, + /** Pop the top two items; push 1 if the second is <= the top, 0 otherwise. */ + OP_LESSTHANOREQUAL: 0xa1, + /** Pop the top two items; push 1 if the second is >= the top, 0 otherwise. */ + OP_GREATERTHANOREQUAL: 0xa2, + /** Pop the top two items; push the smaller. */ + OP_MIN: 0xa3, + /** Pop the top two items; push the larger. */ + OP_MAX: 0xa4, + /** Pop the top three items; if the top is >= the second and < the third, push 1, otherwise push 0. */ + OP_WITHIN: 0xa5, + /** Pop the top stack item and push its RIPEMD160 hash. */ + OP_RIPEMD160: 0xa6, + /** Pop the top stack item and push its SHA1 hash. */ + OP_SHA1: 0xa7, + /** Pop the top stack item and push its SHA256 hash. */ + OP_SHA256: 0xa8, + /** Pop the top stack item and push its RIPEMD(SHA256) hash. */ + OP_HASH160: 0xa9, + /** Pop the top stack item and push its SHA256(SHA256) hash. */ + OP_HASH256: 0xaa, + /** Ignore this and everything preceding when deciding what to sign when signature-checking. */ + OP_CODESEPARATOR: 0xab, + /** pushing 1/0 for success/failure. */ + OP_CHECKSIG: 0xac, + /** returning success/failure. */ + OP_CHECKSIGVERIFY: 0xad, + /** Pop N, N pubkeys, M, M signatures, a dummy (due to bug in reference code), + and verify that all M signatures are valid. Push 1 for 'all valid', 0 otherwise. */ + OP_CHECKMULTISIG: 0xae, + /** Like the above but return success/failure. */ + OP_CHECKMULTISIGVERIFY: 0xaf, + /** Does nothing. */ + OP_NOP1: 0xb0, + /** */ + OP_CLTV: 0xb1, + /** */ + OP_CSV: 0xb2, + /** Does nothing. */ + OP_NOP4: 0xb3, + /** Does nothing. */ + OP_NOP5: 0xb4, + /** Does nothing. */ + OP_NOP6: 0xb5, + /** Does nothing. */ + OP_NOP7: 0xb6, + /** Does nothing. */ + OP_NOP8: 0xb7, + /** Does nothing. */ + OP_NOP9: 0xb8, + /** Does nothing. */ + OP_NOP10: 0xb9, + // Every other opcode acts as OP_RETURN + /** OP_CHECKSIGADD post tapscript. */ + OP_CHECKSIGADD: 0xba, + /** Synonym for OP_RETURN. */ + OP_RETURN_187: 0xbb, + /** Synonym for OP_RETURN. */ + OP_RETURN_188: 0xbc, + /** Synonym for OP_RETURN. */ + OP_RETURN_189: 0xbd, + /** Synonym for OP_RETURN. */ + OP_RETURN_190: 0xbe, + /** Synonym for OP_RETURN. */ + OP_RETURN_191: 0xbf, + /** Synonym for OP_RETURN. */ + OP_RETURN_192: 0xc0, + /** Synonym for OP_RETURN. */ + OP_RETURN_193: 0xc1, + /** Synonym for OP_RETURN. */ + OP_RETURN_194: 0xc2, + /** Synonym for OP_RETURN. */ + OP_RETURN_195: 0xc3, + /** Synonym for OP_RETURN. */ + OP_RETURN_196: 0xc4, + /** Synonym for OP_RETURN. */ + OP_RETURN_197: 0xc5, + /** Synonym for OP_RETURN. */ + OP_RETURN_198: 0xc6, + /** Synonym for OP_RETURN. */ + OP_RETURN_199: 0xc7, + /** Synonym for OP_RETURN. */ + OP_RETURN_200: 0xc8, + /** Synonym for OP_RETURN. */ + OP_RETURN_201: 0xc9, + /** Synonym for OP_RETURN. */ + OP_RETURN_202: 0xca, + /** Synonym for OP_RETURN. */ + OP_RETURN_203: 0xcb, + /** Synonym for OP_RETURN. */ + OP_RETURN_204: 0xcc, + /** Synonym for OP_RETURN. */ + OP_RETURN_205: 0xcd, + /** Synonym for OP_RETURN. */ + OP_RETURN_206: 0xce, + /** Synonym for OP_RETURN. */ + OP_RETURN_207: 0xcf, + /** Synonym for OP_RETURN. */ + OP_RETURN_208: 0xd0, + /** Synonym for OP_RETURN. */ + OP_RETURN_209: 0xd1, + /** Synonym for OP_RETURN. */ + OP_RETURN_210: 0xd2, + /** Synonym for OP_RETURN. */ + OP_RETURN_211: 0xd3, + /** Synonym for OP_RETURN. */ + OP_RETURN_212: 0xd4, + /** Synonym for OP_RETURN. */ + OP_RETURN_213: 0xd5, + /** Synonym for OP_RETURN. */ + OP_RETURN_214: 0xd6, + /** Synonym for OP_RETURN. */ + OP_RETURN_215: 0xd7, + /** Synonym for OP_RETURN. */ + OP_RETURN_216: 0xd8, + /** Synonym for OP_RETURN. */ + OP_RETURN_217: 0xd9, + /** Synonym for OP_RETURN. */ + OP_RETURN_218: 0xda, + /** Synonym for OP_RETURN. */ + OP_RETURN_219: 0xdb, + /** Synonym for OP_RETURN. */ + OP_RETURN_220: 0xdc, + /** Synonym for OP_RETURN. */ + OP_RETURN_221: 0xdd, + /** Synonym for OP_RETURN. */ + OP_RETURN_222: 0xde, + /** Synonym for OP_RETURN. */ + OP_RETURN_223: 0xdf, + /** Synonym for OP_RETURN. */ + OP_RETURN_224: 0xe0, + /** Synonym for OP_RETURN. */ + OP_RETURN_225: 0xe1, + /** Synonym for OP_RETURN. */ + OP_RETURN_226: 0xe2, + /** Synonym for OP_RETURN. */ + OP_RETURN_227: 0xe3, + /** Synonym for OP_RETURN. */ + OP_RETURN_228: 0xe4, + /** Synonym for OP_RETURN. */ + OP_RETURN_229: 0xe5, + /** Synonym for OP_RETURN. */ + OP_RETURN_230: 0xe6, + /** Synonym for OP_RETURN. */ + OP_RETURN_231: 0xe7, + /** Synonym for OP_RETURN. */ + OP_RETURN_232: 0xe8, + /** Synonym for OP_RETURN. */ + OP_RETURN_233: 0xe9, + /** Synonym for OP_RETURN. */ + OP_RETURN_234: 0xea, + /** Synonym for OP_RETURN. */ + OP_RETURN_235: 0xeb, + /** Synonym for OP_RETURN. */ + OP_RETURN_236: 0xec, + /** Synonym for OP_RETURN. */ + OP_RETURN_237: 0xed, + /** Synonym for OP_RETURN. */ + OP_RETURN_238: 0xee, + /** Synonym for OP_RETURN. */ + OP_RETURN_239: 0xef, + /** Synonym for OP_RETURN. */ + OP_RETURN_240: 0xf0, + /** Synonym for OP_RETURN. */ + OP_RETURN_241: 0xf1, + /** Synonym for OP_RETURN. */ + OP_RETURN_242: 0xf2, + /** Synonym for OP_RETURN. */ + OP_RETURN_243: 0xf3, + /** Synonym for OP_RETURN. */ + OP_RETURN_244: 0xf4, + /** Synonym for OP_RETURN. */ + OP_RETURN_245: 0xf5, + /** Synonym for OP_RETURN. */ + OP_RETURN_246: 0xf6, + /** Synonym for OP_RETURN. */ + OP_RETURN_247: 0xf7, + /** Synonym for OP_RETURN. */ + OP_RETURN_248: 0xf8, + /** Synonym for OP_RETURN. */ + OP_RETURN_249: 0xf9, + /** Synonym for OP_RETURN. */ + OP_RETURN_250: 0xfa, + /** Synonym for OP_RETURN. */ + OP_RETURN_251: 0xfb, + /** Synonym for OP_RETURN. */ + OP_RETURN_252: 0xfc, + /** Synonym for OP_RETURN. */ + OP_RETURN_253: 0xfd, + /** Synonym for OP_RETURN. */ + OP_RETURN_254: 0xfe, + /** Synonym for OP_RETURN */ + OP_INVALIDOPCODE: 0xff, +}; diff --git a/built/DashPlatform.js/src/rpc.d.ts b/built/DashPlatform.js/src/rpc.d.ts new file mode 100644 index 0000000..e0fb48d --- /dev/null +++ b/built/DashPlatform.js/src/rpc.d.ts @@ -0,0 +1,10 @@ +import { PlatformClient } from "./generated/platform/v0/platform.client.ts"; +import { CoreClient } from "./generated/core/v0/core.client.ts"; +import { RpcTransport } from "@protobuf-ts/runtime-rpc"; +export declare class NodeConnection { + readonly transport: RpcTransport; + readonly core: CoreClient; + readonly platform: PlatformClient; + constructor(transport: RpcTransport, core: CoreClient, platform: PlatformClient); +} +export declare function connectToNode(address: string): NodeConnection; diff --git a/built/DashPlatform.js/src/rpc.js b/built/DashPlatform.js/src/rpc.js new file mode 100644 index 0000000..98324f5 --- /dev/null +++ b/built/DashPlatform.js/src/rpc.js @@ -0,0 +1,22 @@ +import { GrpcWebFetchTransport } from "@protobuf-ts/grpcweb-transport"; +import { PlatformClient } from "./generated/platform/v0/platform.client.js"; +import { CoreClient } from "./generated/core/v0/core.client.js"; +export class NodeConnection { + transport; + core; + platform; + constructor(transport, core, platform) { + this.transport = transport; + this.core = core; + this.platform = platform; + } +} +export function connectToNode(address) { + const transport = new GrpcWebFetchTransport({ + baseUrl: address, + // format: 'binary', + }); + const core = new CoreClient(transport); + const platform = new PlatformClient(transport); + return new NodeConnection(transport, core, platform); +} diff --git a/built/DashPlatform.js/src/scripts.d.ts b/built/DashPlatform.js/src/scripts.d.ts new file mode 100644 index 0000000..46263d5 --- /dev/null +++ b/built/DashPlatform.js/src/scripts.d.ts @@ -0,0 +1,5 @@ +export declare function makeScript(...parts: (number | number[] | Uint8Array)[]): Uint8Array; +export declare function makeP2PK(pubkey: Uint8Array): Uint8Array; +export declare function makeP2SH(script_hash: Uint8Array): Uint8Array; +export declare function makeP2PKH(pubkey_hash: Uint8Array): Uint8Array; +export declare function makeOP_RETURN(data: Uint8Array): Uint8Array; diff --git a/built/DashPlatform.js/src/scripts.js b/built/DashPlatform.js/src/scripts.js new file mode 100644 index 0000000..8223a25 --- /dev/null +++ b/built/DashPlatform.js/src/scripts.js @@ -0,0 +1,38 @@ +import { OP } from './opcodes.js'; +export function makeScript(...parts) { + let array = []; + for (const part of parts) { + if (typeof part === "number") + array.push(part); // opcode + else { // slice + let len = part.length; + if (len < OP.OP_PUSHDATA1) { + array.push(len); + } + else if (len < 0x100) { + array.push(OP.OP_PUSHDATA1, len); + } + else if (len < 0x10000) { + array.push(OP.OP_PUSHDATA2, len & 0xff, len >> 8); + } + else if (len < 0x100000000) { + array.push(OP.OP_PUSHDATA4, len & 0xff, (len >> 8) & 0xff, (len >> 16) & 0xff, (len >> 24) & 0xff); + } + array.push(...part); + } + } + return new Uint8Array(array); +} +// console.log('scriptTest', toHex(makeScript(fromHex('00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff')))) +export function makeP2PK(pubkey) { + return makeScript(pubkey, OP.OP_CHECKSIG); +} +export function makeP2SH(script_hash) { + return makeScript(OP.OP_HASH160, script_hash, OP.OP_EQUAL); +} +export function makeP2PKH(pubkey_hash) { + return makeScript(OP.OP_DUP, OP.OP_HASH160, pubkey_hash, OP.OP_EQUALVERIFY, OP.OP_CHECKSIG); +} +export function makeOP_RETURN(data) { + return makeScript(OP.OP_RETURN, data); +} diff --git a/built/DashPlatform.js/src/sign.d.ts b/built/DashPlatform.js/src/sign.d.ts new file mode 100644 index 0000000..5e4451c --- /dev/null +++ b/built/DashPlatform.js/src/sign.d.ts @@ -0,0 +1,9 @@ +import { IdentityPublicKey, StateTransition } from "../2.0.0/generated_bincode.js"; +/** + * Signs a StateTransition in-place. + * TODO: owner_id? + * @param st StateTransition to sign + * @param identity Public key to sign with + * @param private_key Cooresponding Private key + */ +export declare function signTransitionWithRawKey(st: StateTransition, pubkey: IdentityPublicKey, private_key: Uint8Array): Promise; diff --git a/built/DashPlatform.js/src/sign.js b/built/DashPlatform.js/src/sign.js new file mode 100644 index 0000000..74cb707 --- /dev/null +++ b/built/DashPlatform.js/src/sign.js @@ -0,0 +1,55 @@ +import { doubleSha256 } from "../../DashTx.js/dashtx.js"; +import * as Bincode from "./bincode.js"; +import { BinaryData, Identifier, IdentifierBytes32, StateTransition } from "../2.0.0/generated_bincode.js"; +import * as secp from "@noble/secp256k1"; +/** + * Signs a StateTransition in-place. + * TODO: owner_id? + * @param st StateTransition to sign + * @param identity Public key to sign with + * @param private_key Cooresponding Private key + */ +export async function signTransitionWithRawKey(st, pubkey, private_key) { + await Bincode.match(st, { + DataContractCreate: ({ 0: dcct }) => Bincode.match(dcct, { + V0: async ({ 0: dcct0 }) => { + await Bincode.match(dcct0.data_contract, { + V0: async ({ 0: dc }) => { + // dc.owner_id = owner_id + dc.id = await makeContractId(dc.owner_id, dcct0.identity_nonce); + }, + V1: async ({ 0: dc }) => { + // dc.owner_id = owner_id + dc.id = await makeContractId(dc.owner_id, dcct0.identity_nonce); + }, + }); + const new_signable_bytes = Bincode.encode(StateTransition, st, { signable: true }); + const hash = await doubleSha256(new Uint8Array(new_signable_bytes)); + // TODO: switch to magicSign + const signature = (await secp.signAsync(hash, private_key, { extraEntropy: false })); + const signature_bytes = new Uint8Array(1 + 64); + signature_bytes[0] = signature.recovery + 27 + 4; // These magic numbers come from rust-dashcore/dash/src/signer.rs RecoverableSignature::to_compact_signature + signature_bytes.set(signature.toCompactRawBytes(), 1); + dcct0.signature_public_key_id = Bincode.match(pubkey, { + V0: ({ 0: pk }) => pk.id, + }); + dcct0.signature = BinaryData(signature_bytes); + } + }), + DataContractUpdate: x => { throw new Error("Not implemented"); }, + Batch: x => { throw new Error("Function not implemented."); }, + IdentityCreate: x => { throw new Error("Not implemented"); }, + IdentityTopUp: x => { throw new Error("Not implemented"); }, + IdentityCreditWithdrawal: x => { throw new Error("Not implemented"); }, + IdentityUpdate: x => { throw new Error("Not implemented"); }, + IdentityCreditTransfer: x => { throw new Error("Not implemented"); }, + MasternodeVote: x => { throw new Error("Not implemented"); }, + }); +} +async function makeContractId(owner_id, identity_nonce) { + const contract_id_bytes = new Uint8Array(32 + 8); + contract_id_bytes.set(owner_id[0][0], 0); + new DataView(contract_id_bytes.buffer).setBigUint64(32, BigInt(identity_nonce), false); + const contract_id = await doubleSha256(contract_id_bytes); + return Identifier(IdentifierBytes32(contract_id)); +} diff --git a/built/DashPlatform.js/vite.config.js b/built/DashPlatform.js/vite.config.js new file mode 100644 index 0000000..0060990 --- /dev/null +++ b/built/DashPlatform.js/vite.config.js @@ -0,0 +1,26 @@ +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { defineConfig } from 'vite'; +const __dirname = dirname(fileURLToPath(import.meta.url)); +export default defineConfig({ + build: { + lib: { + entry: resolve(__dirname, 'src/dashplatform.js'), + name: 'DashPlatform', + // the proper extensions will be added + fileName: 'DashPlatform', + }, + rollupOptions: { + // make sure to externalize deps that shouldn't be bundled + // into your library + // external: ['vue'], + // output: { + // // Provide global variables to use in the UMD build + // // for externalized deps + // globals: { + // vue: 'Vue', + // }, + // }, + }, + }, +}); diff --git a/built/DashTx.js/dashtx.d.ts b/built/DashTx.js/dashtx.d.ts new file mode 100644 index 0000000..4fef7ac --- /dev/null +++ b/built/DashTx.js/dashtx.d.ts @@ -0,0 +1,650 @@ +export function appraise(txInfo: TxInfo): TxFees; +export function toDash(satoshis: Uint53): Float64; +export function toSats(dash: Float64): Uint53; +/** @param {TxKeyUtils} keyUtils */ +export function create(keyUtils: TxKeyUtils): { + hashAndSignAll(txInfo: TxInfo, sigHashType?: Uint32): Promise; + hashAndSignInput(privBytes: Uint8Array, txInfo: TxInfo, i: Uint32, sigHashType?: Uint32): Promise; + legacy: { + draftSingleOutput({ utxos, inputs, output }: { + inputs?: CoreUtxo[] | null | undefined; + utxos?: CoreUtxo[] | null | undefined; + output: TxOutput; + }): TxDraft; + finalizePresorted(txDraft: TxDraft): Promise; + _signToTarget(txDraft: TxDraft): Promise; + _signFeeWalk(txDraft: TxDraft): Promise; + _summarizeTx(txInfo: TxInfoSigned): TxSummary; + }; +}; +/** + * @param {TxInfo} txInfo + * @param {Uint32} i - index of input to be signed + * @param {Uint8} sigHashType + */ +export function selectSigHashInputs(txInfo: TxInfo, i: Uint32, sigHashType?: Uint8): TxInputForSig[]; +/** + * @param {TxInfo} txInfo + * @param {Uint32} i - index of input to be signed + * @param {Uint8} sigHashType + */ +export function selectSigHashOutputs(txInfo: TxInfo, i: Uint32, sigHashType?: Uint8): TxOutput[]; +/** + * Creates a transaction that is guaranteed to be signable. Selects + * the smallest coin that is bigger or equal to the amount sent + fees, + * or the largest available coins until that total is met. + */ +export function createLegacyTx(coins: any, outputs: any, changeOutput: any, extraPayload: any): { + version: number; + type: number; + inputs: TxInputUnspent[]; + outputs: any; + changeIndex: any; + locktime: number; + extraPayload: any; +}; +export function sortBySatsAsc(a: TxHasSats, b: TxHasSats): Uint8; +export function sortBySatsDsc(a: TxHasSats, b: TxHasSats): Uint8; +export function sortInputs(a: TxInputSortable, b: TxInputSortable): Uint8; +/** + * Lexicographical Indexing of Transaction Inputs and Outputs + * See + * + * Note: this must be updated to support new types of script comparison. + * + * @param {TxOutputSortable} a + * @param {TxOutputSortable} b + * @returns {Uint32} + */ +export function sortOutputs(a: TxOutputSortable, b: TxOutputSortable): Uint32; +/** + * @param {Object} txInfo + * @param {Uint16} [txInfo.version] + * @param {Uint16} [txInfo.type] + * @param {Array} txInfo.inputs + * @param {Array} txInfo.outputs + * @param {Uint32} [txInfo.locktime] + * @param {Hex} [txInfo.extraPayload] + * @param {Boolean} [txInfo._debug] - bespoke debug output + */ +export function createRaw(txInfo: { + version?: number | undefined; + type?: number | undefined; + inputs: Array; + outputs: Array; + locktime?: number | undefined; + extraPayload?: string | undefined; + _debug?: boolean | undefined; +}): { + version?: number | undefined; + type?: number | undefined; + inputs: Array; + outputs: Array; + locktime?: number | undefined; + extraPayload?: string | undefined; + _debug?: boolean | undefined; +}; +/** + * @param {TxInputRaw} input + * @param {Uint32} i + */ +export function createInputRaw(input: TxInputRaw, i: Uint32): { + txid: string; + txId: string; + outputIndex: number; +}; +/** + * @param {TxInfo} txInfo + * @param {Uint32} inputIndex - create hashable tx for this input + * @param {Uint32} sigHashType - 0x01 for ALL, or 0x81 for ALL + ANYONECANPAY + */ +export function createForSig(txInfo: TxInfo, inputIndex: Uint32, sigHashType: Uint32): { + indexForSig: number; +} & TxInfo; +/** + * @param {TxInputForSig} input + * @param {Uint32} i - create hashable tx for this input + */ +export function createInputForSig(input: TxInputForSig, i: Uint32): { + txId: string; + txid: string; + outputIndex: number; + pubKeyHash: string | undefined; + sigHashType: number | undefined; + script: string; +}; +/** + * @param {Hex} pubKeyHash + * @returns {Hex} + */ +export function createPkhScript(pubKeyHash: Hex): Hex; +/** + * @param {Object} txInfo + * @param {Uint16} [txInfo.version] + * @param {Uint16} [txInfo.type] + * @param {Array} txInfo.inputs + * @param {Array} txInfo.outputs + * @param {Uint32} [txInfo.locktime] + * @param {Hex?} [txInfo.extraPayload] - extra payload + * @param {Boolean} [txInfo._debug] - bespoke debug output + * @param {Uint32?} [sigHashType] + */ +export function serialize({ version, type, inputs, outputs, locktime, extraPayload, _debug, }: { + version?: number | undefined; + type?: number | undefined; + inputs: Array; + outputs: Array; + locktime?: number | undefined; + extraPayload?: string | null | undefined; + _debug?: boolean | undefined; +}, sigHashType?: Uint32 | null): string; +/** + * @param {Array} inputs + * @param {Object} [_opts] + * @param {Array} [_opts._tx] + * @param {String} [_opts._sep] + */ +export function serializeInputs(inputs: Array, _opts?: { + _tx?: string[] | undefined; + _sep?: string | undefined; +}): string[]; +/** + * @param {TxInput|TxInputRaw|TxInputForSig|TxInputSigned} input + * @param {Uint32} i + * @param {Object} [_opts] + * @param {Array} [_opts._tx] + * @param {String} [_opts._sep] + */ +export function serializeInput(input: TxInput | TxInputRaw | TxInputForSig | TxInputSigned, i: Uint32, _opts?: { + _tx?: string[] | undefined; + _sep?: string | undefined; +}): string[]; +export function serializeOutputs(txOutputs: Array, _opts?: { + _tx?: string[] | undefined; + _sep?: string | undefined; +} | undefined): any; +/** + * @param {TxOutput} output + * @param {Uint32} i + * @param {Object} [_opts] + * @param {Array} [_opts._tx] + * @param {String} [_opts._sep] + */ +export function serializeOutput(output: TxOutput, i: Uint32, _opts?: { + _tx?: string[] | undefined; + _sep?: string | undefined; +}): string[]; +/** + * @param {Object} [opts] + * @param {String?} [opts.message] - UTF-8 Memo String + */ +export function createDonationOutput(opts?: { + message?: string | null | undefined; +}): { + satoshis: number; + message: string; +}; +export function sum(coins: Array): Uint53; +/** + * @param {String} txHex + */ +export function parseUnknown(txHex: string): TxInfo; +export const _OP_DUP_HEX: "76"; +export const _OP_HASH160_HEX: "a9"; +export const _OP_EQUALVERIFY_HEX: "88"; +export const _OP_CHECKSIG_HEX: "ac"; +export const _OP_RETURN_HEX: "6a"; +export const _PKH_SIZE_HEX: string; +export const _PKH_SCRIPT_SIZE_HEX: string; +export const LEGACY_DUST: 2000; +export const HEADER_SIZE: number; +export const MIN_INPUT_SIZE: number; +export const MAX_INPUT_PAD: number; +export const MAX_INPUT_SIZE: number; +export const OUTPUT_SIZE: number; +export const SIGHASH_ALL: 1; +export const SIGHASH_NONE: 2; +export const SIGHASH_SINGLE: 3; +export const SIGHASH_ANYONECANPAY: 128; +export const SIGHASH_DEFAULT: number; +/** + * Creates a transaction that is guaranteed to be signable. Selects + * the smallest coin that is bigger or equal to the amount sent + fees, + * or the largest available coins until that total is met. + */ +export function legacyCreateTx(coins: any, outputs: any, changeOutput: any, extraPayload: any): { + version: number; + type: number; + inputs: TxInputUnspent[]; + outputs: any; + changeIndex: any; + locktime: number; + extraPayload: any; +}; +/** + * @param {Object} txInfo + * @param {Uint16} [txInfo.version] + * @param {Uint16} [txInfo.type] + * @param {Array} txInfo.inputs + * @param {Array} txInfo.outputs + * @param {Uint32} [txInfo.locktime] + * @param {Hex?} [txInfo.extraPayload] - extra payload + * @param {Boolean} [txInfo._debug] - bespoke debug output + * @param {Uint32?} [sigHashType] + */ +export function serializeForSig({ version, type, inputs, outputs, locktime, extraPayload, _debug, }: { + version?: number | undefined; + type?: number | undefined; + inputs: Array; + outputs: Array; + locktime?: number | undefined; + extraPayload?: string | null | undefined; + _debug?: boolean | undefined; +}, sigHashType?: Uint32 | null): string; +/** @type {TxGetId} */ +export const getId: TxGetId; +export function doubleSha256(bytes: Uint8Array): Promise; +export { TxUtils as utils }; +export type TxCreate = (keyUtils: TxKeyUtils) => tx; +export type tx = { + hashAndSignAll: TxHashAndSignAll; + hashAndSignInput: TxHashAndSignInput; +}; +export type Float64 = number; +export type Uint8 = number; +export type Uint16 = number; +export type Uint32 = number; +export type Uint53 = number; +export type Hex = string; +export type TxPrivateKey = Uint8Array; +export type TxPublicKey = Uint8Array; +export type TxSignature = Uint8Array; +export type CoreUtxo = { + /** + * - deprecated + */ + txId?: string | undefined; + txid: string; + outputIndex: number; + address: string; + script: string; + satoshis: number; +}; +export type TxKeyUtils = { + getPrivateKey: TxGetPrivateKey; + /** + * - efficiently get public key bytes + */ + getPublicKey?: TxGetPublicKey | undefined; + /** + * - convert private bytes to pub bytes + */ + toPublicKey: TxToPublicKey; + sign: TxSign; +}; +export type TxDeps = Required; +export type TxFees = { + max: Uint53; + mid: Uint53; + min: Uint53; +}; +export type TxInfo = { + version?: number | undefined; + type?: number | undefined; + inputs: Array; + outputs: Array; + /** + * - 0 by default + */ + locktime?: number | undefined; + /** + * - extra payload bytes + */ + extraPayload?: string | undefined; + /** + * - signed transaction hex + */ + transaction?: string | undefined; + /** + * - bespoke debug output + */ + _debug?: boolean | undefined; +}; +export type TxDraft = TxInfo & TxDraftPartial; +export type TxDraftPartial = { + change: TxOutput | null; + feeTarget: Uint53; + fullTransfer: boolean; +}; +export type TxInfoSigned = { + version: Uint16; + type: Uint16; + inputs: Array; + outputs: Array; + /** + * - 0 by default + */ + locktime: Uint32; + /** + * - extra payload bytes + */ + extraPayload: Hex; + /** + * - signed transaction hex + */ + transaction: string; + /** + * - bespoke debug output + */ + _debug?: boolean | undefined; +}; +export type TxSummary = TxInfoSigned & TxSummaryPartial; +export type TxSummaryPartial = { + /** + * - sum of all inputs + */ + total: Uint53; + /** + * - sum of all outputs + */ + sent: Uint53; + /** + * - actual fee + */ + fee: Uint53; + outputs: Array; + inputs: Array; + /** + * - alias of 'recipient' for backwards-compat + */ + output: TxOutput; + /** + * - output to recipient + */ + recipient: TxOutput; + /** + * - sent back to self + */ + change: TxOutput; +}; +export type TxInput = { + /** + * - BaseCheck58-encoded pubKeyHash + */ + address?: string | undefined; + /** + * - deprecated + */ + txId?: string | undefined; + /** + * - hex (not pre-reversed) + */ + txid: string; + /** + * - index in previous tx's output (vout index) + */ + outputIndex: Uint32; + /** + * - hex-encoded ASN.1 (DER) signature (starts with 0x30440220 or 0x30440221) + */ + signature: string; + /** + * - the previous lock script (default: derived from public key as p2pkh) + */ + script?: string | undefined; + /** + * - hex-encoded public key (typically starts with a 0x02 or 0x03 prefix) + */ + publicKey: string; + /** + * - the 20-byte pubKeyHash (address without magic byte or checksum) + */ + pubKeyHash?: string | undefined; + /** + * - the 4-byte sequence (typically ffffffff) + */ + sequence?: string | undefined; + /** + * - typically 0x81 (SIGHASH_ALL|SIGHASH_ANYONECANPAY) + */ + sigHashType: Uint32; +}; +export type TxInputForSig = { + /** + * - BaseCheck58-encoded pubKeyHash + */ + address?: string | undefined; + /** + * - (deprecated) see .txid + */ + txId?: string | undefined; + /** + * - hex (not pre-reversed) + */ + txid: string; + /** + * - index in previous tx's output (vout index) + */ + outputIndex: Uint32; + /** + * - (included for convenience as type hack) + */ + satoshis?: number | undefined; + /** + * - (included as type hack) + */ + signature?: string | undefined; + /** + * - the previous lock script (default: derived from public key as p2pkh) + */ + script?: string | undefined; + /** + * - hex-encoded public key (typically starts with a 0x02 or 0x03 prefix) + */ + publicKey?: string | undefined; + /** + * - the 20-byte pubKeyHash (address without magic byte or checksum) + */ + pubKeyHash?: string | undefined; + /** + * - the 4-byte sequence (typically ffffffff) + */ + sequence?: string | undefined; + /** + * - typically 0x81 (SIGHASH_ALL|SIGHASH_ANYONECANPAY) + */ + sigHashType?: number | undefined; +}; +export type TxInputRaw = { + /** + * - BaseCheck58-encoded pubKeyHash + */ + address?: string | undefined; + /** + * - for convenience + */ + satoshis?: number | undefined; + /** + * - deprecated + */ + txId?: string | undefined; + /** + * - hex (not pre-reversed) + */ + txid: string; + /** + * - index in previous tx's output (vout index) + */ + outputIndex: Uint32; + /** + * - the 4-byte sequence (typically ffffffff) + */ + sequence?: string | undefined; +}; +export type TxInputUnspent = { + /** + * - BaseCheck58-encoded pubKeyHash + */ + address?: string | undefined; + satoshis: Uint53; + /** + * - deprecated + */ + txId?: string | undefined; + /** + * - hex (not pre-reversed) + */ + txid: string; + /** + * - index in previous tx's output (vout index) + */ + outputIndex: Uint32; +}; +export type TxInputSortable = { + /** + * - deprecated + */ + txId?: string | undefined; + txid: string; + outputIndex: Uint32; +}; +export type TxHasSats = { + satoshis: Uint53; +}; +export type TxInputSigned = Pick; +export type TxOutput = { + /** + * - hex bytes of a memo (incompatible with pubKeyHash / address) + */ + memo?: string | null | undefined; + /** + * - memo, but as a UTF-8 string + */ + message?: string | null | undefined; + /** + * - payAddr as Base58Check (human-friendly) + */ + address?: string | undefined; + /** + * - payAddr's raw hex value (decoded, not Base58Check) + */ + pubKeyHash?: string | undefined; + /** + * - the number of smallest units of the currency + */ + satoshis: Uint53; +}; +export type TxOutputSortable = { + satoshis: Uint53; + /** + * - hex bytes in wire order + */ + script?: string | undefined; + /** + * - 0x6a, hex bytes + */ + memo?: string | null | undefined; + /** + * - 0x76, 0xa9, hex bytes + */ + pubKeyHash?: string | undefined; + /** + * - 0x76, 0xa9, base58check bytes + */ + address?: string | undefined; +}; +export type TxAddrToPubKeyHash = (addr: string) => string; +/** + * Calculate the min, mid, and max sizes, which are 25%, 75%, and 100% likely + * to match the signed byte size (which varies randomly on each signing due to + * padding bytes). If in doubt, start with the mid as the fee and if the signed + * tx is larger, increment by one and repeat until the fee is greater than the + * size. + */ +export type TxAppraise = (txInfo: TxInfo) => TxFees; +export type TxAppraiseCounts = (numInputs: Uint32, numOutputs: Uint32, extraSize?: number | undefined) => TxFees; +export type TxAppraiseMemos = (outputs: Array) => Uint32; +export type TxCreatePkhScript = (pubKeyHash: Hex) => Hex; +export type TxGetId = (txHex: string) => Promise; +export type TxGetPrivateKey = (txInput: TxInputForSig, i?: number | undefined, txInputs?: (TxInputForSig | TxInputRaw)[] | undefined) => Promise; +export type TxGetPublicKey = (txInput: TxInputForSig, i?: number | undefined, txInputs?: (TxInputForSig | TxInputRaw)[] | undefined) => Promise; +export type TxHashAndSignAll = (txInfo: TxInfo, sigHashType?: number | undefined) => Promise; +export type TxHashAndSignInput = (privBytes: Uint8Array, txInfo: TxInfo, i: Uint32, sigHashType?: number | undefined) => Promise; +export type TxDoubleSha256 = (txBytes: Uint8Array) => Promise; +export type TxHexToBytes = (hex: string) => Uint8Array; +export type TxCreateLegacyTx = (coins: Array, outputs: Array, changeOutput: TxOutput) => Promise; +export type TxParseRequest = (hex: Hex) => TxInfo; +export type TxParseSigHash = (hex: Hex) => TxInfo; +export type TxParseSigned = (hex: Hex) => TxInfo; +export type TxParseUnknown = (hex: Hex) => TxInfo; +export type TxReverseHex = (hex: string) => string; +export type TxSerializeOutputs = (txOutputs: Array, _opts?: { + _tx?: string[] | undefined; + _sep?: string | undefined; +} | undefined) => any; +export type TxSign = (privateKey: TxPrivateKey, txHashBytes: Uint8Array) => Promise; +export type TxSortBySats = (a: TxHasSats, b: TxHasSats) => Uint8; +export type TxSortInputs = (a: TxInputSortable, b: TxInputSortable) => Uint8; +export type TxSortOutputs = (a: TxOutputSortable, b: TxOutputSortable) => Uint8; +export type TxSum = (coins: Array) => Uint53; +export type TxToDash = (satoshis: Uint53) => Float64; +export type TxToSats = (dash: Float64) => Uint53; +export type TxToPublicKey = (privateKey: TxPrivateKey) => Promise; +/** + * Caution: JS can't handle 64-bit ints + */ +export type TxToVarInt = (n: bigint | Uint53) => string; +export type TxToVarIntSize = (n: bigint | Uint53) => Uint8; +export type TxBytesToHex = (buf: Uint8Array) => string; +export type TxStringToHex = (utf8: string) => string; +export type TxToUint32LE = (n: Uint32) => Hex; +export type TxToUint64LE = (n: Uint32) => Hex; +declare namespace TxUtils { + /** + * @param {String} hex + * @param {Number} offset + */ + function _parseVarIntHex(hex: string, offset: number): number[]; + /** + * @param {string} basicAuthUrl - ex: https://api:token@trpc.digitalcash.dev/ + * http://user:pass@localhost:19998/ + * @param {string} method - the rpc, such as 'getblockchaininfo', + * 'getaddressdeltas', or 'help' + * @param {...any} params - the arguments for the specific rpc + * ex: rpc(url, 'help', 'getaddressdeltas') + */ + function rpc(basicAuthUrl: string, method: string, ...params: any[]): Promise; + /** + * @param {String} hex + */ + function hexToBytes(hex: string): Uint8Array; + /** + * @param {String} hex + */ + function reverseHex(hex: string): string; + function toVarInt(n: bigint | Uint53): string; + /** + * Just assumes that all target CPUs are Little-Endian, + * which is true in practice, and much simpler. + * @param {BigInt|Number} n - 16-bit positive int to encode + */ + function _toUint16LE(n: bigint | number): string; + /** + * Just assumes that all target CPUs are Little-Endian, + * which is true in practice, and much simpler. + * @param {BigInt|Number} n - 32-bit positive int to encode + */ + function toUint32LE(n: bigint | number): string; + function _toUint32LE(n: any): string; + /** + * This can handle Big-Endian CPUs, which don't exist, + * and looks too complicated. + * @param {BigInt|Number} n - 64-bit BigInt or <= 53-bit Number to encode + * @returns {String} - 8 Little-Endian bytes + */ + function toUint64LE(n: bigint | number): string; + function _toUint64LE(n: any): string; + function toVarIntSize(n: bigint | Uint53): Uint8; + function bytesToHex(buf: Uint8Array): string; + function strToHex(utf8: string): string; +} diff --git a/built/DashTx.js/dashtx.js b/built/DashTx.js/dashtx.js new file mode 100644 index 0000000..000723b --- /dev/null +++ b/built/DashTx.js/dashtx.js @@ -0,0 +1,2034 @@ +/** + * @callback TxCreate + * @param {TxKeyUtils} keyUtils + * @returns {tx} + */ +/** + * @typedef tx + * @prop {TxHashAndSignAll} hashAndSignAll + * @prop {TxHashAndSignInput} hashAndSignInput + */ +// Based on discoveries from +// https://github.com/jojobyte/browser-import-rabbit-hole +let Crypto = globalThis.crypto; +let TxUtils = {}; +const CURRENT_VERSION = 3; +const TYPE_VERSION = 0; +const SATOSHIS = 100000000; +const MAX_U8 = Math.pow(2, 8) - 1; +const MAX_U16 = Math.pow(2, 16) - 1; +const MAX_U32 = Math.pow(2, 32) - 1; +const MAX_U53 = Number.MAX_SAFE_INTEGER; // Math.pow(2, 53) - 1 +const MAX_U64 = 2n ** 64n - 1n; +const CH_0 = 48; +const CH_9 = 57; +const CH_A = 97; +const CH_F = 102; +const OP_RETURN = "6a"; // 106 +// Satoshis (64-bit) + lockscript size + OP_RETURN + Message Len +const OP_RETURN_HEADER_SIZE = 8 + 1 + 1 + 1; +const OP_PUSHDATA1 = "4c"; +const OP_PUSHDATA1_INT = 0x4c; // 76 +const OP_PUSHDATA2 = "4d"; +const OP_DUP = "76"; +const OP_HASH160 = "a9"; +const OP_EQUALVERIFY = "88"; +const OP_CHECKSIG = "ac"; +const PKH_SIZE = (20).toString(16); // 0x14 +const PKH_SCRIPT_SIZE = (25).toString(16); // 0x19 +//@ts-ignore - for debug only +export const _OP_DUP_HEX = OP_DUP; +//@ts-ignore - for debug only +export const _OP_HASH160_HEX = OP_HASH160; +//@ts-ignore - for debug only +export const _OP_EQUALVERIFY_HEX = OP_EQUALVERIFY; +//@ts-ignore - for debug only +export const _OP_CHECKSIG_HEX = OP_CHECKSIG; +//@ts-ignore - for debug only +export const _OP_RETURN_HEX = OP_RETURN; +//@ts-ignore - for debug only +export const _PKH_SIZE_HEX = PKH_SIZE; +//@ts-ignore - for debug only +export const _PKH_SCRIPT_SIZE_HEX = PKH_SCRIPT_SIZE; +const E_KEYBYTES_UNDEFINED = `developer error: keyUtils.getPrivateKey() must return 'keyBytes' to sign, or 'null' to skip`; +const E_LITTLE_INT = "JavaScript 'Number's only go up to uint53, you must use 'BigInt' (ex: `let amount = 18014398509481984n`) for larger values"; +const E_TOO_BIG_INT = "JavaScript 'BigInt's are arbitrarily large, but you may only use up to UINT64 for transactions"; +const E_NO_OUTPUTS = `'outputs' list must not be empty; use .createDonationOutput({ message }) to burn inputs`; +export const LEGACY_DUST = 2000; +const _HEADER_ONLY_SIZE = 2 + // version + 2 + // type + 4; // locktime +export const HEADER_SIZE = 2 + // version + 2 + // type + 1 + // input count + 1 + // output count + 4; // locktime +export const MIN_INPUT_SIZE = // 147~149 each + 4 + // outputIndex + 32 + // txId + 1 + // sigscriptsize + 106 + // sigscript + 4; // sequence +export const MAX_INPUT_PAD = // possible ASN.1 BigInt padding + 1 + // Signature R value + 1 + // Signature S value + 0; // Public Key value is NOT BigInt padded +export const MAX_INPUT_SIZE = MIN_INPUT_SIZE + MAX_INPUT_PAD; +export const OUTPUT_SIZE = // 34 each + 8 + // satoshis (base units) value + 1 + // lockscript size + 25; // lockscript +export const SIGHASH_ALL = 0x01; +export const SIGHASH_NONE = 0x02; +export const SIGHASH_SINGLE = 0x03; // Not Supported +export const SIGHASH_ANYONECANPAY = 0x80; +export const SIGHASH_DEFAULT = SIGHASH_ALL | SIGHASH_ANYONECANPAY; +/** @type {TxAppraise} */ +export function appraise(txInfo) { + let extraSize = _appraiseMemos(txInfo.outputs); + let fees = _appraiseCounts(txInfo.inputs.length, txInfo.outputs.length, extraSize); + return fees; +} +; +/** @type {TxAppraiseCounts} */ +function _appraiseCounts(numInputs, numOutputs, extraSize) { + let min = Tx._HEADER_ONLY_SIZE; + min += TxUtils.toVarIntSize(numInputs); + min += MIN_INPUT_SIZE * numInputs; + min += TxUtils.toVarIntSize(numOutputs); + if (extraSize) { + min += extraSize; // memos, etc + } + let maxPadding = MAX_INPUT_PAD * numInputs; + let max = min + maxPadding; + let spread = max - min; + let halfSpread = Math.ceil(spread / 2); + let mid = min + halfSpread; + let fees = { min, mid, max }; + return fees; +} +; +/** @type {TxAppraiseMemos} */ +function _appraiseMemos(outputs) { + let size = 0; + for (let output of outputs) { + if ("string" === typeof output.message) { + if (!output.memo) { + output.memo = TxUtils.strToHex(output.message); + } + } + if ("string" === typeof output.memo) { + let memoSize = output.memo.length / 2; + if (memoSize > MAX_U8) { + size += 2; + } + else if (memoSize >= OP_PUSHDATA1_INT) { + size += 1; + } + size += OP_RETURN_HEADER_SIZE + memoSize; + continue; + } + size += OUTPUT_SIZE; + } + return size; +} +; +/** @type {TxToDash} */ +export function toDash(satoshis) { + let dashNum = satoshis / SATOSHIS; + let dashStr = dashNum.toFixed(8); + let floatBalance = parseFloat(dashStr); + return floatBalance; +} +; +/** @type {TxToSats} */ +export function toSats(dash) { + let sats = dash * SATOSHIS; + sats = Math.round(sats); + return sats; +} +; +/** @param {TxKeyUtils} keyUtils */ +export function create(keyUtils) { + if (!keyUtils?.getPrivateKey) { + throw new Error(`you must create with 'opts.getPrivateKey()'`); + } + if (!keyUtils.getPublicKey) { + if (!keyUtils.toPublicKey) { + const errGetPubKey = "you must provide 'getPublicKey()' (efficient) or 'toPublicKey()' (to convert private key)"; + throw new Error(errGetPubKey); + } + /** @type {TxGetPublicKey} */ + keyUtils.getPublicKey = async function (txInput, i, txInputs) { + let privKeyBytes = await keyUtils.getPrivateKey(txInput, i, txInputs); + //@ts-ignore - toPublicKey *is* defined above + let pubKeyBytes = await keyUtils.toPublicKey(privKeyBytes); + if ("string" === typeof pubKeyBytes) { + throw new Error("toPublicKey() must return bytes (Uint8Array)"); + } + return pubKeyBytes; + }; + } + /** @type {TxDeps} */ + //@ts-ignore + let keyDeps = keyUtils; + let txInst = {}; + /** + * @param {TxInfo} txInfo + * @param {Uint32} [sigHashType] + * @returns {Promise} + */ + txInst.hashAndSignAll = async function (txInfo, sigHashType) { + let sortedInputs = txInfo.inputs.slice(0); + sortedInputs.sort(sortInputs); + for (let i = 0; i < sortedInputs.length; i += 1) { + let isSelf = sortedInputs[i] === txInfo.inputs[i]; + if (!isSelf) { + console.warn(`txInfo.inputs are not ordered correctly, use txInfo.inputs.sort(Tx.sortInputs)\n(this will be an exception in the next version)`); + break; + } + } + let sortedOutputs = txInfo.outputs.slice(0); + sortedOutputs.sort(sortOutputs); + for (let i = 0; i < sortedOutputs.length; i += 1) { + let isSelf = sortedOutputs[i] === txInfo.outputs[i]; + if (!isSelf) { + console.warn(`txInfo.outputs are not ordered correctly, use txInfo.outputs.sort(Tx.sortOutputs)\n(this will be an exception in the next version)`); + break; + } + } + /** @type {TxInfoSigned} */ + let txInfoSigned = { + version: txInfo.version ?? CURRENT_VERSION, + type: txInfo.type ?? TYPE_VERSION, + /** @type {Array} */ + inputs: [], + outputs: txInfo.outputs, + locktime: txInfo.locktime ?? 0x00, + extraPayload: txInfo.extraPayload ?? "", + transaction: "", + }; + for (let i = 0; i < txInfo.inputs.length; i += 1) { + let txInput = txInfo.inputs[i]; + let privBytes = await keyDeps.getPrivateKey(txInput, i, txInfo.inputs); + if (privBytes) { + txInput = await txInst.hashAndSignInput(privBytes, txInfo, i, sigHashType); + } + else if (privBytes !== null) { + throw new Error(E_KEYBYTES_UNDEFINED); + } + else { + // same as txInput = Tx.createInputRaw(txInput, i); + // (but we don't want to strip .address, etc) + } + //@ts-ignore - TODO - may be partially signed + txInfoSigned.inputs.push(txInput); + } + txInfoSigned.transaction = serialize(txInfoSigned); + return txInfoSigned; + }; + /** + * @param {Uint8Array} privBytes + * @param {TxInfo} txInfo + * @param {Uint32} i + * @param {Uint32} [sigHashType] + * @returns {Promise} + */ + txInst.hashAndSignInput = async function (privBytes, txInfo, i, sigHashType) { + let txInput = txInfo.inputs[i]; + let _sigHashType = txInput.sigHashType ?? sigHashType ?? SIGHASH_DEFAULT; + // let inputs = selectSigHashInputs(txInfo, i, _sigHashType); + // let outputs = selectSigHashOutputs(txInfo, i, _sigHashType); + // let txForSig = Object.assign({}, txInfo, { inputs, outputs }); + // let txSigHash = createForSig(txForSig, i, _sigHashType); + let txSigHash = createForSig(txInfo, i, _sigHashType); + let txHex = serialize(txSigHash, _sigHashType); + let txBytes = TxUtils.hexToBytes(txHex); + let txHashBuf = await doubleSha256(txBytes); + let sigBuf = await keyDeps.sign(privBytes, txHashBuf); + let sigHex = ""; + if ("string" === typeof sigBuf) { + console.warn(`sign() should return a Uint8Array of an ASN.1 signature`); + sigHex = sigBuf; + } + else { + sigHex = TxUtils.bytesToHex(sigBuf); + } + let pubKeyHex = txInput.publicKey; + if (!pubKeyHex) { + let pubKey = await keyDeps.getPublicKey(txInput, i, txInfo.inputs); + if (!pubKey) { + throw new Error(`no public key for input ${i}`); + } + pubKeyHex = TxUtils.bytesToHex(pubKey); + } + if ("string" !== typeof pubKeyHex) { + let warn = new Error("stack"); + console.warn(`utxo inputs should be plain JSON and use hex rather than buffers for 'publicKey'`, warn.stack); + pubKeyHex = TxUtils.bytesToHex(pubKeyHex); + } + /** @type TxInputSigned */ + let txInputSigned = Object.assign({ + _transaction: txHex, + _hash: TxUtils.bytesToHex(txHashBuf), + _indexForSig: txSigHash.indexForSig, + _lockScript: txSigHash.inputs[txSigHash.indexForSig].script, + }, txInput, { + txid: txInput.txId || txInput.txid, + txId: txInput.txId || txInput.txid, + outputIndex: txInput.outputIndex, + signature: sigHex, + publicKey: pubKeyHex, + sigHashType: _sigHashType, + }); + return txInputSigned; + }; + txInst.legacy = {}; + /** + * @param {Object} opts + * @param {Array?} [opts.inputs] + * @param {Array?} [opts.utxos] + * @param {TxOutput} opts.output + * @returns {TxDraft} + */ + txInst.legacy.draftSingleOutput = function ({ utxos, inputs, output }) { + let fullTransfer = false; + if (!inputs) { + if (!utxos) { + throw new Error("Must provide inputs or utxos"); + } + inputs = _legacyMustSelectInputs({ + utxos: utxos, + satoshis: output.satoshis, + }); + } + else { + fullTransfer = !output.satoshis; + } + let totalAvailable = sum(inputs); + //@ts-ignore - TODO update typedefs + let fees = appraise({ inputs: inputs, outputs: [output] }); + //let EXTRA_SIG_BYTES_PER_INPUT = 2; + let CHANCE_INPUT_SIGS_HAVE_NO_EXTRA_BYTES = 1 / 4; + let MINIMUM_CHANCE_SIG_MATCHES_TARGET = 1 / 20; + let feeTarget = fees.min; + let chanceSignaturesMatchLowestFee = Math.pow(CHANCE_INPUT_SIGS_HAVE_NO_EXTRA_BYTES, inputs.length); + let minimumIsUnlikely = chanceSignaturesMatchLowestFee < MINIMUM_CHANCE_SIG_MATCHES_TARGET; + if (minimumIsUnlikely) { + //let likelyPadByteSize = EXTRA_SIG_BYTES_PER_INPUT * inputs.length; + let likelyPadByteSize = inputs.length; + feeTarget += likelyPadByteSize; + } + let recip = Object.assign({}, output); + if (!recip.satoshis) { + recip.satoshis = totalAvailable + -feeTarget; + } + let outputs = [recip]; + let change; + let changeSats = totalAvailable + -recip.satoshis + -feeTarget + -OUTPUT_SIZE; + let hasChange = changeSats > LEGACY_DUST; + if (hasChange) { + change = { address: "", satoshis: changeSats }; + outputs.push(change); + feeTarget += OUTPUT_SIZE; + } + else { + change = null; + // Re: Dash Direct: we round in favor of the network (exact payments) + feeTarget = totalAvailable + -recip.satoshis; + } + let txInfoRaw = { + inputs, + outputs, + change, + feeTarget, + fullTransfer, + }; + //@ts-ignore - TODO update typedefs + return txInfoRaw; + }; + /** + * @param {TxDraft} txDraft + * @returns {Promise} + */ + txInst.legacy.finalizePresorted = async function (txDraft) { + /** @type {TxInfoSigned} */ + let txSigned = await txInst.legacy + ._signToTarget(txDraft) + .catch(async function (e) { + if ("E_NO_ENTROPY" !== e.code) { + throw e; + } + let _txSigned = await txInst.legacy._signFeeWalk(txDraft); + return _txSigned; + }); + let txSummary = txInst.legacy._summarizeTx(txSigned); + return txSummary; + }; + /** + * @param {TxDraft} txDraft + * @returns {Promise} + */ + txInst.legacy._signToTarget = async function (txDraft) { + let limit = 128; + let lastTx = ""; + let hasEntropy = true; + /** @type {TxInfoSigned} */ + let txSigned; + let fee; + for (let n = 0; true; n += 1) { + txSigned = await txInst.hashAndSignAll(txDraft); + fee = txSigned.transaction.length / 2; + if (fee <= txDraft.feeTarget) { + break; + } + if (txSigned.transaction === lastTx) { + hasEntropy = false; + break; + } + lastTx = txSigned.transaction; + if (n >= limit) { + let msg = `(near-)infinite loop: fee is ${fee} trying to hit target fee of ${txDraft.feeTarget}`; + throw new Error(msg); + } + } + if (!hasEntropy) { + let err = new Error("secp256k1 implementation does not use signature entropy"); + Object.assign(err, { code: "E_NO_ENTROPY" }); + throw err; + } + return txSigned; + }; + /** + * Strategy for signing transactions when a non-entropy signing method is used - + * exhaustively walk each possible signature until one that works is found. + * @param {TxDraft} txDraft + * @returns {Promise} + */ + txInst.legacy._signFeeWalk = async function (txDraft) { + //@ts-ignore - TODO should have satoshis by now + let totalIn = sum(txDraft.inputs); + let totalOut = sum(txDraft.outputs); + let totalFee = totalIn - totalOut; + let fees = appraise(txDraft); + let limit = fees.max - totalFee; + /** @type TxInfoSigned */ + let txSigned; + for (let n = 0; true; n += 1) { + let changeSats = txDraft.change?.satoshis ?? 0; + let hasChange = changeSats > 0; + let canIncreaseFee = txDraft.fullTransfer || hasChange; + if (!canIncreaseFee) { + // TODO try to add another utxo before failing + throw new Error(`no signing entropy and the fee variance is too low to cover the marginal cost of all possible signature iterations`); + } + let outIndex = 0; + if (hasChange) { + outIndex = txDraft.outputs.length - 1; + } + txDraft.outputs[outIndex].satoshis -= 1; + totalFee += 1; + txSigned = await txInst.hashAndSignAll(txDraft); + let byteFee = txSigned.transaction.length / 2; + if (byteFee <= totalFee) { + break; + } + if (n >= limit) { + throw new Error(`(near-)infinite loop: fee is ${byteFee} trying to hit target fee of ${txDraft.feeTarget}`); + } + } + return txSigned; + }; + /** + * @param {TxInfoSigned} txInfo + * @returns {TxSummary} + */ + txInst.legacy._summarizeTx = function (txInfo) { + //@ts-ignore - our inputs are mixed with CoreUtxo + let totalAvailable = sum(txInfo.inputs); + let recipient = txInfo.outputs[0]; + // to satisfy tsc + if (!recipient.address) { + recipient.address = ""; + } + let sent = recipient.satoshis; + let fee = totalAvailable - sent; + let changeSats = 0; + let change = txInfo.outputs[1]; + if (change) { + changeSats = change.satoshis; + } + fee -= changeSats; + // 000 0.00 000 000 + let summaryPartial = { + total: totalAvailable, + sent: sent, + fee: fee, + output: recipient, + recipient: recipient, + change: change, + }; + let summary = Object.assign({}, txInfo, summaryPartial); + return summary; + }; + return txInst; +} +; +/** + * @param {TxInfo} txInfo + * @param {Uint32} i - index of input to be signed + * @param {Uint8} sigHashType + */ +export function selectSigHashInputs(txInfo, i, sigHashType = SIGHASH_DEFAULT) { + let inputs = txInfo.inputs; + if (sigHashType & SIGHASH_ANYONECANPAY) { + let txInput = txInfo.inputs[i]; + inputs = [txInput]; + } + return inputs; +} +; +/** + * @param {TxInfo} txInfo + * @param {Uint32} i - index of input to be signed + * @param {Uint8} sigHashType + */ +export function selectSigHashOutputs(txInfo, i, sigHashType = SIGHASH_DEFAULT) { + let outputs = txInfo.outputs; + if (sigHashType & SIGHASH_ALL) { + return outputs; + } + if (sigHashType & SIGHASH_NONE) { + outputs = []; + return outputs; + } + if (sigHashType & SIGHASH_SINGLE) { + let output = txInfo.outputs[i]; + outputs = [output]; + throw new Error("SIGHASH_SINGLE conflicts with BIP-69, see https://github.com/dashhive/DashTx.js/issues/66"); + } + throw new Error(`expected SIGHASH_[ALL|NONE], but got unrecognized type: ${sigHashType}`); +} +; +/** + * Creates a transaction that is guaranteed to be signable. Selects + * the smallest coin that is bigger or equal to the amount sent + fees, + * or the largest available coins until that total is met. + */ +//@ts-ignore - TODO update typedefs +export function createLegacyTx(coins, outputs, changeOutput, extraPayload) { + // TODO bump to 4 for DIP: enforce tx hygiene + let version = CURRENT_VERSION; + let type = TYPE_VERSION; + coins = coins.slice(0); + outputs = outputs.slice(0); + changeOutput = Object.assign({}, changeOutput); + coins.sort(sortBySatsAsc); + let totalBalance = sum(coins); + /** @type {Array} */ + let inputs = []; + //@ts-ignore - TODO update typedefs + let fees = DashTx.appraise({ inputs, outputs }); + let taxes = fees.max; + // requires at least one input + taxes += MAX_INPUT_SIZE; + let subtotal = sum(outputs); + let total = subtotal + taxes; + let cash = 0; + /** @type {Array} */ + let biggerOrEqual = []; + for (;;) { + let input = coins.pop(); + if (input) { + if (input.satoshis >= total) { + biggerOrEqual.push(input); + continue; + } + } + if (biggerOrEqual.length) { + input = biggerOrEqual.pop(); + } + if (!input) { + break; + } + let sats = input.satoshis; + cash += sats; + inputs.push(input); + if (cash >= total) { + break; + } + // requires at least one more input + total += MAX_INPUT_SIZE; + } + if (cash < total) { + total -= MAX_INPUT_SIZE; + if (cash < totalBalance) { + throw new Error(`developer error: did not use full balance of ${totalBalance} when calculating available balance of ${cash} to pay ${total}`); + } + throw new Error(`balance of ${cash} cannot pay for the transaction + fees of ${total}`); + } + let change = 0; + let dust = cash + -total + -OUTPUT_SIZE; + if (dust >= LEGACY_DUST) { + change = dust; + changeOutput.satoshis = change; + outputs.push(changeOutput); + total += OUTPUT_SIZE; + } + taxes = total - subtotal; + inputs.sort(sortInputs); + outputs.sort(sortOutputs); + let changeIndex = outputs.indexOf(changeOutput); + let locktime = 0; + let txInfo = { + version, + type, + inputs, + outputs, + changeIndex, + locktime, + extraPayload, + }; + // let change = txInfo.outputs[txInfo.changeIndex]; + return txInfo; +} +; +//@ts-ignore - old usage - TODO REMOVE for v1 +export const legacyCreateTx = createLegacyTx; +/** @type {TxSortBySats} */ +export function sortBySatsAsc(a, b) { + let aSats = a.satoshis; + let bSats = b.satoshis; + let diff = aSats - bSats; + if (diff > 0) { + return 1; + } + if (diff < 0) { + return -1; + } + return 0; +} +; +/** @type {TxSortBySats} */ +export function sortBySatsDsc(a, b) { + let aSats = a.satoshis; + let bSats = b.satoshis; + let diff = aSats - bSats; + if (diff > 0) { + return -1; + } + if (diff < 0) { + return 1; + } + return 0; +} +; +/** + * Lexicographical Indexing of Transaction Inputs and Outputs + * See + * + * Keeps ordering deterministic to avoid data leakage. + * + * - ASC `txId` (a.k.a. `txid`, `prev_hash`) + * Note: the comparison is done with the normal (Big-Endian) ordering + * whereas the byte order of wire format is reversed (Little-Endian) + * + * - ASC `outputIndex` (a.k.a. `output_index`, `vout`) + */ +/** @type {TxSortInputs} */ +export function sortInputs(a, b) { + let aTxid = a.txId || a.txid; + let bTxid = b.txId || b.txid; + // Ascending Lexicographical on TxId (prev-hash) in-memory (not wire) byte order + if (aTxid > bTxid) { + return 1; + } + if (aTxid < bTxid) { + return -1; + } + // Ascending Vout (Numerical) + let indexDiff = a.outputIndex - b.outputIndex; + return indexDiff; +} +; +/** + * Lexicographical Indexing of Transaction Inputs and Outputs + * See + * + * Note: this must be updated to support new types of script comparison. + * + * @param {TxOutputSortable} a + * @param {TxOutputSortable} b + * @returns {Uint32} + */ +export function sortOutputs(a, b) { + // the complexity is inherent, and doesn't seem to be reasonable to break out + /* jshint maxcomplexity:30 */ + let satsA = a.satoshis; + let satsB = b.satoshis; + let sats = satsA - satsB; + if (sats < 0) { + return -1; + } + if (sats > 0) { + return 1; + } + // memo vs non-memo is settled by 'satoshis' being 0 + // (otherwise there's a bug) + if (typeof a.memo === "string") { + if (typeof b.memo !== "string") { + throw new Error(`'satoshis' must be above 0, except for memos`); + } + if (a.memo < b.memo) { + return -1; + } + if (a.memo > b.memo) { + return 1; + } + return 0; + } + if (a.pubKeyHash && b.pubKeyHash) { + if (a.pubKeyHash > b.pubKeyHash) { + return 1; + } + if (a.pubKeyHash < b.pubKeyHash) { + return -1; + } + return 0; + } + if (a.address && b.address) { + if (a.address > b.address) { + return 1; + } + if (a.address < b.address) { + return -1; + } + return 0; + } + let scriptTypeA = `${OP_DUP}${OP_HASH160}`; + let scriptTypeB = scriptTypeA; + if (a.script) { + scriptTypeA = a.script.slice(0, 4); + } + if (b.script) { + scriptTypeB = b.script.slice(0, 4); + } + if (scriptTypeA < scriptTypeB) { + return -1; + } + if (scriptTypeA > scriptTypeB) { + return 1; + } + if (a.script && b.script) { + if (a.script < b.script) { + return -1; + } + if (a.script > b.script) { + return 1; + } + return 0; + } + let jsonA = JSON.stringify(a, null, 2); + let jsonB = JSON.stringify(b, null, 2); + throw new Error(`developer error: these outputs cannot be compared:\n${jsonA}\n${jsonB}\n(probably either mixed types - address & pubKeyHash - or unsupported output types were given)`); +} +; +/** + * @template {CoreUtxo} T + * @param {Object} opts + * @param {Array} opts.utxos + * @param {Uint53} [opts.satoshis] + * @param {Uint53} [opts.now] - ms + * @returns {Array} + */ +function _legacyMustSelectInputs({ utxos, satoshis }) { + if (!satoshis) { + let msg = `expected target selection value 'satoshis' to be a positive integer but got '${satoshis}'`; + let err = new Error(msg); + throw err; + } + let selected = _legacySelectOptimalUtxos(utxos, satoshis); + if (!selected.length) { + throw _createInsufficientFundsError(utxos, satoshis); + } + return selected; +} +; +/** + * @template {Pick} T + * @param {Array} utxos + * @param {Uint53} outputSats + * @return {Array} + */ +function _legacySelectOptimalUtxos(utxos, outputSats) { + let numOutputs = 1; + let extraSize = 0; + let fees = _appraiseCounts(utxos.length, numOutputs, extraSize); + let fullSats = outputSats + fees.min; + let balance = sum(utxos); + if (balance < fullSats) { + /** @type Array */ + return []; + } + // from largest to smallest + utxos.sort(function (a, b) { + return b.satoshis - a.satoshis; + }); + /** @type Array */ + let included = []; + let total = 0; + // try to get just one + utxos.every(function (utxo) { + if (utxo.satoshis > fullSats) { + included[0] = utxo; + total = utxo.satoshis; + return true; + } + return false; + }); + if (total) { + return included; + } + // try to use as few coins as possible + let hasEnough = utxos.some(function (utxo, i) { + included.push(utxo); + total += utxo.satoshis; + if (total >= fullSats) { + return true; + } + // TODO we could optimize for minimum and retry on exception during finalize + // it quickly becomes astronomically unlikely to hit the one + // exact possibility that least to paying the absolute minimum, + // but remains about 75% likely to hit any of the mid value + // possibilities + if (i < 2) { + // 1 input 25% chance of minimum (needs ~2 tries) + // 2 inputs 6.25% chance of minimum (needs ~8 tries) + fullSats = fullSats + MIN_INPUT_SIZE; + return false; + } + // but by 3 inputs... 1.56% chance of minimum (needs ~32 tries) + // by 10 inputs... 0.00953674316% chance (needs ~524288 tries) + fullSats = fullSats + MIN_INPUT_SIZE + 1; + }); + if (!hasEnough) { + /** @type Array */ + return []; + } + return included; +} +; +/** + * @param {Array} allInputs + * @param {Uint53} satoshis + * @throws {Error} + */ +function _createInsufficientFundsError(allInputs, satoshis) { + let totalBalance = sum(allInputs); + let dashBalance = toDash(totalBalance); + let dashAmount = toDash(satoshis); + let numOutputs = 1; + let extraSize = 0; + let fees = _appraiseCounts(allInputs.length, numOutputs, extraSize); + let feeAmount = toDash(fees.mid); + let msg = `insufficient funds: cannot pay ${dashAmount} (+${feeAmount} fee) with ${dashBalance}`; + let err = new Error(msg); + throw err; +} +; +// TODO createRequest +/** + * @param {Object} txInfo + * @param {Uint16} [txInfo.version] + * @param {Uint16} [txInfo.type] + * @param {Array} txInfo.inputs + * @param {Array} txInfo.outputs + * @param {Uint32} [txInfo.locktime] + * @param {Hex} [txInfo.extraPayload] + * @param {Boolean} [txInfo._debug] - bespoke debug output + */ +export function createRaw(txInfo) { + let txInfoRaw = Object.assign({}, txInfo); + txInfoRaw.inputs = []; + for (let i = 0; i < txInfo.inputs.length; i += 1) { + let input = txInfo.inputs[i]; + let rawInput = createInputRaw(input, i); + txInfoRaw.inputs.push(rawInput); + } + return txInfoRaw; +} +; +// TODO createRequestInput +/** + * @param {TxInputRaw} input + * @param {Uint32} i + */ +export function createInputRaw(input, i) { + let rawInput = { + txid: input.txId || input.txid, + txId: input.txId || input.txid, + outputIndex: input.outputIndex, + }; + return rawInput; +} +; +/** + * @param {TxInfo} txInfo + * @param {Uint32} inputIndex - create hashable tx for this input + * @param {Uint32} sigHashType - 0x01 for ALL, or 0x81 for ALL + ANYONECANPAY + */ +export function createForSig(txInfo, inputIndex, sigHashType) { + let txForSig = Object.assign({ indexForSig: -1 }, txInfo); + /** @type {Array} */ + txForSig.inputs = []; + for (let i = 0; i < txInfo.inputs.length; i += 1) { + let input = txInfo.inputs[i]; + if (inputIndex === i) { + let sighashInput = createInputForSig(input, i); + txForSig.indexForSig += txForSig.inputs.push(sighashInput); + continue; + } + if (!(sigHashType & SIGHASH_ANYONECANPAY)) { + let rawInput = createInputRaw(input, i); + txForSig.inputs.push(rawInput); + } + } + return txForSig; +} +; +/** + * @param {TxInputForSig} input + * @param {Uint32} i - create hashable tx for this input + */ +export function createInputForSig(input, i) { + let lockScript = input.script; + if (!lockScript) { + if (!input.pubKeyHash) { + throw new Error(`signable input must have either 'pubKeyHash' or 'script'`); + } + lockScript = createPkhScript(input.pubKeyHash); + } + return { + txId: input.txId || input.txid, + txid: input.txId || input.txid, + outputIndex: input.outputIndex, + pubKeyHash: input.pubKeyHash, + sigHashType: input.sigHashType, + script: lockScript, + }; +} +; +/** + * @param {Hex} pubKeyHash + * @returns {Hex} + */ +export function createPkhScript(pubKeyHash) { + let lockScript = `${OP_DUP}${OP_HASH160}${PKH_SIZE}${pubKeyHash}${OP_EQUALVERIFY}${OP_CHECKSIG}`; + return lockScript; +} +; +/** + * @param {Object} txInfo + * @param {Uint16} [txInfo.version] + * @param {Uint16} [txInfo.type] + * @param {Array} txInfo.inputs + * @param {Array} txInfo.outputs + * @param {Uint32} [txInfo.locktime] + * @param {Hex?} [txInfo.extraPayload] - extra payload + * @param {Boolean} [txInfo._debug] - bespoke debug output + * @param {Uint32?} [sigHashType] + */ +export function serialize({ version = CURRENT_VERSION, type = TYPE_VERSION, inputs, outputs, locktime = 0x0, extraPayload = "", +/* maxFee = 10000, */ +_debug = false, }, sigHashType) { + let _sep = ""; + if (_debug) { + _sep = "\n"; + } + /** @type Array */ + let tx = []; + let v = TxUtils._toUint16LE(version); + tx.push(v); + let t = TxUtils._toUint16LE(type); + tx.push(t); + void serializeInputs(inputs, { _tx: tx, _sep: _sep }); + void serializeOutputs(outputs, { _tx: tx, _sep: _sep }); + let locktimeHex = TxUtils.toUint32LE(locktime); + tx.push(locktimeHex); + if (extraPayload) { + let nExtraPayload = TxUtils.toVarInt(extraPayload.length / 2); + tx.push(nExtraPayload); + tx.push(extraPayload); + } + if (sigHashType) { + let sigHashTypeHex = TxUtils.toUint32LE(sigHashType); + tx.push(sigHashTypeHex); + } + let txHex = tx.join(_sep); + return txHex; +} +; +//@ts-ignore - same function, but typed and documented separately for clarity +export const serializeForSig = serialize; +/** + * @param {Array} inputs + * @param {Object} [_opts] + * @param {Array} [_opts._tx] + * @param {String} [_opts._sep] + */ +export function serializeInputs(inputs, _opts) { + let tx = _opts?._tx || []; + let _sep = _opts?._sep ?? ""; + let nInputs = TxUtils.toVarInt(inputs.length); + tx.push(nInputs); + for (let i = 0; i < inputs.length; i += 1) { + let input = inputs[i]; + let inputHex = serializeInput(input, i, { _sep: _sep }); + let txIn = inputHex.join(_sep); + tx.push(txIn); + } + return tx; +} +; +/** + * @param {TxInput|TxInputRaw|TxInputForSig|TxInputSigned} input + * @param {Uint32} i + * @param {Object} [_opts] + * @param {Array} [_opts._tx] + * @param {String} [_opts._sep] + */ +export function serializeInput(input, i, _opts) { + let tx = _opts?._tx || []; + if (!input.txid) { + throw new Error("missing required utxo property 'txid'"); + } + if (64 !== input.txid.length) { + throw new Error(`expected uxto property 'txid' to be a valid 64-character (32-byte) hex string, but got '${input.txid}' (size ${input.txid.length})`); + } + assertHex(input.txid, "txid"); + let reverseTxId = TxUtils.reverseHex(input.txid); + tx.push(reverseTxId); + let voutIndex = input.outputIndex; + if (isNaN(voutIndex)) { + throw new Error(`expected utxo property 'input[${i}]outputIndex' to be an integer representing this input's previous output index`); + } + let reverseVout = TxUtils.toUint32LE(voutIndex); + tx.push(reverseVout); + //@ts-ignore - enum types not handled properly here + if (input.signature) { + //@ts-ignore + let sigHashTypeVar = TxUtils.toVarInt(input.sigHashType); + //@ts-ignore + let sig = `${input.signature}${sigHashTypeVar}`; + let sigSize = TxUtils.toVarInt(sig.length / 2); + //@ts-ignore + let keySize = TxUtils.toVarInt(input.publicKey.length / 2); + //@ts-ignore + let sigScript = `${sigSize}${sig}${keySize}${input.publicKey}`; + let sigScriptLen = sigScript.length / 2; + let sigScriptLenSize = TxUtils.toVarInt(sigScriptLen); + tx.push(sigScriptLenSize); + tx.push(sigScript); + //@ts-ignore + } + else if (input.script) { + //@ts-ignore + let lockScript = input.script; + //@ts-ignore + let lockScriptLen = input.script.length / 2; + let lockScriptLenSize = TxUtils.toVarInt(lockScriptLen); + tx.push(lockScriptLenSize); + tx.push(lockScript); + } + else { + let rawScriptSize = "00"; + let rawScript = ""; + tx.push(rawScriptSize); + tx.push(rawScript); + } + let sequence = input.sequence ?? "ffffffff"; + tx.push(sequence); + return tx; +} +; +/** @type {TxSerializeOutputs} */ +export function serializeOutputs(outputs, opts) { + let tx = opts?._tx || []; + let _sep = opts?._sep ?? ""; + if (!outputs.length) { + throw new Error(E_NO_OUTPUTS); + } + let nOutputs = TxUtils.toVarInt(outputs.length); + tx.push(nOutputs); + for (let i = 0; i < outputs.length; i += 1) { + let output = outputs[i]; + let outputHex = serializeOutput(output, i, { _sep }); + let txOut = outputHex.join(_sep); + tx.push(txOut); + } + return tx; +} +; +/** + * @param {TxOutput} output + * @param {Uint32} i + * @param {Object} [_opts] + * @param {Array} [_opts._tx] + * @param {String} [_opts._sep] + */ +export function serializeOutput(output, i, _opts) { + let tx = _opts?._tx || []; + let _sep = _opts?._sep ?? ""; + if (output.message) { + if (!output.memo) { + output.memo = TxUtils.strToHex(output.message); + } + } + if (typeof output.memo === "string") { + let invalid = output.address || output.pubKeyHash; + if (invalid) { + throw new Error(`memo outputs must not have 'address' or 'pubKeyHash'`); + } + let sats = output.satoshis ?? 0; + let memoScriptHex = _createMemoScript(output.memo, sats, i); + console.log('dashtx.js serializeOutput memoScriptHex', memoScriptHex); + let txOut = memoScriptHex.join(_sep); + tx.push(txOut); + return tx; + } + if (!output.satoshis) { + throw new Error(`every output must have 'satoshis'`); + } + let satoshis = TxUtils.toUint64LE(output.satoshis); + tx.push(satoshis); + if (!output.pubKeyHash) { + throw new Error(`every output must have 'pubKeyHash' as a hex string`); + } + assertHex(output.pubKeyHash, `output[${i}].pubKeyHash`); + tx.push(PKH_SCRIPT_SIZE); + //let lockScript = `${OP_DUP}${OP_HASH160}${PKH_SIZE}${output.pubKeyHash}${OP_EQUALVERIFY}${OP_CHECKSIG}`; + tx.push(`${OP_DUP}${OP_HASH160}`); + tx.push(PKH_SIZE); + tx.push(output.pubKeyHash); + tx.push(`${OP_EQUALVERIFY}${OP_CHECKSIG}`); + return tx; +} +; +/** + * @param {Object} [opts] + * @param {String?} [opts.message] - UTF-8 Memo String + */ +export function createDonationOutput(opts) { + let satoshis = 0; + let message = opts?.message; + if (typeof message !== "string") { + let gifts = ["💸", "🎁", "🧧"]; + let indexIsh = Math.random() * 3; + let index = Math.floor(indexIsh); + message = gifts[index]; + } + let output = { satoshis, message }; + return output; +} +; +/** + * @param {String} memoHex - the memo bytes, in hex + * @param {Uint53} sats - typically 0, but 1.0 for proposal collateral + * @returns {Array} - memo script hex + */ +function _createMemoScript(memoHex, sats, i = 0) { + let outputHex = []; + let satoshis = TxUtils.toUint64LE(sats); + outputHex.push(satoshis); + assertHex(memoHex, `output[${i}].memo`); + let memoSize = memoHex.length / 2; + if (memoSize > 80) { + // Total lock script size is limited to 83 bytes. + // The message portion is limited to 75 bytes, + // but can be can extended up to 80 with OP_PUSHDATA1. + // + // See + throw new Error(`memos are limited to 80 bytes as per "Core Docs: Standard Transactions: Null Data"`); + } + let lockScriptSize = memoSize + 2; + // See https://github.com/bitcoin-sv-specs/op_return/blob/master/01-PUSHDATA-data-element-framing.md#pushdata-data-framing-for-op_return + let opReturn = OP_RETURN; + if (memoSize > MAX_U8) { + opReturn = `${OP_RETURN}${OP_PUSHDATA2}`; + lockScriptSize += 2; + } + else if (memoSize >= OP_PUSHDATA1_INT) { + opReturn = `${OP_RETURN}${OP_PUSHDATA1}`; + lockScriptSize += 1; + } + let memoSizeHex = memoSize.toString(16); + let isPadded = 0 === memoSizeHex.length % 2; + if (!isPadded) { + memoSizeHex = `0${memoSizeHex}`; + } + let lockScriptSizeHex = TxUtils.toVarInt(lockScriptSize); + outputHex.push(lockScriptSizeHex); + //let lockScript = `${opReturn}${memoSizeHex}${memoHex}`; + outputHex.push(opReturn); + outputHex.push(memoSizeHex); + outputHex.push(memoHex); + return outputHex; +} +; +/** @type {TxSum} */ +export function sum(coins) { + let balance = 0; + for (let utxo of coins) { + let sats = utxo.satoshis; + balance += sats; + } + return balance; +} +; +/** @type {TxGetId} */ +export const getId = async function (txHex) { + let u8 = TxUtils.hexToBytes(txHex); + //console.log("Broadcastable Tx Buffer"); + //console.log(u8); + let hashU8 = await doubleSha256(u8); + let reverseU8 = new Uint8Array(hashU8.length); + let reverseIndex = reverseU8.length - 1; + hashU8.forEach( + /** @param {Uint8} b */ + function (b) { + reverseU8[reverseIndex] = b; + reverseIndex -= 1; + }); + //console.log("Reversed Round 2 Hash Buffer"); + //console.log(reverseU8); + let id = TxUtils.bytesToHex(reverseU8); + return id; +}; +/** + * @param {Uint8Array} bytes + * @returns {Promise} - the double-sha256sum + */ +export const doubleSha256 = async function (bytes) { + let ab = await Crypto.subtle.digest({ name: "SHA-256" }, bytes); + //console.log("Round 1 Hash Buffer"); + //console.log(ab); + ab = await Crypto.subtle.digest({ name: "SHA-256" }, ab); + let hashU8 = new Uint8Array(ab); + //console.log("Round 2 Hash Buffer"); + //console.log(hashU8); + return hashU8; +}; +/** + * @param {String} txHex + */ +export function parseUnknown(txHex) { + /**@type {TxInfo}*/ + //@ts-ignore + let txInfo = {}; + try { + void _parse(txHex, txInfo); + } + catch (e) { + /**@type {Error}*/ + //@ts-ignore - trust me bro, it's an error + let err = e; + Object.assign(err, { + code: "E_TX_PARSE", + transaction: txInfo, + }); + let msg = "parse failed, try ./DashTx.js/bin/inpsect.js for detail"; + err.message += `\n${msg}`; + throw err; + } + return txInfo; +} +; +/** + * @param {Object} tx + * @param {String} hex + */ +function _parse(hex, tx = {}) { + /* jshint maxstatements: 200 */ + tx.hasInputScript = false; + tx.totalSatoshis = 0; + tx.offset = 0; + tx.versionHex = hex.slice(tx.offset, tx.offset + 4); + let versionHexRev = TxUtils.reverseHex(tx.versionHex); + tx.version = parseInt(versionHexRev, 16); + tx.offset += 4; + tx.typeHex = hex.slice(tx.offset, tx.offset + 4); + let typeHexRev = TxUtils.reverseHex(tx.typeHex); + tx.type = parseInt(typeHexRev, 16); + tx.offset += 4; + let [numInputs, numInputsSize] = TxUtils._parseVarIntHex(hex, tx.offset); + tx.offset += numInputsSize; + tx.numInputsHex = numInputs.toString(16); + tx.numInputsHex = tx.numInputsHex.padStart(2, "0"); + tx.numInputs = numInputs; + tx.inputs = []; + for (let i = 0; i < numInputs; i += 1) { + let input = {}; + tx.inputs.push(input); + input.txidHex = hex.slice(tx.offset, tx.offset + 64); + input.txid = TxUtils.reverseHex(input.txidHex); + input.txId = input.txid; // TODO + tx.offset += 64; + input.outputIndexHex = hex.slice(tx.offset, tx.offset + 8); + let outputIndexHexLe = TxUtils.reverseHex(input.outputIndexHex); + input.outputIndex = parseInt(outputIndexHexLe, 16); + tx.offset += 8; + // TODO VarInt + input.scriptSizeHex = hex.slice(tx.offset, tx.offset + 2); + input.scriptSize = parseInt(input.scriptSizeHex, 16); + tx.offset += 2; + input.script = ""; + if (0 === input.scriptSize) { + // "Raw" Tx + } + else if (25 === input.scriptSize) { + // "SigHash" Tx + tx.hasInputScript = true; + input.script = hex.substr(tx.offset, 2 * input.scriptSize); + tx.offset += 2 * input.scriptSize; + } + else if (input.scriptSize >= 106 && input.scriptSize <= 109) { + let sig = { + sigHashTypeHex: "", + sigHashType: 0, + publicKeySizeHex: "", + publicKeySize: 0, + publicKey: "", + signature: "", + sigSizeHex: "", + sigSize: 0, + asn1Seq: "", + asn1Bytes: "", + rTypeHex: "", + rSizeHex: "", + rSize: 0, + rValue: "", + sTypeHex: "", + sSizeHex: "", + sSize: 0, + sValue: "", + }; + // "Signed" Tx + tx.hasInputScript = true; + sig.signature = hex.substr(tx.offset, 2 * input.scriptSize); + tx.offset += 2 * input.scriptSize; + sig.sigSizeHex = sig.signature.substr(0, 2); + sig.sigSize = parseInt(sig.sigSizeHex, 16); + sig.asn1Seq = sig.signature.substr(2, 2); + sig.asn1Bytes = sig.signature.substr(4, 2); + sig.rTypeHex = sig.signature.substr(6, 2); + sig.rSizeHex = sig.signature.substr(8, 2); + sig.rSize = parseInt(sig.rSizeHex, 16); + let sIndex = 10; + sig.rValue = sig.signature + .substr(sIndex, 2 * sig.rSize) + .padStart(66, " "); + sIndex += 2 * sig.rSize; + sig.sTypeHex = sig.signature.substr(sIndex, 2); + sIndex += 2; + sig.sSizeHex = sig.signature.substr(sIndex, 2); + sig.sSize = parseInt(sig.sSizeHex, 16); + sIndex += 2; + sig.sValue = sig.signature + .substr(sIndex, 2 * sig.sSize) + .padStart(66, " "); + sIndex += 2 * sig.sSize; + sig.sigHashTypeHex = sig.signature.substr(sIndex, 2); + sig.sigHashType = parseInt(sig.sigHashTypeHex, 16); + sIndex += 2; + sig.publicKeySizeHex = sig.signature.substr(sIndex, 2); + sig.publicKeySize = parseInt(sig.publicKeySizeHex, 16); + sIndex += 2; + sig.publicKey = sig.signature.substr(sIndex, 2 * sig.publicKeySize); + sIndex += 2 * sig.publicKeySize; + Object.assign(input, sig); + let rest = sig.signature.substr(sIndex); + if (rest) { + Object.assign(input, { extra: rest }); + } + } + else { + throw new Error(`expected a "script" size of 0 (raw), 25 (hashable), or 106-109 (signed), but got '${input.scriptSize}'`); + } + input.sequence = hex.substr(tx.offset, 8); + tx.offset += 8; + } + let [numOutputs, numOutputsSize] = TxUtils._parseVarIntHex(hex, tx.offset); + tx.offset += numOutputsSize; + tx.numOutputsHex = numOutputs.toString(16); + tx.numOutputsHex = tx.numOutputsHex.padStart(2, "0"); + tx.numOutputs = numOutputs; + tx.outputs = []; + for (let i = 0; i < tx.numOutputs; i += 1) { + let output = {}; + tx.outputs.push(output); + output.satoshisHex = hex.substr(tx.offset, 16); + tx.offset += 16; + let satsHex = TxUtils.reverseHex(output.satoshisHex); + output.satoshis = parseInt(satsHex, 16); + tx.totalSatoshis += output.satoshis; + // TODO VarInt + output.lockScriptSizeHex = hex.substr(tx.offset, 2); + output.lockScriptSize = parseInt(output.lockScriptSizeHex, 16); + tx.offset += 2; + output.script = hex.substr(tx.offset, 2 * output.lockScriptSize); + tx.offset += 2 * output.lockScriptSize; + output.scriptTypeHex = output.script.slice(0, 2); + output.scriptType = parseInt(output.scriptTypeHex, 16); + output.pubKeyHash = ""; + /**@type {String?}*/ + output.memo = null; + /**@type {String?}*/ + output.message = null; + if (output.scriptTypeHex === OP_RETURN) { + output.memo = output.script.slice(4, 2 * output.lockScriptSize); + output.message = ""; + let decoder = new TextDecoder(); + let bytes = TxUtils.hexToBytes(output.memo); + try { + output.message = decoder.decode(bytes); + } + catch (e) { + output.message = ""; + } + } + else { + // TODO check the script type + output.pubKeyHash = output.script.slice(6, -4); + } + } + tx.locktimeHex = hex.substr(tx.offset, 8); + let locktimeHexRev = TxUtils.reverseHex(tx.locktimeHex); + tx.locktime = parseInt(locktimeHexRev, 16); + tx.offset += 8; + tx.extraPayloadSizeHex = ""; + /** @type {Uint8?} */ + tx.extraPayloadSize = null; + tx.extraPayloadHex = ""; + if (tx.type > 0) { + // TODO varint + tx.extraPayloadSizeHex = hex.substr(tx.offset, 2); + tx.extraPayloadSize = parseInt(tx.extraPayloadSizeHex, 16); + tx.offset += 2; + tx.extraPayloadHex = hex.substr(tx.offset, 2 * tx.extraPayloadSize); + tx.offset += 2 * tx.extraPayloadSize; + } + tx.sigHashTypeHex = hex.substr(tx.offset); + if (tx.sigHashTypeHex) { + let firstLEIntByte = tx.sigHashTypeHex.slice(0, 2); + tx.sigHashType = parseInt(firstLEIntByte); + let fullLEIntHexSize = 8; + hex = hex.slice(0, -fullLEIntHexSize); // but the size is actually 4 bytes + } + tx.size = hex.length / 2; + tx.cost = tx.size + tx.totalSatoshis; + tx.transaction = hex; + return tx; +} +; +/** + * @param {String} hex + * @param {Number} offset + */ +TxUtils._parseVarIntHex = function (hex, offset) { + let size = 2; + let numHex = hex.substr(offset, 2); + let num = parseInt(numHex, 16); + offset += size; + if (num > 252) { + if (253 === num) { + numHex = hex.substr(offset, 4); + } + else if (254 === num) { + numHex = hex.substr(offset, 8); + } + else if (255 === num) { + numHex = hex.substr(offset, 16); + } + num = parseInt(numHex, 16); + size += numHex.length; + } + return [num, size]; +}; +// TODO TxUtils.sha256sha256(txHex, inputs, sigHashType) +// TODO Tx.signInput(txHash, input, sigHashType) +// TODO TxUtils.isTxInputSigned(txHash, input) +/** + * @param {String} hex + * @param {String} propName - internal use + */ +function assertHex(hex, propName) { + for (let i = 0; i < hex.length; i += 1) { + let lowerChar = hex[i].charCodeAt(0) | 0x20; + let isNum = lowerChar >= CH_0 && lowerChar <= CH_9; + let isAlpha = lowerChar >= CH_A && lowerChar <= CH_F; + let isHex = isNum || isAlpha; + if (!isHex) { + throw new Error(`expected each character of utxo property '${propName}' to be hex encoded but saw '${lowerChar}' in '${hex}'`); + } + } +} +/** + * @param {string} basicAuthUrl - ex: https://api:token@trpc.digitalcash.dev/ + * http://user:pass@localhost:19998/ + * @param {string} method - the rpc, such as 'getblockchaininfo', + * 'getaddressdeltas', or 'help' + * @param {...any} params - the arguments for the specific rpc + * ex: rpc(url, 'help', 'getaddressdeltas') + */ +TxUtils.rpc = async function rpc(basicAuthUrl, method, ...params) { + let url = new URL(basicAuthUrl); + let baseUrl = `${url.protocol}//${url.host}${url.pathname}`; + let basicAuth = btoa(`${url.username}:${url.password}`); + // typically http://localhost:19998/ + let payload = JSON.stringify({ method, params }); + let resp = await fetch(baseUrl, { + method: "POST", + headers: { + Authorization: `Basic ${basicAuth}`, + "Content-Type": "application/json", + }, + body: payload, + }); + let data = await resp.json(); + if (data.error) { + let err = new Error(data.error.message); + Object.assign(err, data.error); + throw err; + } + return data.result; +}; +/** + * @param {String} hex + */ +TxUtils.hexToBytes = function (hex) { + let bufLen = hex.length / 2; + let u8 = new Uint8Array(bufLen); + let i = 0; + let index = 0; + let lastIndex = hex.length - 2; + for (;;) { + if (i > lastIndex) { + break; + } + let h = hex.slice(i, i + 2); + let b = parseInt(h, 16); + u8[index] = b; + i += 2; + index += 1; + } + return u8; +}; +/** + * @param {String} hex + */ +TxUtils.reverseHex = function (hex) { + let hexLE = []; + for (let i = hex.length - 2; i >= 0; i -= 2) { + hexLE.push(hex.slice(i, i + 2)); + } + // ex: 0x03000000 + return hexLE.join(""); +}; +/** @type TxToVarInt */ +TxUtils.toVarInt = function (n) { + //@ts-ignore - see https://github.com/microsoft/TypeScript/issues/57953 + if (n < 253) { + return n.toString(16).padStart(2, "0"); + } + if (!n) { + throw new Error(`'${n}' is not a number`); + } + //@ts-ignore + if (n <= MAX_U16) { + return "fd" + TxUtils.toUint32LE(n).slice(0, 4); + } + //@ts-ignore + if (n <= MAX_U32) { + return "fe" + TxUtils.toUint32LE(n); + } + //@ts-ignore + if (n <= MAX_U53) { + return "ff" + TxUtils.toUint64LE(n); + } + if ("bigint" !== typeof n) { + let err = new Error(E_LITTLE_INT); + Object.assign(err, { code: "E_LITTLE_INT" }); + throw err; + } + if (n <= MAX_U64) { + return "ff" + TxUtils.toUint64LE(n); + } + let err = new Error(E_TOO_BIG_INT); + Object.assign(err, { code: "E_TOO_BIG_INT" }); + throw err; +}; +/** + * Just assumes that all target CPUs are Little-Endian, + * which is true in practice, and much simpler. + * @param {BigInt|Number} n - 16-bit positive int to encode + */ +TxUtils._toUint16LE = function (n) { + let hexLE = TxUtils.toUint32LE(n); + // ex: 03000800 => 0300 + hexLE = hexLE.slice(0, 4); + return hexLE; +}; +/** + * Just assumes that all target CPUs are Little-Endian, + * which is true in practice, and much simpler. + * @param {BigInt|Number} n - 32-bit positive int to encode + */ +TxUtils.toUint32LE = function (n) { + // make sure n is uint32/int53, not int32 + //n = n >>> 0; + // 0x00000003 + let hex = n.toString(16).padStart(8, "0"); + let hexLE = TxUtils.reverseHex(hex); + return hexLE; +}; +//@ts-ignore +TxUtils._toUint32LE = function (n) { + console.warn("warn: use public TxUtils.toUint32LE() instead of internal TxUtils._toUint32LE()"); + return TxUtils.toUint32LE(n); +}; +/** + * This can handle Big-Endian CPUs, which don't exist, + * and looks too complicated. + * @param {BigInt|Number} n - 64-bit BigInt or <= 53-bit Number to encode + * @returns {String} - 8 Little-Endian bytes + */ +TxUtils.toUint64LE = function (n) { + let bn; + if ("bigint" === typeof n) { + bn = n; + } + else { + //@ts-ignore + bn = BigInt(n); + } + let u8 = new Uint8Array(8); + let byteOffset = 0; + let dv = new DataView(u8.buffer); + let endianness = true; /* littleEndian */ + dv.setBigUint64(byteOffset, bn, endianness); + /** @type {Array} */ + let hexArr = []; + u8.forEach(function (i) { + let h = i.toString(16).padStart(2, "0"); + hexArr.push(h); + }); + let hex = hexArr.join(""); + return hex; +}; +//@ts-ignore +TxUtils._toUint64LE = function (n) { + console.warn("warn: use public TxUtils.toUint64LE() instead of internal TxUtils._toUint64LE()"); + return TxUtils.toUint64LE(n); +}; +/** @type TxToVarIntSize */ +TxUtils.toVarIntSize = function (n) { + //@ts-ignore - see https://github.com/microsoft/TypeScript/issues/57953 + if (n < 253) { + return 1; + } + //@ts-ignore + if (n <= MAX_U16) { + return 3; + } + //@ts-ignore + if (n <= MAX_U32) { + return 5; + } + //@ts-ignore + if (n <= MAX_U64) { + return 9; + } + let err = new Error(E_TOO_BIG_INT); + Object.assign(err, { code: "E_TOO_BIG_INT" }); + throw err; +}; +/** @type {TxBytesToHex} */ +TxUtils.bytesToHex = function (u8) { + /** @type {Array} */ + let hex = []; + u8.forEach(function (b) { + let h = b.toString(16).padStart(2, "0"); + hex.push(h); + }); + return hex.join(""); +}; +/** @type {TxStringToHex} */ +TxUtils.strToHex = function (str) { + let encoder = new TextEncoder(); + let bytes = encoder.encode(str); + let hex = TxUtils.bytesToHex(bytes); + return hex; +}; +export { TxUtils as utils }; +// Type Aliases +/** @typedef {Number} Float64 */ +/** @typedef {Number} Uint8 */ +/** @typedef {Number} Uint16 */ +/** @typedef {Number} Uint32 */ +/** @typedef {Number} Uint53 */ +/** @typedef {String} Hex */ +/** @typedef {Uint8Array} TxPrivateKey */ +/** @typedef {Uint8Array} TxPublicKey */ +/** @typedef {Uint8Array} TxSignature */ +// Type Defs +/** + * @typedef CoreUtxo + * @property {String} [txId] - deprecated + * @property {String} txid + * @property {Number} outputIndex + * @property {String} address + * @property {String} script + * @property {Number} satoshis + */ +/** + * @typedef TxKeyUtils + * @prop {TxGetPrivateKey} getPrivateKey + * @prop {TxGetPublicKey} [getPublicKey] - efficiently get public key bytes + * @prop {TxToPublicKey} toPublicKey - convert private bytes to pub bytes + * @prop {TxSign} sign + */ +/** @typedef {Required} TxDeps */ +/** + * @typedef TxFees + * @prop {Uint53} max + * @prop {Uint53} mid + * @prop {Uint53} min + */ +/** + * @typedef TxInfo + * @prop {Uint16} [version] + * @prop {Uint16} [type] + * @prop {Array} inputs + * @prop {Array} outputs + * @prop {Uint32} [locktime] - 0 by default + * @prop {Hex} [extraPayload] - extra payload bytes + * @prop {Hex} [transaction] - signed transaction hex + * @prop {Boolean} [_debug] - bespoke debug output + */ +/** @typedef {TxInfo & TxDraftPartial} TxDraft */ +/** + * @typedef TxDraftPartial + * @prop {TxOutput?} change + * @prop {Uint53} feeTarget + * @prop {Boolean} fullTransfer + */ +/** + * @typedef TxInfoSigned + * @prop {Uint16} version + * @prop {Uint16} type + * @prop {Array} inputs + * @prop {Array} outputs + * @prop {Uint32} locktime - 0 by default + * @prop {Hex} extraPayload - extra payload bytes + * @prop {String} transaction - signed transaction hex + * @prop {Boolean} [_debug] - bespoke debug output + */ +/** @typedef {TxInfoSigned & TxSummaryPartial} TxSummary */ +/** + * @typedef TxSummaryPartial + * @prop {Uint53} total - sum of all inputs + * @prop {Uint53} sent - sum of all outputs + * @prop {Uint53} fee - actual fee + * @prop {Array} outputs + * @prop {Array} inputs + * @prop {TxOutput} output - alias of 'recipient' for backwards-compat + * @prop {TxOutput} recipient - output to recipient + * @prop {TxOutput} change - sent back to self + */ +/** + * @typedef TxInput + * @prop {String} [address] - BaseCheck58-encoded pubKeyHash + * @prop {String} [txId] - deprecated + * @prop {String} txid - hex (not pre-reversed) + * @prop {Uint32} outputIndex - index in previous tx's output (vout index) + * @prop {String} signature - hex-encoded ASN.1 (DER) signature (starts with 0x30440220 or 0x30440221) + * @prop {String} [script] - the previous lock script (default: derived from public key as p2pkh) + * @prop {String} publicKey - hex-encoded public key (typically starts with a 0x02 or 0x03 prefix) + * @prop {String} [pubKeyHash] - the 20-byte pubKeyHash (address without magic byte or checksum) + * @prop {String} [sequence] - the 4-byte sequence (typically ffffffff) + * @prop {Uint32} sigHashType - typically 0x81 (SIGHASH_ALL|SIGHASH_ANYONECANPAY) + */ +/** + * @typedef TxInputForSig + * @prop {String} [address] - BaseCheck58-encoded pubKeyHash + * @prop {String} [txId] - (deprecated) see .txid + * @prop {String} txid - hex (not pre-reversed) + * @prop {Uint32} outputIndex - index in previous tx's output (vout index) + * @prop {Uint53} [satoshis] - (included for convenience as type hack) + * @prop {String} [signature] - (included as type hack) + * @prop {String} [script] - the previous lock script (default: derived from public key as p2pkh) + * @prop {String} [publicKey] - hex-encoded public key (typically starts with a 0x02 or 0x03 prefix) + * @prop {String} [pubKeyHash] - the 20-byte pubKeyHash (address without magic byte or checksum) + * @prop {String} [sequence] - the 4-byte sequence (typically ffffffff) + * @prop {Uint32} [sigHashType] - typically 0x81 (SIGHASH_ALL|SIGHASH_ANYONECANPAY) + */ +/** + * @typedef TxInputRaw + * @prop {String} [address] - BaseCheck58-encoded pubKeyHash + * @prop {Uint53} [satoshis] - for convenience + * @prop {String} [txId] - deprecated + * @prop {String} txid - hex (not pre-reversed) + * @prop {Uint32} outputIndex - index in previous tx's output (vout index) + * @prop {String} [sequence] - the 4-byte sequence (typically ffffffff) + */ +/** + * @typedef TxInputUnspent + * @prop {String} [address] - BaseCheck58-encoded pubKeyHash + * @prop {Uint53} satoshis + * @prop {String} [txId] - deprecated + * @prop {String} txid - hex (not pre-reversed) + * @prop {Uint32} outputIndex - index in previous tx's output (vout index) + */ +/** + * @typedef TxInputSortable + * @prop {String} [txId] - deprecated + * @prop {String} txid + * @prop {Uint32} outputIndex + */ +/** + * @typedef TxHasSats + * @prop {Uint53} satoshis + */ +/** + * @typedef {Pick} TxInputSigned + */ +/** + * @typedef TxOutput + * @prop {String?} [memo] - hex bytes of a memo (incompatible with pubKeyHash / address) + * @prop {String?} [message] - memo, but as a UTF-8 string + * @prop {String} [address] - payAddr as Base58Check (human-friendly) + * @prop {String} [pubKeyHash] - payAddr's raw hex value (decoded, not Base58Check) + * @prop {Uint53} satoshis - the number of smallest units of the currency + */ +/** + * @typedef TxOutputSortable + * @prop {Uint53} satoshis + * @prop {String} [script] - hex bytes in wire order + * @prop {String?} [memo] - 0x6a, hex bytes + * @prop {String} [pubKeyHash] - 0x76, 0xa9, hex bytes + * @prop {String} [address] - 0x76, 0xa9, base58check bytes + */ +// Func Defs +/** + * @callback TxAddrToPubKeyHash + * @param {String} addr + * @returns {String} - pkh hex + */ +/** + * Calculate the min, mid, and max sizes, which are 25%, 75%, and 100% likely + * to match the signed byte size (which varies randomly on each signing due to + * padding bytes). If in doubt, start with the mid as the fee and if the signed + * tx is larger, increment by one and repeat until the fee is greater than the + * size. + * @callback TxAppraise + * @param {TxInfo} txInfo + * @returns {TxFees} + */ +/** + * @callback TxAppraiseCounts + * @param {Uint32} numInputs + * @param {Uint32} numOutputs + * @param {Uint32} [extraSize] - for memos + * @returns {TxFees} + */ +/** + * @callback TxAppraiseMemos + * @param {Array} outputs + * @returns {Uint32} + */ +/** + * @callback TxCreatePkhScript + * @param {Hex} pubKeyHash + * @returns {Hex} - ${OP_DUP}${OP_HASH160}${PKH_SIZE}${pubKeyHash}${OP_EQUALVERIFY}${OP_CHECKSIG} + */ +// /** +// * @callback TxCreateSigned +// * @param {Object} opts +// * @param {Uint16} [opts.version] +// * @param {Uint16} [opts.type] +// * @param {Array} opts.inputs +// * @param {Array} opts.outputs +// * @param {Uint32} [opts.locktime] +// * @param {Hex} [opts.extraPayload] +// * @param {Boolean} [opts._debug] - bespoke debug output +// * @param {String} [opts.sigHashType] - hex, typically 01 (ALL) +// */ +/** + * @callback TxGetId + * @param {String} txHex - signable tx hex (like raw tx, but with (sig)script) + * @returns {Promise} - the reversed double-sha256sum of a ready-to-broadcast tx hex + */ +/** + * @callback TxGetPrivateKey + * @param {TxInputForSig} txInput + * @param {Uint53} [i] + * @param {Array} [txInputs] + * @returns {Promise} - private key Uint8Array + */ +/** + * @callback TxGetPublicKey + * @param {TxInputForSig} txInput + * @param {Uint53} [i] + * @param {Array} [txInputs] + * @returns {Promise} - public key Uint8Array + */ +/** + * @callback TxHashAndSignAll + * @param {TxInfo} txInfo + * @param {Uint32} [sigHashType] + * @returns {Promise} + */ +/** + * @callback TxHashAndSignInput + * @param {Uint8Array} privBytes + * @param {TxInfo} txInfo + * @param {Uint32} i + * @param {Uint32} [sigHashType] + * @returns {Promise} + */ +/** + * @callback TxDoubleSha256 + * @param {Uint8Array} txBytes - signable tx bytes (like raw tx, but with (lock)script) + * @returns {Promise} + */ +/** + * @callback TxHexToBytes + * @param {String} hex + * @returns {Uint8Array} + */ +/** + * @callback TxCreateLegacyTx + * @param {Array} coins + * @param {Array} outputs + * @param {TxOutput} changeOutput - object with 0 satoshis and change address, pubKeyHash, or script + * @returns {Promise} + */ +/** + * @callback TxParseRequest + * @param {Hex} hex - a tx request with unsigned or partially signed inputs + * @returns {TxInfo} + */ +/** + * @callback TxParseSigHash + * @param {Hex} hex - a ready-to-sign tx with input script and trailing sighash byte + * @returns {TxInfo} + */ +/** + * @callback TxParseSigned + * @param {Hex} hex - a fully signed, ready-to-broadcast transaction + * @returns {TxInfo} + */ +/** + * @callback TxParseUnknown + * @param {Hex} hex - a tx request, hashable tx, or signed tx + * @returns {TxInfo} + */ +/** + * @callback TxReverseHex + * @param {String} hex + * @returns {String} - hex pairs in reverse order + */ +// /** +// * @callback TxSerializeForSig +// * @param {Object} txInfo +// * @param {Uint16} [txInfo.version] +// * @param {Uint16} [txInfo.type] +// * @param {Array} txInfo.inputs +// * @param {Uint32} [txInfo.locktime] +// * @param {Array} txInfo.outputs +// * @param {Hex?} [txInfo.extraPayload] - extra payload +// * @param {Boolean} [txInfo._debug] - bespoke debug output +// * @param {Uint32?} sigHashType +// */ +/** + * @callback TxSerializeOutputs + * @param {Array} txOutputs + * @param {Object} [_opts] + * @param {Array} [_opts._tx] + * @param {String} [_opts._sep] + */ +/** + * @callback TxSign + * @param {TxPrivateKey} privateKey + * @param {Uint8Array} txHashBytes + * @returns {Promise} - buf + */ +/** + * @callback TxSortBySats + * @param {TxHasSats} a + * @param {TxHasSats} b + * @returns {Uint8} + */ +/** + * @callback TxSortInputs + * @param {TxInputSortable} a + * @param {TxInputSortable} b + * @returns {Uint8} + */ +/** + * @callback TxSortOutputs + * @param {TxOutputSortable} a + * @param {TxOutputSortable} b + * @returns {Uint8} + */ +/** + * @callback TxSum + * @param {Array} coins + * @returns {Uint53} + */ +/** + * @callback TxToDash + * @param {Uint53} satoshis + * @returns {Float64} - float + */ +/** + * @callback TxToSats + * @param {Float64} dash - as float (decimal) DASH, not uint satoshis + * @returns {Uint53} - duffs + */ +/** + * @callback TxToPublicKey + * @param {TxPrivateKey} privateKey - buf + * @returns {Promise} - public key buf + */ +/** + * Caution: JS can't handle 64-bit ints + * @callback TxToVarInt + * @param {BigInt|Uint53} n - 64-bit BigInt or < 53-bit Number + * @returns {String} - hex + */ +/** + * @callback TxToVarIntSize + * @param {BigInt|Uint53} n + * @returns {Uint8} - byte size of n + */ +/** + * @callback TxBytesToHex + * @param {Uint8Array} buf + * @returns {String} + */ +/** + * @callback TxStringToHex + * @param {String} utf8 + * @returns {String} - encoded bytes as hex + */ +/** + * @callback TxToUint32LE + * @param {Uint32} n + * @returns {Hex} + */ +/** + * @callback TxToUint64LE + * @param {Uint32} n + * @returns {Hex} + */ diff --git a/dashplatform.js b/dashplatform.js deleted file mode 100644 index c915a8d..0000000 --- a/dashplatform.js +++ /dev/null @@ -1,50 +0,0 @@ -//@ts-ignore -var DashPlatform = ("object" === typeof module && exports) || {}; -(function (window, DashPlatform) { - "use strict"; - - let DashTx = window.DashTx || require("dashtx"); - - let Tx = {}; - - /** - * ex: 01 01 40420f00 00000000 19 76a914cdfca4ae1cf2333056659a2c 8dc656f36d228402 - * @param {Object} opts - * @param {Uint8} [opts.version] - * @param {Array} opts.creditOutputs - */ - Tx.packAssetLock = function ({ version = 1, creditOutputs }) { - let versionHex = DashTx.utils.toUint32LE(version); - versionHex = versionHex.slice(0, 2); - - let lenHex = DashTx.utils.toUint32LE(creditOutputs.length); - lenHex = lenHex.slice(0, 2); - - let hexes = [`${versionHex}${lenHex}`]; - for (let creditOutput of creditOutputs) { - //@ts-ignore - TODO check type of TxOutput - let script = creditOutput.script; - let satsHexLE = DashTx.utils.toUint64LE(creditOutput.satoshis); - if (!script) { - script = `${satsHexLE}1976a914${creditOutput.pubKeyHash}88ac`; - } - let assetLock = `${script}`; - hexes.push(assetLock); - } - - return hexes.join(""); - }; - - //@ts-ignore - DashPlatform.Tx = Tx; - - // @ts-ignore - window.DashPlatform = DashPlatform; -})(("object" === typeof window && window) || {}, DashPlatform); -if ("object" === typeof module) { - module.exports = DashPlatform; -} - -/** @typedef {Number} Uint32 */ -/** @typedef {Number} Uint8 */ -/** @typedef {String} Hex */ diff --git a/demo-static.js b/demo-static.js new file mode 100644 index 0000000..766d966 --- /dev/null +++ b/demo-static.js @@ -0,0 +1,858 @@ +"use strict"; + +import Dotenv from "dotenv"; +import DashPhrase from "dashphrase"; +import DashHd from "./src/dashhd-utils.ts"; +import DashKeys from "dashkeys"; +import * as DashTx from "dashtx"; +import * as DashPlatform from "./src/dashplatform.js"; +import * as Bincode from "./src/bincode.ts"; +import * as DashBincode from "./1.8.1/generated_bincode.js"; +import * as QRCode from "./src/_qr.js"; + +import * as KeyUtils from "./src/key-utils.js"; + +Dotenv.config({ path: ".env" }); + +let RPC_AUTH_URL = "https://api:null@trpc.digitalcash.dev"; + +// const L1_VERSION_PLATFORM = 3; +const L1_VERSION_PLATFORM = 0; +const TYPE_ASSET_LOCK = 8; +// const L2_VERSION_PLATFORM = 1; // actually constant "0" ?? +const ST_CREATE_IDENTITY = 2; + +let KEY_LEVELS = { + 0: "MASTER", + 1: "CRITICAL", + 2: "HIGH", + 3: "MEDIUM", + MASTER: 0, + CRITICAL: 1, + HIGH: 2, + MEDIUM: 3, +}; + +let KEY_PURPOSES = { + 0: "AUTHENTICATION", + 1: "ENCRYPTION", + 2: "DECRYPTION", + 3: "TRANSFER", + 4: "SYSTEM", + 5: "VOTING", + AUTHENTICATION: 0, + ENCRYPTION: 1, + DECRYPTION: 2, + TRANSFER: 3, + SYSTEM: 4, + VOTING: 5, +}; + +let KEY_TYPES = { + 0: "ECDSA_SECP256K1", + ECDSA_SECP256K1: 0, +}; + +let network = "testnet"; +let coinType = 5; // DASH +if (network === "testnet") { + coinType = 1; // testnet +} +//coinType = 1; + +let identityEcdsaPath = ""; +{ + // m/purpose'/coin_type'/feature'/subfeature'/keytype'/identityindex'/keyindex' + // ex: m/9'/5'/5'/0'/0'// + let purposeDip13 = 9; + let featureId = 5; + let subfeatureKey = 0; + let keyType = KEY_TYPES.ECDSA_SECP256K1; + identityEcdsaPath = `m/${purposeDip13}'/${coinType}'/${featureId}'/${subfeatureKey}'/${keyType}'`; +} + +const hdOpts = { version: "testnet" }; + +async function createPlatformIdentity(walletKey, coinType, identityIndex) { + let authWalletPath = `m/9'/${coinType}'/5'/0'/0'/${identityIndex}'`; + //@ts-expect-error - monkey patch + let authWallet = await DashHd.deriveIdentAuthWalletPath( + walletKey, + authWalletPath, + ); + let authMasterAddress = await authWallet.deriveAuthKey(0); + let authOtherAddress = await authWallet.deriveAuthKey(1); + + let regFundAddressPath = `m/9'/${coinType}'/5'/1'/${identityIndex}`; + //@ts-expect-error - monkey patch + let regFundAddress = await DashHd.deriveIdentRegFundKeyPath( + walletKey, + regFundAddressPath, + ); + let assetAddress = await DashHd.deriveChild( + regFundAddress, + 0, + DashHd.HARDENED, + ); + + let topupAddressPath = `m/9'/${coinType}'/5'/2'/0`; + //@ts-expect-error - monkey patch + let topupAddress = await DashHd.deriveIdentTopupKeyPath( + walletKey, + topupAddressPath, + ); + + console.log(); + console.log(`Identity Index: ${identityIndex}, Topup Index: 0`); + console.log( + "Funding WIF", + await DashHd.toWif(regFundAddress.privateKey, hdOpts), + ); + console.log( + "Asset WIF", + await DashHd.toWif(assetAddress.privateKey, hdOpts), + "(would be ephemeral, non-hd)", + ); + console.log( + "Auth master WIF", + await DashHd.toWif(authMasterAddress.privateKey, hdOpts), + ); + console.log( + "Auth other WIF", + await DashHd.toWif(authOtherAddress.privateKey, hdOpts), + ); + console.log( + "Topup WIF", + await DashHd.toWif(topupAddress.privateKey, hdOpts), + "(will be used for change)", + ); + console.log(); + + return regFundAddress +} + +async function main() { + let walletPhrase = process.env.DASH_WALLET_PHRASE; + let walletSalt = process.env.DASH_WALLET_SALT ?? ""; + if (!walletPhrase) { + console.error(""); + console.error("ERROR"); + console.error(" 'DASH_WALLET_PHRASE' is not set"); + console.error(""); + console.error("SOLUTION"); + let newPhrase = await DashPhrase.generate(); + console.error(` echo 'DASH_WALLET_PHRASE="${newPhrase}"' >> .env`); + console.error(` echo 'DASH_WALLET_SALT=""' >> .env`); + console.error(""); + process.exit(1); + return; + } + + let identityIndexStr = process.argv[2]; + let identityIndex = parseInt(identityIndexStr, 10); + if (isNaN(identityIndex)) { + console.error(""); + console.error("USAGE"); + console.error(" ./demo.js "); + console.error(""); + console.error("EXAMPLE"); + console.error(" ./demo.js 0"); + console.error(""); + process.exit(1); + return; + } + + let coinType = 5; + let testnet = true; + if (testnet) { + coinType = 1; + } + + let seed = await DashPhrase.toSeed(walletPhrase, walletSalt); + let walletKey = await DashHd.fromSeed(seed); + + let regFundAddress = await createPlatformIdentity(walletKey, coinType, identityIndex); + + let fundingAddress = await DashHd.toAddr(regFundAddress.publicKey, hdOpts); + let [oldDeltas, newDeltas] = await Promise.all([ + DashTx.utils.rpc(RPC_AUTH_URL, "getaddressdeltas", { + addresses: [fundingAddress], + }), + DashTx.utils.rpc(RPC_AUTH_URL, "getaddressmempool", { + addresses: [fundingAddress], + }), + ]); + let deltas = oldDeltas.concat(newDeltas); + let total = DashTx.sum(deltas); + let minimum = 100000000 + 10000 + 200; + let needed = minimum - total; + if (needed > 0) { + let dashAmount = DashTx.toDash(needed); + let content = `dash:${fundingAddress}?amount=${dashAmount}`; + let ascii = QRCode.ascii(content, { + indent: 3, + padding: 4, + width: 256, + height: 256, + color: "#000000", + background: "#ffffff", + ecl: "M", + }); + console.error(); + console.error(`ERROR`); + console.error( + ` not enough DASH at funding address (including instant send)`, + ); + console.error(); + console.error(`SOLUTION`); + console.error(` send ${dashAmount} to ${fundingAddress}`); + console.error(``); + console.error(ascii); + console.error(); + process.exit(1); + } + deltas.reverse(); + // console.log(deltas); + + let fundingUtxos = []; + for (let delta of deltas) { + if (delta.satoshis < 0) { + // TODO pair the inputs and outputs + // (this check only works for exact-match, sequenced debits and credits) + break; + } + fundingUtxos.push(delta); + } + console.log(`fundingUtxos:`); + console.log(fundingUtxos); + + // void (await WasmDpp.default()); + + let dashTx = DashTx.create(KeyUtils); + + let fundingPkh = await DashKeys.pubkeyToPkh(regFundAddress.publicKey); + let fundingPkhHex = DashKeys.utils.bytesToHex(fundingPkh); + //@ts-expect-error - incorrect type on version + let fundingAddr = await DashKeys.pkhToAddr(fundingPkh, hdOpts); + console.log( + `# DEBUG funding (${fundingPkhHex}):\ntouch ./${fundingAddr}.wif`, + ); + + for (let utxo of fundingUtxos) { + // satoshis: 100010200, + // txid: 'd17ef0f2b5093f7be6582b964f911946665a022e0c64fc084ce9955dfbe56171', + // index: 0, + // blockindex: 1, + // height: 1215439, + // address: 'yLqCzEXH2w3HH95sKrzy78d2mt9d1eP8BD' + Object.assign(utxo, { + txId: utxo.txid, + txidHex: DashTx.utils.reverseHex(utxo.txid), + outputIndexHex: utxo.index.toString(16).padStart(8, "0"), + outputIndex: utxo.index, + scriptSizeHex: "19", + scriptSize: 25, + script: `76a914${fundingPkhHex}88ac`, + // sequence: "00000000", + // sigHashType: DashTx.SIGHASH_ALL, + }); + } + process.exit(1); + + let assetLockPrivateKeyHex = + "33a9f0603ba69b97dff83e08b4ee36cebbc987739e9749615e1727754f2bf2d2"; + let assetLockPrivateKey = DashKeys.utils.hexToBytes(assetLockPrivateKeyHex); + let assetLockWif = await DashKeys.privKeyToWif(assetLockPrivateKey); + let assetLockPublicKey = await KeyUtils.toPublicKey(assetLockPrivateKey); + let assetLockPkh = await DashKeys.pubkeyToPkh(assetLockPublicKey); + // 271c99481ce1460e4fd62d5a11eecc123d78ee32 + let assetLockPkhHex = DashKeys.utils.bytesToHex(assetLockPkh); + // yPtFTm5svi9DFp3yLXf2HV4N5WF9ePLHFs + let assetLockAddr = await DashKeys.pkhToAddr(assetLockPkh, { + version: "testnet", + }); + console.log( + `# DEBUG asset lock (${assetLockPkhHex}):\necho '${assetLockWif}' > ./${assetLockAddr}.wif`, + ); + + // KeyUtils.set(fundingAddr, { + // address: fundingAddr, + // privateKey: fundingPrivateKey, + // publicKey: fundingPublicKey, + // pubKeyHash: fundingPkhHex, + // }); + + // using junk key because we're missing the funding private key + KeyUtils.set(fundingAddr, { + address: fundingAddr, + privateKey: assetLockPrivateKey, // TODO + publicKey: assetLockPublicKey, // TODO + pubKeyHash: fundingPkhHex, + }); + + // the test fixture was quick'n'dirty / unhygienic, hence the reuse of keys + let changePkhHex = fundingPkhHex; + let changePkh = fundingPkh; + // yYo3PeSBv2rMnJeyLUCCzx4Y8VhPppZKkC + let changeAddr = fundingAddr; + await DashKeys.pkhToAddr(changePkh, { version: "testnet" }); + console.log(`DEBUG change address: ${changeAddr} (${changePkhHex})`); + + let masterPrivateKeyHex = + "6c554775029f960891e3edf2d36b26a30d9a4b10034bb49f3a6c4617f557f7bc"; + let masterPrivateKey = DashKeys.utils.hexToBytes(masterPrivateKeyHex); + let masterWif = await DashKeys.privKeyToWif(masterPrivateKey); + let masterPublicKey = await KeyUtils.toPublicKey(masterPrivateKey); + let masterPkh = await DashKeys.pubkeyToPkh(masterPublicKey); + // 98f913d35dd0508e3a6b8bb0c4250221c831f3f8 + let masterPkhHex = DashKeys.utils.bytesToHex(masterPkh); + + // yaGHwZkYKSjkMnqX5N1MwrByRxv1Pb8fNY + let masterAddr = await DashKeys.pkhToAddr(masterPkh, { + version: "testnet", + }); + console.log( + `# DEBUG master key (${masterPkhHex}):\necho '${masterWif}' > ./${masterAddr}.wif`, + ); + + let otherPrivateKeyHex = + "426ae4838204206cacdfc7a2e04ac6a2d9e3c2e94df935878581c552f22b0096"; + let otherPrivateKey = DashKeys.utils.hexToBytes(otherPrivateKeyHex); + let otherWif = await DashKeys.privKeyToWif(otherPrivateKey); + let otherPublicKey = await KeyUtils.toPublicKey(otherPrivateKey); + let otherPkh = await DashKeys.pubkeyToPkh(otherPublicKey); + // d8d7386f71d85c85d46ebc06680571d4e0fb4263 + let otherPkhHex = DashKeys.utils.bytesToHex(otherPkh); + // yg5zdRAgB6EYFSownkupECHyJfuwghbuLA + let otherAddr = await DashKeys.pkhToAddr(otherPkh, { + version: "testnet", + }); + console.log( + `# DEBUG other key (${otherPkhHex}):\necho '${otherWif}' > ./${otherAddr}.wif`, + ); + + // let totalSats = 100005200; // 200 for fee + let transferSats = 100000000; + let changeSats = 5000; + let burnOutput = { memo: "", satoshis: transferSats }; + let changeOutput = { satoshis: changeSats, pubKeyHash: changePkhHex }; + let assetExtraOutput = { + satoshis: transferSats, + pubKeyHash: assetLockPkhHex, + }; + + //@ts-expect-error - TODO add types + let assetLockScript = DashPlatform.Tx.packAssetLock({ + version: 0, + creditOutputs: [assetExtraOutput], + }); + let txDraft = { + version: L1_VERSION_PLATFORM, + type: TYPE_ASSET_LOCK, + inputs: fundingUtxos, + outputs: [burnOutput, changeOutput], + extraPayload: assetLockScript, + }; + console.log(); + console.log(`txDraft:`); + console.log(txDraft); + + // txDraft.inputs.sort(DashTx.sortInputs); + // txDraft.outputs.sort(DashTx.sortOutputs); + let vout = txDraft.outputs.indexOf(burnOutput); + + let txProof = DashTx.createRaw(txDraft); + txProof.inputs[0].script = + "76a91488d9931ea73d60eaf7e5671efc0552b912911f2a88ac"; + txProof.inputs[0].sequence = "00000000"; // Non-final DashTx.NON_FINAL = "00000000" + //@ts-expect-error + let txProofHex = await DashTx.serialize(txProof, null); + console.log(`txProof:`, txProof); + console.log(txProofHex); + let txSigned = await dashTx.hashAndSignAll(txDraft); + // console.log(); + // console.log(`txSigned:`); + // console.log(txSigned); + + // let txid = await DashTx.utils.rpc( + // RPC_AUTH_URL, + // "sendrawtransaction", + // txSigned.transaction, + // ); + + // const INSTANT_ALP = 0; + // const CHAIN_ALP = 1; + + // let blockchaininfo = await DashTx.utils.rpc(RPC_AUTH_URL, "getblockchaininfo"); + // let nextBlock = blockchaininfo.blocks + 1; + + // TODO - AJ is here + console.log(`DEBUG funding outpoint`); + let outpoint = await getFundingOutPoint(txSigned.transaction, vout); + console.log(outpoint); + let fundingOutPointHex = `${outpoint.txid}${outpoint.voutHex}`; + console.log(fundingOutPointHex); + let identityId = await createIdentityId(fundingOutPointHex); + console.log(identityId); + + /** + * @param {any} magicZmqEmitter + * @returns {Promise} + */ + async function getAssetLockInstantProof(magicZmqEmitter) { + let assetLockInstantProof = { + // type: INSTANT_ALP, + // ex: 01 v1 + // 01 1 input + // 1dbbda5861b12d7523f20aa5e0d42f52de3dcd2d5c2fe919ba67b59f050d206e prev txid + // 00000000 prev vout + // 58c444dd0957767db2c0adea69fd861792bfa75c7e364d83fe85bebebc2a08b4 txid + // 36a56617591a6a89237bada6af1f9b46eba47b5d89a8c4e49ff2d0236182307c cycle hash + // 8967c46529a967b3822e1ba8a173066296d02593f0f59b3a LLMQ BLS Sig + // 78a30a7eef9c8a120847729e62e4a32954339286b79fe759 + // 0221331cd28d576887a263f45b595d499272f656c3f51769 + // 87c976239cac16f972d796ad82931d532102a4f95eec7d80 + // instant_lock: await magicZmqEmitter.once( + // "zmqpubrawtxlocksig", + // /** @param {any} instantLock */ + // function (instantLock) { + // return instantLock.toBase64(); + // }, + // ), + // not sure what "previous outpoint" this refers to, as its not the one in the transaction + instant_lock: DashBincode.BinaryData(DashTx.utils.hexToBytes( + "01011dbbda5861b12d7523f20aa5e0d42f52de3dcd2d5c2fe919ba67b59f050d206e0000000058c444dd0957767db2c0adea69fd861792bfa75c7e364d83fe85bebebc2a08b436a56617591a6a89237bada6af1f9b46eba47b5d89a8c4e49ff2d0236182307c8967c46529a967b3822e1ba8a173066296d02593f0f59b3a78a30a7eef9c8a120847729e62e4a32954339286b79fe7590221331cd28d576887a263f45b595d499272f656c3f5176987c976239cac16f972d796ad82931d532102a4f95eec7d80", + )), + transaction: DashBincode.BinaryData(DashTx.utils.hexToBytes(txProofHex)), + // output_index: DashTx.utils.hexToBytes(vout), + output_index: vout, + }; + return DashBincode.AssetLockProof.Instant(assetLockInstantProof); + } + + /** + * @returns {Promise} + */ + async function getAssetLockChainProof() { + return DashBincode.AssetLockProof.Chain({ + // type: CHAIN_ALP, + core_chain_locked_height: nextBlock, + // out_point: fundingOutPointHex, + out_point: { + txid: DashBincode.Txid(DashTx.utils.hexToBytes(outpoint.txid)), + vout: vout, + }, + }); + } + + let assetLockProof; + let weEvenKnowHowToGetIsdlock = true; + if (weEvenKnowHowToGetIsdlock) { + assetLockProof = await getAssetLockInstantProof(null); + } else { + assetLockProof = await getAssetLockChainProof(); + } + + // let idIndex = 0; // increment to first unused + // let identityKeys = await getIdentityKeys(walletKey, idIndex); + let identityKeys = await getKnownIdentityKeys( + { privateKey: masterPrivateKey, publicKey: masterPublicKey }, + { privateKey: otherPrivateKey, publicKey: otherPublicKey }, + ); + let stKeys = await getIdentityTransitionKeys(identityKeys); + + // { + // '$version': '0', + // public_keys: [ + // { + // '$version': '0', + // id: 0, + // type: 0, + // purpose: 0, + // security_level: 0, + // contract_bounds: null, + // read_only: false, + // data: [Uint8Array], + // signature: [Uint8Array] + // }, + // { + // '$version': '0', + // id: 1, + // type: 0, + // purpose: 0, + // security_level: 1, + // contract_bounds: null, + // read_only: false, + // data: [Uint8Array], + // signature: [Uint8Array] + // } + // ], + // asset_lock_proof: { + // instant_lock: Uint8Array(198) [ + // 1, 1, 29, 187, 218, 88, 97, 177, 45, 117, 35, 242, + // 10, 165, 224, 212, 47, 82, 222, 61, 205, 45, 92, 47, + // 233, 25, 186, 103, 181, 159, 5, 13, 32, 110, 0, 0, + // 0, 0, 88, 196, 68, 221, 9, 87, 118, 125, 178, 192, + // 173, 234, 105, 253, 134, 23, 146, 191, 167, 92, 126, 54, + // 77, 131, 254, 133, 190, 190, 188, 42, 8, 180, 54, 165, + // 102, 23, 89, 26, 106, 137, 35, 123, 173, 166, 175, 31, + // 155, 70, 235, 164, 123, 93, 137, 168, 196, 228, 159, 242, + // 208, 35, 97, 130, + // ... 98 more items + // ], + // transaction: Uint8Array(158) [ + // 0, 0, 8, 0, 1, 88, 132, 229, 219, 157, 226, 24, + // 35, 134, 113, 87, 35, 64, 178, 7, 238, 133, 182, 40, + // 7, 78, 126, 70, 112, 150, 194, 103, 38, 107, 175, 119, + // 164, 0, 0, 0, 0, 25, 118, 169, 20, 136, 217, 147, + // 30, 167, 61, 96, 234, 247, 229, 103, 30, 252, 5, 82, + // 185, 18, 145, 31, 42, 136, 172, 0, 0, 0, 0, 2, + // 0, 225, 245, 5, 0, 0, 0, 0, 2, 106, 0, 136, + // 19, 0, 0, 0, 0, 0, 0, 25, 118, 169, 20, 136, + // 217, 147, 30, 167, + // ... 58 more items + // ], + // output_index: 0 + // }, + // user_fee_increase: 0, + // signature: Uint8Array(65) [ + // 31, 234, 28, 94, 59, 12, 146, 200, 208, 47, 213, + // 44, 71, 254, 95, 33, 90, 130, 141, 5, 195, 23, + // 169, 151, 164, 163, 65, 154, 23, 185, 38, 11, 151, + // 23, 204, 238, 38, 3, 191, 90, 228, 17, 187, 161, + // 171, 142, 29, 11, 188, 49, 203, 215, 61, 125, 111, + // 239, 205, 180, 254, 179, 70, 87, 178, 229, 9 + // ], + // identity_id: Uint8Array(32) [ + // 61, 201, 8, 89, 158, 248, 165, 163, + // 197, 16, 196, 48, 162, 125, 66, 17, + // 200, 5, 85, 109, 153, 229, 192, 111, + // 252, 60, 168, 106, 95, 235, 85, 195 + // ] + // } + + let stateTransition = { + //protocolVersion: L2_VERSION_PLATFORM, + $version: "0", + type: ST_CREATE_IDENTITY, + // ecdsaSig(assetLockPrivateKey, CBOR(thisStateTransition)) + // "signature":"IBTTgge+/VDa/9+n2q3pb4tAqZYI48AX8X3H/uedRLH5dN8Ekh/sxRRQQS9LaOPwZSCVED6XIYD+vravF2dhYOE=", + asset_lock_proof: assetLockProof, + // publicKeys: stKeys, + public_keys: stKeys, + // [ + // { + // id: 0, + // type: 0, + // purpose: 0, + // securityLevel: 0, + // data: "AkWRfl3DJiyyy6YPUDQnNx5KERRnR8CoTiFUvfdaYSDS", + // readOnly: false, + // }, + // ], + user_fee_increase: 0, + }; + console.log(`stKeys:`); + console.log(stKeys); + + let bcAb = Bincode.encode(DashBincode.StateTransition, stateTransition, { + signable: true, + }); + console.log(`bc (ready-to-sign) AB:`, bcAb); + let bc = new Uint8Array(bcAb); + console.log(`bc (ready-to-sign):`); + console.log(DashTx.utils.bytesToHex(bc)); + console.log(bytesToBase64(bc)); + + let sigBytes = new Uint8Array(65); + sigBytes[0] = 0x1f; + let p1363Bytes = sigBytes.subarray(1); + void (await KeyUtils.signP1363(assetLockPrivateKey, bc, p1363Bytes)); + // let sigHex = DashTx.utils.bytesToHex(sigBytes); + Object.assign(stateTransition, { + identity_id: identityId, + // signature: sigHex, + signature: sigBytes, + }); + for (let i = 0; i < identityKeys.length; i += 1) { + let key = identityKeys[i]; + let stPub = stateTransition.public_keys[i]; + let sigBytes = new Uint8Array(65); + let p1363Bytes = sigBytes.subarray(1); + // This isn't ASN.1, P1363, or SEC1. + // Not sure what it is (possibly bespoke), but 1f seems to be a magic byte + sigBytes[0] = 0x1f; + void (await KeyUtils.signP1363(key.privateKey, bc, p1363Bytes)); + // let sigHex = DashTx.utils.bytesToHex(sigBytes); + Object.assign(stPub, { + // signature: sigHex, + signature: sigBytes, + }); + } + + console.log(JSON.stringify(stateTransition, null, 2)); + + { + let bcAb = Bincode.encode(Bincode.StateTransition, stateTransition, { + signable: false, + }); + let bc = new Uint8Array(bcAb); + console.log(`bc (signed):`); + console.log(DashTx.utils.bytesToHex(bc)); + console.log(bytesToBase64(bc)); + } + + // let identityId = assetLockProof.createIdentifier(); + // let identity = Dpp.identity.create(identityId, dppKeys); + // let signedTransition = signTransition( + // identity, + // assetLockProof, + // assetLockPrivateKeyBuffer, + // ); + + console.log(""); + console.log("TODO"); + console.log(` - how to serialize and broadcast transition via grpc?`); +} + +/** + * @param {Hex} txSignedHex + * @param {Uint32} outputIndex + */ +async function getFundingOutPoint(txSignedHex, outputIndex) { + let txBytes = DashTx.utils.hexToBytes(txSignedHex); + let txidBytes = await DashTx.doubleSha256(txBytes); + let txidBE = DashTx.utils.bytesToHex(txidBytes); + let voutLE = DashTx.utils.toUint32LE(outputIndex); + + return { txid: txidBE, voutHex: voutLE, vout: outputIndex }; +} + +/** + * @param {Hex} fundingOutPointHex + */ +function createIdentityId(fundingOutPointHex) { + let fundingOutPointBytes = DashTx.utils.hexToBytes(fundingOutPointHex); + let identityHashBytes = DashTx.doubleSha256(fundingOutPointBytes); + // let identityId = b58.encode(identityHashBytes); + // return identityId; + return identityHashBytes; +} + +/** + * @param {Required>} masterKey + * @param {Required>} otherKey + * @returns {Promise>} + */ +async function getKnownIdentityKeys(masterKey, otherKey) { + if (!masterKey.privateKey) { + throw new Error("linter fail"); + } + if (!otherKey.privateKey) { + throw new Error("linter fail"); + } + let keyDescs = [ + // {"$version":"0","id":0,"purpose":0,"securityLevel":0,"contractBounds":null,"type":0,"readOnly":false,"data":[3,58,154,139,30,76,88,26,25,135,114,76,102,151,19,93,49,192,126,231,172,130,126,106,89,206,192,34,176,77,81,5,95],"disabledAt":null} + { + id: 0, + type: KEY_TYPES.ECDSA_SECP256K1, + purpose: KEY_PURPOSES.AUTHENTICATION, + securityLevel: KEY_LEVELS.MASTER, + readOnly: false, + publicKey: masterKey.publicKey, + privateKey: masterKey.privateKey, + data: "", + }, + // {"$version":"0","id":1,"purpose":0,"securityLevel":1,"contractBounds":null,"type":0,"readOnly":false,"data":[2,1,70,3,1,141,196,55,100,45,218,22,244,199,252,80,228,130,221,35,226,70,128,188,179,165,150,108,59,52,56,72,226],"disabledAt":null} + { + id: 1, + type: KEY_TYPES.ECDSA_SECP256K1, + purpose: KEY_PURPOSES.AUTHENTICATION, + securityLevel: KEY_LEVELS.CRITICAL, + readOnly: false, + privateKey: otherKey.privateKey, + publicKey: otherKey.publicKey, + data: "", + }, + ]; + return keyDescs; + + // let privKeyDescs = []; + // for (let keyDesc of keyDescs) { + // let key = await DashHd.deriveChild( + // identityKey, + // keyDesc.id, + // DashHd.HARDENED, + // ); + // let privKeyDesc = Object.assign(keyDesc, key); + // privKeyDescs.push(privKeyDesc); // for type info + + // let dppKey = new WasmDpp.IdentityPublicKey(L2_VERSION_PLATFORM); + // dppKey.setId(keyDesc.id); + // dppKey.setData(key.publicKey); + // if (keyDesc.purpose) { + // dppKey.setPurpose(keyDesc.purpose); + // } + // dppKey.setSecurityLevel(keyDesc.securityLevel); + // dppKeys.push(dppKey); + // } + + // return privKeyDescs; +} + +/** + * @typedef EvoKey + * @prop {Uint8} id + * @prop {Uint8} type - TODO constrain to members of KEY_TYPES + * @prop {Uint8} purpose - TODO constrain to members of KEY_PURPOSES + * @prop {Uint8} securityLevel - TODO constrain to members of KEY_LEVELS + * @prop {Boolean} readOnly + * @prop {Uint8Array} publicKey + * @prop {Uint8Array} privateKey + */ + +/** + * @typedef STKey + * @prop {Uint8} id + * @prop {Uint8} type - TODO constrain to members of KEY_TYPES + * @prop {Uint8} purpose - TODO constrain to members of KEY_PURPOSES + * @prop {Base64} data - base64-encoded publicKey (compact) + * @prop {Uint8} securityLevel - TODO constrain to members of KEY_LEVELS + * @prop {Boolean} readOnly + */ + +/** + * @param {Array} identityKeys - TODO + */ +function getIdentityTransitionKeys(identityKeys) { + let stKeys = []; + for (let key of identityKeys) { + // let data = bytesToBase64(key.publicKey); + let stKey = { + $version: "0", + id: key.id, + type: key.type, + purpose: key.purpose, + security_level: key.securityLevel, + contract_bounds: null, + // readOnly: key.readOnly, + read_only: key.readOnly || false, + // data: data, + data: key.publicKey, + // signature: "TODO", + }; + // if ("readOnly" in key) { + // Object.assign(stKey, { readOnly: key.readOnly }); + // } + stKeys.push(stKey); + } + return stKeys; +} + +/** + * @param {Uint8Array} bytes + */ +function bytesToBase64(bytes) { + let binstr = ""; + for (let i = 0; i < bytes.length; i += 1) { + binstr += String.fromCharCode(bytes[i]); + } + + return btoa(binstr); +} + +function signTransition(identity, assetLockProof, assetLockPrivateKey) { + // TODO is assetLockProof the same as txoutproof? + + // Create ST + const identityCreateTransition = + WasmDpp.identity.createIdentityCreateTransition(identity, assetLockProof); + + // Create key proofs + const [stMasterKey, stHighAuthKey, stCriticalAuthKey, stTransferKey] = + identityCreateTransition.getPublicKeys(); + + // Sign master key + + identityCreateTransition.signByPrivateKey( + identityMasterPrivateKey.toBuffer(), + Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1, + ); + + stMasterKey.setSignature(identityCreateTransition.getSignature()); + + identityCreateTransition.setSignature(undefined); + + // Sign high auth key + + identityCreateTransition.signByPrivateKey( + identityHighAuthPrivateKey.toBuffer(), + Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1, + ); + + stHighAuthKey.setSignature(identityCreateTransition.getSignature()); + + identityCreateTransition.setSignature(undefined); + + // Sign critical auth key + + identityCreateTransition.signByPrivateKey( + identityCriticalAuthPrivateKey.toBuffer(), + Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1, + ); + + stCriticalAuthKey.setSignature(identityCreateTransition.getSignature()); + + identityCreateTransition.setSignature(undefined); + + // Sign transfer key + + identityCreateTransition.signByPrivateKey( + identityTransferPrivateKey.toBuffer(), + Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1, + ); + + stTransferKey.setSignature(identityCreateTransition.getSignature()); + + identityCreateTransition.setSignature(undefined); + + // Set public keys back after updating their signatures + identityCreateTransition.setPublicKeys([ + stMasterKey, + stHighAuthKey, + stCriticalAuthKey, + stTransferKey, + ]); + + // Sign and validate state transition + + identityCreateTransition.signByPrivateKey( + assetLockPrivateKey, + Dpp.IdentityPublicKey.TYPES.ECDSA_SECP256K1, + ); + + // TODO(versioning): restore + // @ts-ignore + // const result = await Dpp.stateTransition.validateBasic( + // identityCreateTransition, + // // TODO(v0.24-backport): get rid of this once decided + // // whether we need execution context in wasm bindings + // new StateTransitionExecutionContext(), + // ); + + // if (!result.isValid()) { + // const messages = result.getErrors().map((error) => error.message); + // throw new Error(`StateTransition is invalid - ${JSON.stringify(messages)}`); + // } + + return identityCreateTransition; +} + +main(); + +/** @typedef {String} Base58 */ +/** @typedef {String} Base64 */ +/** @typedef {String} Hex */ +/** @typedef {Number} Uint53 */ +/** @typedef {Number} Uint32 */ +/** @typedef {Number} Uint8 */ diff --git a/demo.js b/demo.js index df83eea..617a315 100644 --- a/demo.js +++ b/demo.js @@ -4,10 +4,10 @@ let DashPhrase = require("dashphrase"); let DashHd = require("dashhd"); let DashKeys = require("dashkeys"); let DashTx = require("dashtx"); -let DashPlatform = require("./dashplatform.js"); +let DashPlatform = require("./src/dashplatform.js"); let CBOR = require("cbor"); -let KeyUtils = require("./key-utils.js"); +let KeyUtils = require("./src/key-utils.js"); // let DapiGrpc = require("@dashevo/dapi-grpc"); let WasmDpp = require("@dashevo/wasm-dpp"); @@ -16,7 +16,7 @@ let Dpp = WasmDpp.DashPlatformProtocol; //@ts-ignore - sssssh, yes Base58 does exist let b58 = DashKeys.Base58.create(); -let rpcAuthUrl = "https://api:null@trpc.digitalcash.dev"; +let RPC_AUTH_URL = "https://api:null@trpc.digitalcash.dev"; const L1_VERSION_PLATFORM = 3; const TYPE_ASSET_LOCK = 8; @@ -136,7 +136,7 @@ async function main() { pubKeyHash: pkh, }); - let utxos = await DashTx.utils.rpc(rpcAuthUrl, "getaddressutxos", { + let utxos = await DashTx.utils.rpc(RPC_AUTH_URL, "getaddressutxos", { addresses: [addr], }); let total = DashTx.sum(utxos); @@ -174,7 +174,7 @@ async function main() { console.log(txSigned); // let txid = await DashTx.utils.rpc( - // rpcAuthUrl, + // RPC_AUTH_URL, // "sendrawtransaction", // txSigned.transaction, // ); @@ -182,7 +182,7 @@ async function main() { const INSTANT_ALP = 0; const CHAIN_ALP = 1; - let blockchaininfo = await DashTx.utils.rpc(rpcAuthUrl, "getblockchaininfo"); + let blockchaininfo = await DashTx.utils.rpc(RPC_AUTH_URL, "getblockchaininfo"); let nextBlock = blockchaininfo.blocks + 1; let fundingOutPointHex = await getFundingOutPointHex( diff --git a/jsconfig.json b/doc/tsconfig.json similarity index 85% rename from jsconfig.json rename to doc/tsconfig.json index cf40d33..4fb755f 100644 --- a/jsconfig.json +++ b/doc/tsconfig.json @@ -1,7 +1,6 @@ { "compilerOptions": { /* Visit https://aka.ms/tsconfig to read more about this file */ - /* Projects */ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ @@ -9,9 +8,8 @@ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - /* Language and Environment */ - "target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ @@ -23,15 +21,17 @@ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ + "module": "commonjs", /* Specify what module code is generated. */ // "rootDir": "./", /* Specify the root folder within your source files. */ - "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - "typeRoots": ["./typings","./node_modules/@types"], /* Specify multiple folders that act like './node_modules/@types'. */ + "typeRoots": [ + "./typings", + "./node_modules/@types" + ], /* Specify multiple folders that act like './node_modules/@types'. */ // "types": [], /* Specify type package names to be included without being referenced in a source file. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ @@ -42,12 +42,11 @@ // "resolveJsonModule": true, /* Enable importing .json files. */ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - + "allowImportingTsExtensions": true, /* JavaScript Support */ - "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - /* Emit */ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ // "declarationMap": true, /* Create sourcemaps for d.ts files. */ @@ -57,7 +56,7 @@ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ // "outDir": "./", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - "noEmit": true, /* Disable emitting files from a compilation. */ + "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ @@ -72,25 +71,23 @@ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - /* Interop Constraints */ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ - "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + "strict": true, /* Enable all strict type-checking options. */ + "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ @@ -101,16 +98,15 @@ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ + "skipLibCheck": false /* Skip type checking all .d.ts files. */ }, "include": [ - "*.js", - "bin/**/*.js", - "lib/**/*.js", - "src/**/*.js" -], - "exclude": ["node_modules"] + "../bincode.ts", + "../1.8.1/generated_bincode.d.ts" + ], + "exclude": [ + "node_modules" + ] } \ No newline at end of file diff --git a/experiment/experiment.ts b/experiment/experiment.ts new file mode 100644 index 0000000..776a808 --- /dev/null +++ b/experiment/experiment.ts @@ -0,0 +1,259 @@ +// import * as bip39 from 'bip39'; +// import { BIP32Factory } from 'bip32'; +// import * as ecc from '@bitcoinerlab/secp256k1'; +import { sha256 } from "js-sha256"; +// import * as bip44 from 'bip44-constants'; + +import * as grpc from "@grpc/grpc-js"; +import * as protoLoader from "@grpc/proto-loader"; +import { UnaryCall } from "./ts/grpc-promisify.js"; +import { ProtoGrpcType as CoreProtoGrpcType } from "./proto/core.ts"; +import { ProtoGrpcType as PlatformProtoGrpcType } from "./proto/platform.ts"; + +import * as Tx from "dashtx"; +import * as KeyUtils from "../key-utils.js"; + +import * as Bincode from "../bincode.ts"; +import * as db from "../1.8.1/generated_bincode.js"; +import { fromHex, toHex } from "../hex.js"; +import DashHd from "dashhd"; +import DashPhrase from "dashphrase"; +// import { OP } from '../opcodes.ts' +// import { makeOP_RETURN } from '../scripts.ts' + +const dashTx = Tx.create(KeyUtils); +// const bip32 = BIP32Factory(ecc) + +// const mnemonic = bip39.entropyToMnemonic('00000000000000000000000000000000') +// const seed = bip39.mnemonicToSeedSync('basket actual') +// const root = bip32.fromSeed(seed) + +// m / purpose' / coin_type' / account' / change / address_index +// const child = root.derivePath("m/44'/1'/0'/0/0") + +// console.log('base58', child.toBase58()) +// console.log('wif', child.toWIF()) +// console.log('identifier', child.identifier.toString('hex')) +// console.log('publicKey', child.publicKey.toString('hex')) +// console.log('privateKey', child.privateKey.toString('hex')) +// console.log('chainCode', child.chainCode.toString('hex')) +// console.log('depth', child.depth) +// console.log('index', child.index) +// // console.log(child.parentFingerprint.toString('hex')) +// console.log('neutered', child.isNeutered()) + +const hash = new Uint8Array(sha256.arrayBuffer(sha256.arrayBuffer("hello"))); +console.log("hash", hash); +// const signed = ecc.sign(hash, child.privateKey) +// console.log('signed', signed.toString('hex')) + +const phrase = "half suit pioneer"; //await DashPhrase.generate(); +// console.log('phrase', phrase); +let seed = await DashPhrase.toSeed(phrase, "asdfasdfasdf"); +// console.log('seed', seed) +let walletKey = await DashHd.fromSeed(seed); +// console.log('walletKey', walletKey) + +// "Core" path +// Master / BIP44 / Dash / Account 0 / Receive / Key 0 +let hdpath = `m/44'/5'/0'/0/0`; +let key = await DashHd.derivePath(walletKey, hdpath); + +let wif = await DashHd.toWif(key.privateKey!); +let address = await DashHd.toAddr(key.publicKey); +console.log("wif private key", wif); +console.log("addr", address); + +let identity_public_key = db.IdentityPublicKey.V0( + db.IdentityPublicKeyV0({ + id: 0, + purpose: db.Purpose.AUTHENTICATION(), + security_level: db.SecurityLevel.CRITICAL(), + contract_bounds: undefined, + key_type: db.KeyType.ECDSA_SECP256K1(), + read_only: true, + data: db.BinaryData(key.publicKey), + disabled_at: undefined, + }), +); + +console.log(); +console.log(); + +function waitForReady(client, deadline) { + return new Promise((resolve, reject) => { + client.waitForReady(deadline, (err) => { + if (err) { + reject(err); + } else { + resolve(); + } + }); + }); +} + +const coreProto = grpc.loadPackageDefinition( + protoLoader.loadSync( + "../../platform/packages/dapi-grpc/protos/core/v0/core.proto", + ), +) as any as CoreProtoGrpcType; + +const platformProto = grpc.loadPackageDefinition( + protoLoader.loadSync( + "../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto", + ), +) as any as PlatformProtoGrpcType; + +// const client = new grpc.Client('localhost:3000', grpc.credentials.createInsecure()) +const coreClient = new coreProto.org.dash.platform.dapi.v0.Core( + "seed-2.testnet.networks.dash.org:1443", + grpc.credentials.createSsl(), +); +await waitForReady(coreClient, Date.now() + 1000); +console.log("Core GRPC is ready"); + +const platformClient = new platformProto.org.dash.platform.dapi.v0.Platform( + "seed-2.testnet.networks.dash.org:1443", + grpc.credentials.createSsl(), +); +await waitForReady(platformClient, Date.now() + 1000); +console.log("Platform GRPC is ready"); + +const coreBlockchainStatus = await UnaryCall( + coreClient, + coreClient.getBlockchainStatus, + {}, + { deadline: Date.now() + 1000 }, +); +console.log("Core Blockchain status:", coreBlockchainStatus); + +// const coreMasternodeStatus = await UnaryCall(coreClient, coreClient.getMasternodeStatus, {}, {deadline: Date.now()+1000}); +// console.log("Core Masternode status:", coreMasternodeStatus) + +const platformStatus = await UnaryCall( + platformClient, + platformClient.getStatus, + {}, + { deadline: Date.now() + 1000 }, +); +console.log("Platform status:", platformStatus.v0); + +let RPC_AUTH_URL = "https://api:null@trpc.digitalcash.dev"; + +let utxos = await Tx.utils.rpc(RPC_AUTH_URL, "getaddressutxos", { + addresses: [address], +}); + +console.log("utxos", utxos); + +const asset_lock = Tx.createForSig( + { + version: 3, // L1_VERSION_PLATFORM + type: 8, // ASSET_LOCK_TYPE + inputs: utxos, + outputs: [ + // burn output + { satoshis: 42, pubKeyHash: pkh }, + ], + extraPayload: toHex( + Bincode.encode(db.AssetLockPayload, { + version: 0, + credit_outputs: [db.TxOut({ value: 42n, script_pubkey: pkh })], + }), + ), + }, + 0, + 0x01, +); + +console.log("asset_lock", asset_lock); + +// const asset_lock_bytes = Bincode.encode(db.Transaction, asset_lock) +// console.log('asset_lock_bytes', asset_lock_bytes) + +// let response = await UnaryCall(coreClient, coreClient.broadcastTransaction, { +// transaction: asset_lock_bytes, +// }) + +// console.log("Response", response); + +const data_contract_create = db.StateTransition.DataContractCreate( + db.DataContractCreateTransition.V0( + db.DataContractCreateTransitionV0({ + data_contract: db.DataContractInSerializationFormat.V0({ + id: db.Identifier(db.IdentifierBytes32(new Uint8Array(32))), + config: db.DataContractConfig.V0({ + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_decryption_bounded_key: undefined, + requires_identity_encryption_bounded_key: undefined, + }), + version: 4, + owner_id: db.Identifier(db.IdentifierBytes32(new Uint8Array(32))), + schema_defs: undefined, + document_schemas: new Map(), + }), + identity_nonce: 43n, + user_fee_increase: 0, + signature_public_key_id: 0, + signature: db.BinaryData(new Uint8Array(1 + 64)), + }), + ), +); + +const foo: db.AssetLockPayload = db.AssetLockPayload({ + version: 1, + credit_outputs: [], +}); +const fooInstanceof = foo instanceof db.AssetLockPayload; +const x = Bincode.encode(db.AssetLockPayload, foo); + +function expectError(fn: () => any) { + let failed = false; + try { + fn(); + } catch (_) { + failed = true; + } + if (!failed) { + throw new Error("expected an error and got none from " + fn); + } +} + +// @ts-expect-error +const bad: db.AssetLockProof = db.AssetLockProof({} as any); + +const bar = db.AssetLockProof.Instant({ + instant_lock: db.BinaryData(new Uint8Array()), + transaction: db.BinaryData(new Uint8Array()), + output_index: 1, +}); + +// @ts-expect-error +const badbar: db.AssetLockProof.Chain = bar; + +const bar2: db.AssetLockProof = bar; +const barInstanceof = bar instanceof db.AssetLockProof; +const bar2Instanceof = bar instanceof db.AssetLockProof.Instant; + +expectError(() => { + // @ts-expect-error + const bady = Bincode.encode(db.AssetLockProof, foo); +}); + +const y = Bincode.encode(db.AssetLockProof, bar); + +console.assert(data_contract_create instanceof db.StateTransition); +console.assert( + data_contract_create instanceof db.StateTransition.DataContractCreate, +); + +const data_contract_create_bytes = Bincode.encode( + db.StateTransition, + data_contract_create, +); +console.log("data_contract_create_bytes", data_contract_create_bytes); diff --git a/experiment/findTheIdentity.ts b/experiment/findTheIdentity.ts new file mode 100644 index 0000000..8be498a --- /dev/null +++ b/experiment/findTheIdentity.ts @@ -0,0 +1,16 @@ +import Dash from "dash" + +const NETWORK = 'testnet'; + +export const client = new Dash.Client({ + network: NETWORK, + // Picking a known good ip address can sometimes help reliability + // Uncomment the next line if network is throwing errors + // dapiAddresses: ["44.227.137.77:1443"], + wallet: { + offlineMode: true, + }, +}) + + +client.getDAPIClient() \ No newline at end of file diff --git a/experiment/index.js b/experiment/index.js new file mode 100644 index 0000000..54cdcb3 --- /dev/null +++ b/experiment/index.js @@ -0,0 +1,41 @@ + +const identity_create = db.StateTransition.IdentityCreate( + db.IdentityCreateTransition.V0( + db.IdentityCreateTransitionV0({ + public_keys: [], + // asset_lock_proof: db.AssetLockProof.Instant(db.InstantAssetLockProof({ + // instant_lock: "", + // transaction: asset_lock, + // })), + asset_lock_proof: db.AssetLockProof.Chain(db.ChainAssetLockProof({ + core_chain_locked_height: 1, + out_point: db.OutPoint({ + txid: db.Txid(fromHex("0000000000000000000000000000000000000000000000000000000000000000")), + vout: 1, + }), + })), + output_index: 0, + user_fee_increase: 0, + identity_id: db.Identifier(db.IdentifierBytes32(fromHex("0000000000000000000000000000000000000000000000000000000000000000"))), + signature: db.BinaryData(fromHex("0000000000000000000000000000000000000000000000000000000000000000")) + }) + ) +); + +const identity_create_bytes = Bincode.encode(db.StateTransition, identity_create) +console.log('identity_create_bytes', identity_create_bytes) + + +const data_contract_create = db.StateTransition.DataContractCreate(db.DataContractCreateTransition.V0(db.DataContractCreateTransitionV0({ + data_contract: db.DataContractInSerializationFormat.V1(db.DataContractInSerializationFormatV1({ + + })), + identity_nonce: 43, + user_fee_increase: 4, + signature_public_key_id: 42, + signature: db.BinaryData(fromHex("0000000000000000000000000000000000000000000000000000000000000000")), +}))) + +const data_contract_create_bytes = Bincode.encode(db.StateTransition, data_contract_create) +console.log('data_contract_create_bytes', data_contract_create_bytes) + diff --git a/experiment/package-lock.json b/experiment/package-lock.json new file mode 100644 index 0000000..8807de2 --- /dev/null +++ b/experiment/package-lock.json @@ -0,0 +1,3989 @@ +{ + "name": "experiment", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "experiment", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@bitcoinerlab/secp256k1": "^1.2.0", + "@grpc/grpc-js": "^1.12.6", + "@grpc/proto-loader": "^0.7.13", + "bip32": "^5.0.0-rc.0", + "bip39": "^3.1.0", + "bip44-constants": "^366.0.0", + "dash": "^4.8.0", + "dashplatform": "file:..", + "dashtx": "file:../../DashTx.js", + "js-sha256": "^0.11.0" + } + }, + "..": { + "name": "dashplatform", + "version": "0.1.0", + "license": "SEE LICENSE IN LICENSE", + "dependencies": { + "@dashincubator/secp256k1": "^1.7.1-5", + "@grpc/grpc-js": "^1.13.2", + "@noble/secp256k1": "^2.2.3", + "@protobuf-ts/grpcweb-transport": "^2.9.6", + "@protobuf-ts/runtime-rpc": "^2.9.6", + "base-x": "^5.0.1", + "base64-js": "^1.5.1", + "bloom-filter": "^0.2.0", + "cbor-web": "^9.0.2", + "dashhd": "^3.3.3", + "dashkeys": "^1.1.5", + "dashphrase": "^1.4.0", + "dashtx": "^0.20.3", + "dotenv": "^16.4.7", + "eventsource-client": "^1.1.3", + "launchdarkly-eventsource": "^2.0.3", + "qrcode-svg": "^1.1.0", + "ripemd160": "^2.0.2" + }, + "devDependencies": { + "@protobuf-ts/plugin": "^2.9.6", + "@types/bloom-filter": "^0.2.4", + "replace-in-files-cli": "^3.0.0", + "tsc-esm-fix": "^3.1.2", + "typescript": "^5.x", + "vite": "^6.2.5", + "vitest": "^3.1.1" + } + }, + "../../DashTx.js": { + "name": "dashtx", + "version": "0.20.3", + "license": "SEE LICENSE IN LICENSE", + "bin": { + "dashtx-inspect": "bin/inspect.js" + }, + "devDependencies": { + "@dashincubator/secp256k1": "^1.7.1-5", + "@types/node": "^20.12.7", + "dashkeys": "^1.1.3", + "zora": "^5.2.0" + } + }, + "node_modules/@arcanis/slice-ansi": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@arcanis/slice-ansi/-/slice-ansi-1.1.1.tgz", + "integrity": "sha512-xguP2WR2Dv0gQ7Ykbdb7BNCnPnIPB94uTi0Z2NvkRBEnhbwjOQ7QyQKJXrVQg4qDpiD9hA5l5cCwy/z2OXgc3w==", + "license": "MIT", + "dependencies": { + "grapheme-splitter": "^1.0.4" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bitcoinerlab/secp256k1": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@bitcoinerlab/secp256k1/-/secp256k1-1.2.0.tgz", + "integrity": "sha512-jeujZSzb3JOZfmJYI0ph1PVpCRV5oaexCgy+RvCXV8XlY+XFB/2n3WOcvBsKLsOw78KYgnQrQWb2HrKE4be88Q==", + "license": "MIT", + "dependencies": { + "@noble/curves": "^1.7.0" + } + }, + "node_modules/@colors/colors": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", + "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", + "license": "MIT", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@dabh/diagnostics": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", + "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", + "license": "MIT", + "dependencies": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, + "node_modules/@dashevo/bls": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/@dashevo/bls/-/bls-1.2.9.tgz", + "integrity": "sha512-7+j0tQMi8fPmgcLgxnfvML2GW/A6xYA1cTLDLN2prfvV6V1OpH6EiwVGKTXBquJT0OQX++upClOKYUlIEQ8+0A==", + "dependencies": { + "binascii": "0.0.2" + } + }, + "node_modules/@dashevo/dapi-client": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@dashevo/dapi-client/-/dapi-client-1.8.0.tgz", + "integrity": "sha512-s8Xqo7Dz0aGQonO1mbqEPpZLuMkkp2TvB+Xp8zEjgn8OqQzdApmpOzyUJJkGtr2V1VN4js6ApxS9isgKJe8Jfg==", + "license": "MIT", + "dependencies": { + "@dashevo/dapi-grpc": "1.8.0", + "@dashevo/dash-spv": "2.8.0", + "@dashevo/dashcore-lib": "~0.22.0", + "@dashevo/grpc-common": "1.8.0", + "@dashevo/wasm-dpp": "1.8.0", + "bs58": "^4.0.1", + "cbor": "^8.0.0", + "google-protobuf": "^3.12.2", + "lodash": "^4.17.21", + "node-fetch": "^2.6.7", + "node-inspect-extracted": "^1.0.8", + "wasm-x11-hash": "~0.0.2", + "winston": "^3.2.1" + } + }, + "node_modules/@dashevo/dapi-client/node_modules/base-x": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz", + "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/@dashevo/dapi-client/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/@dashevo/dapi-grpc": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@dashevo/dapi-grpc/-/dapi-grpc-1.8.0.tgz", + "integrity": "sha512-hP5Py7m+IZLKvAk21nsK0tyUpfUjZRFu2boiSByjYQwrMoyZHoJi63dTFUe6sikXvG7fr1JsJMiHsO4HAmgsZQ==", + "license": "MIT", + "dependencies": { + "@dashevo/grpc-common": "1.8.0", + "@dashevo/protobufjs": "6.10.5", + "@grpc/grpc-js": "1.4.4", + "@improbable-eng/grpc-web": "^0.15.0", + "google-protobuf": "^3.12.2", + "long": "^5.2.0" + } + }, + "node_modules/@dashevo/dapi-grpc/node_modules/@grpc/grpc-js": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.4.4.tgz", + "integrity": "sha512-a6222b7Dl6fIlMgzVl7e+NiRoLiZFbpcwvBH2Oli56Bn7W4/3Ld+86hK4ffPn5rx2DlDidmIcvIJiOQXyhv9gA==", + "license": "Apache-2.0", + "dependencies": { + "@grpc/proto-loader": "^0.6.4", + "@types/node": ">=12.12.47" + }, + "engines": { + "node": "^8.13.0 || >=10.10.0" + } + }, + "node_modules/@dashevo/dapi-grpc/node_modules/@grpc/proto-loader": { + "version": "0.6.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.13.tgz", + "integrity": "sha512-FjxPYDRTn6Ec3V0arm1FtSpmP6V50wuph2yILpyvTKzjc76oDdoihXqM1DzOW5ubvCC8GivfCnNtfaRE8myJ7g==", + "license": "Apache-2.0", + "dependencies": { + "@types/long": "^4.0.1", + "lodash.camelcase": "^4.3.0", + "long": "^4.0.0", + "protobufjs": "^6.11.3", + "yargs": "^16.2.0" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@dashevo/dapi-grpc/node_modules/@grpc/proto-loader/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "license": "Apache-2.0" + }, + "node_modules/@dashevo/dapi-grpc/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/@dashevo/dapi-grpc/node_modules/protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, + "node_modules/@dashevo/dapi-grpc/node_modules/protobufjs/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "license": "Apache-2.0" + }, + "node_modules/@dashevo/dapi-grpc/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@dashevo/dapi-grpc/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/@dashevo/dark-gravity-wave": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@dashevo/dark-gravity-wave/-/dark-gravity-wave-1.1.1.tgz", + "integrity": "sha512-rt0PzGzqplqERWVIMLlBxm4mJqjFTYNUFRhIccbfaF/MDyd0/585krGOWIhe0Sis9XQNA/FJlxxRjtPXIcyyCg==", + "license": "MIT" + }, + "node_modules/@dashevo/dash-spv": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@dashevo/dash-spv/-/dash-spv-2.8.0.tgz", + "integrity": "sha512-9Eu6TQruEZJnGA8V6vAEu6ajfNkLSaEjbyr1TUQ0MazPDq6Vz+Q/zAYScwy3cAjhN8j6Ma2eN/LmPQE/VOglWw==", + "license": "MIT", + "dependencies": { + "@dashevo/dark-gravity-wave": "^1.1.1", + "@dashevo/dash-util": "^2.0.3", + "@dashevo/dashcore-lib": "~0.22.0", + "levelup": "^4.4.0", + "memdown": "^5.1.0", + "wasm-x11-hash": "~0.0.2" + } + }, + "node_modules/@dashevo/dash-util": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@dashevo/dash-util/-/dash-util-2.0.3.tgz", + "integrity": "sha512-fnc76NYVBhuTLhuUVidnV9sKSsMxmkxkhUOjiD/ny6Ipyo+qxwKeFAn8SvdVzlEpflNA613B+hsxmTBBGazl4A==", + "license": "MIT", + "dependencies": { + "bn.js": "^4.6.4", + "buffer-reverse": "^1.0.1" + } + }, + "node_modules/@dashevo/dashcore-lib": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@dashevo/dashcore-lib/-/dashcore-lib-0.22.0.tgz", + "integrity": "sha512-9zvTcr8eFE+aeA/SVN5jsDgB/Kg6ozmsOY4u3gJdFJ6kQSU+yVyFNsflaWhHwRakZ7CVlU88P7AuDKneukp3zQ==", + "license": "MIT", + "dependencies": { + "@dashevo/bls": "~1.2.9", + "@dashevo/x11-hash-js": "^1.0.2", + "@types/node": "^12.12.47", + "bloom-filter": "^0.2.0", + "bn.js": "^4.12.0", + "bs58": "=4.0.1", + "elliptic": "^6.5.4", + "inherits": "=2.0.1", + "lodash": "^4.17.20", + "ripemd160": "^2.0.2", + "tsd": "^0.28.1", + "unorm": "^1.6.0" + } + }, + "node_modules/@dashevo/dashcore-lib/node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "license": "MIT" + }, + "node_modules/@dashevo/dashcore-lib/node_modules/base-x": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz", + "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/@dashevo/dashcore-lib/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/@dashevo/dashpay-contract": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@dashevo/dashpay-contract/-/dashpay-contract-1.8.0.tgz", + "integrity": "sha512-+rzJHiFT8WnGhKGQW5teee97antCGd1s/+Jcsqq3xpsariZBtPBiGClPu30HB7mgvke87ovXequ4zwv2VKOiOQ==", + "license": "MIT" + }, + "node_modules/@dashevo/dpns-contract": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@dashevo/dpns-contract/-/dpns-contract-1.8.0.tgz", + "integrity": "sha512-oSRH+k/iu8UTng/bk4zXRTQRRBM2vPqbARgGlDLxBopGjQ8Ei/nPTPuh7xQ7mPcvTbEt/9bJb+QKE32b+A1zJA==", + "license": "MIT" + }, + "node_modules/@dashevo/grpc-common": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@dashevo/grpc-common/-/grpc-common-1.8.0.tgz", + "integrity": "sha512-AAooX+SPaOE0XMNkaGw/rBft7c/RfPlpQcKaHnZhSyCtqO4wUWj7zoPn8JtIMaBMwsYkHw4bn8xooXGsVGLS4Q==", + "license": "MIT", + "dependencies": { + "@dashevo/protobufjs": "6.10.5", + "@grpc/grpc-js": "1.4.4", + "@grpc/proto-loader": "^0.5.2", + "cbor": "^8.0.0", + "lodash": "^4.17.21", + "long": "^5.2.0", + "semver": "^7.5.3" + } + }, + "node_modules/@dashevo/grpc-common/node_modules/@grpc/grpc-js": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.4.4.tgz", + "integrity": "sha512-a6222b7Dl6fIlMgzVl7e+NiRoLiZFbpcwvBH2Oli56Bn7W4/3Ld+86hK4ffPn5rx2DlDidmIcvIJiOQXyhv9gA==", + "license": "Apache-2.0", + "dependencies": { + "@grpc/proto-loader": "^0.6.4", + "@types/node": ">=12.12.47" + }, + "engines": { + "node": "^8.13.0 || >=10.10.0" + } + }, + "node_modules/@dashevo/grpc-common/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader": { + "version": "0.6.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.13.tgz", + "integrity": "sha512-FjxPYDRTn6Ec3V0arm1FtSpmP6V50wuph2yILpyvTKzjc76oDdoihXqM1DzOW5ubvCC8GivfCnNtfaRE8myJ7g==", + "license": "Apache-2.0", + "dependencies": { + "@types/long": "^4.0.1", + "lodash.camelcase": "^4.3.0", + "long": "^4.0.0", + "protobufjs": "^6.11.3", + "yargs": "^16.2.0" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@dashevo/grpc-common/node_modules/@grpc/grpc-js/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "license": "Apache-2.0" + }, + "node_modules/@dashevo/grpc-common/node_modules/@grpc/proto-loader": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.6.tgz", + "integrity": "sha512-DT14xgw3PSzPxwS13auTEwxhMMOoz33DPUKNtmYK/QYbBSpLXJy78FGGs5yVoxVobEqPm4iW9MOIoz0A3bLTRQ==", + "license": "Apache-2.0", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "protobufjs": "^6.8.6" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@dashevo/grpc-common/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/@dashevo/grpc-common/node_modules/protobufjs": { + "version": "6.11.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", + "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": ">=13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, + "node_modules/@dashevo/grpc-common/node_modules/protobufjs/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "license": "Apache-2.0" + }, + "node_modules/@dashevo/grpc-common/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@dashevo/grpc-common/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/@dashevo/masternode-reward-shares-contract": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@dashevo/masternode-reward-shares-contract/-/masternode-reward-shares-contract-1.8.0.tgz", + "integrity": "sha512-0beDsCl5ryf6PJuGnUvPb43X2RhC8/6nvp37M+Spoekzr1ixF6/nj7S3Pf4AR3j+i8MVbztz0knxMATyI8g8gQ==", + "license": "MIT" + }, + "node_modules/@dashevo/protobufjs": { + "version": "6.10.5", + "resolved": "https://registry.npmjs.org/@dashevo/protobufjs/-/protobufjs-6.10.5.tgz", + "integrity": "sha512-Hb7wymxGshyrbZlJYSTculJ2iAr0CI46v8DnO0fk/TxZbHkpg6DjJNrdQOO+COJmdky4JqL1o9RCmi5e5a8lrQ==", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": "^13.7.0", + "long": "^4.0.0" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + } + }, + "node_modules/@dashevo/protobufjs/node_modules/@types/node": { + "version": "13.13.52", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.52.tgz", + "integrity": "sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==", + "license": "MIT" + }, + "node_modules/@dashevo/protobufjs/node_modules/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "license": "Apache-2.0" + }, + "node_modules/@dashevo/wallet-lib": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/@dashevo/wallet-lib/-/wallet-lib-8.8.0.tgz", + "integrity": "sha512-odHxNWbdLd4vm8qgHBseafaRRFB8jGkM9A+W7c2qbT9nVCAhHNlQ/sqYnOL5/LamOpzmwllmpHZIQ8psAhtE6w==", + "license": "MIT", + "dependencies": { + "@dashevo/dapi-client": "1.8.0", + "@dashevo/dashcore-lib": "~0.22.0", + "@dashevo/grpc-common": "1.8.0", + "@dashevo/wasm-dpp": "1.8.0", + "@yarnpkg/pnpify": "^4.0.0-rc.42", + "cbor": "^8.0.0", + "crypto-js": "^4.2.0", + "lodash": "^4.17.21", + "pbkdf2": "^3.1.1", + "setimmediate": "^1.0.5", + "winston": "^3.2.1" + } + }, + "node_modules/@dashevo/wasm-dpp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@dashevo/wasm-dpp/-/wasm-dpp-1.8.0.tgz", + "integrity": "sha512-qEIneunt5Tohxk6x/yXsKoqND4QWSYgq8XcwiCXd4QUm79/r0rW06MeEWqWrdXcMfPZ/ixVBoGPfmu8ner0Zlg==", + "license": "MIT", + "dependencies": { + "@dashevo/bls": "~1.2.9", + "bs58": "^4.0.1", + "lodash": "^4.17.21", + "varint": "^6.0.0" + } + }, + "node_modules/@dashevo/wasm-dpp/node_modules/base-x": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz", + "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/@dashevo/wasm-dpp/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/@dashevo/withdrawals-contract": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@dashevo/withdrawals-contract/-/withdrawals-contract-1.8.0.tgz", + "integrity": "sha512-FEsl5FXnZDtOs5IZDGyIvDXdPtGr6+4W5BkQsb8jZOuZZ0WJkWjUAZF03YyEi6X1kagHQ8g2DOCv2PfY3FKBwg==", + "license": "MIT" + }, + "node_modules/@dashevo/x11-hash-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@dashevo/x11-hash-js/-/x11-hash-js-1.0.2.tgz", + "integrity": "sha512-3vvnZweBca4URBXHF+FTrM4sdTpp3IMt73G1zUKQEdYm/kJkIKN94qpFai7YZDl87k64RCH+ckRZk6ruQPz5KQ==", + "license": "MIT" + }, + "node_modules/@grpc/grpc-js": { + "version": "1.12.6", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.12.6.tgz", + "integrity": "sha512-JXUj6PI0oqqzTGvKtzOkxtpsyPRNsrmhh41TtIz/zEB6J+AUiZZ0dxWzcMwO9Ns5rmSPuMdghlTbUuqIM48d3Q==", + "license": "Apache-2.0", + "dependencies": { + "@grpc/proto-loader": "^0.7.13", + "@js-sdsl/ordered-map": "^4.4.2" + }, + "engines": { + "node": ">=12.10.0" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.7.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz", + "integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==", + "license": "Apache-2.0", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.5", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@improbable-eng/grpc-web": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", + "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", + "license": "Apache-2.0", + "dependencies": { + "browser-headers": "^0.4.1" + }, + "peerDependencies": { + "google-protobuf": "^3.14.0" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, + "node_modules/@noble/curves": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.1.tgz", + "integrity": "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.7.1" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.1.tgz", + "integrity": "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "license": "BSD-3-Clause" + }, + "node_modules/@scure/base": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.4.tgz", + "integrity": "sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "license": "MIT" + }, + "node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@szmarczak/http-timer": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "license": "MIT", + "dependencies": { + "defer-to-connect": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@tsd/typescript": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@tsd/typescript/-/typescript-5.0.4.tgz", + "integrity": "sha512-YQi2lvZSI+xidKeUjlbv6b6Zw7qB3aXHw5oGJLs5OOGAEqKIOvz5UIAkWyg0bJbkSUWPBEtaOHpVxU4EYBO1Jg==", + "license": "MIT" + }, + "node_modules/@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "license": "MIT", + "dependencies": { + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", + "@types/node": "*", + "@types/responselike": "^1.0.0" + } + }, + "node_modules/@types/emscripten": { + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/@types/emscripten/-/emscripten-1.40.1.tgz", + "integrity": "sha512-sr53lnYkQNhjHNN0oJDdUm5564biioI5DuOpycufDVK7D3y+GR3oUswe2rlwY1nPNyusHbrJ9WoTyIHl4/Bpwg==", + "license": "MIT" + }, + "node_modules/@types/eslint": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.29.0.tgz", + "integrity": "sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng==", + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "license": "MIT" + }, + "node_modules/@types/http-cache-semantics": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "license": "MIT" + }, + "node_modules/@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/long": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", + "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==", + "license": "MIT" + }, + "node_modules/@types/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.13.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.9.tgz", + "integrity": "sha512-acBjXdRJ3A6Pb3tqnw9HZmyR3Fiol3aGxRCK1x3d+6CDAMjl7I649wpSd+yNURCjbOUGu9tqtLKnTGxmK6CyGw==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "license": "MIT" + }, + "node_modules/@types/responselike": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", + "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/semver": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz", + "integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==", + "license": "MIT" + }, + "node_modules/@types/treeify": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/treeify/-/treeify-1.0.3.tgz", + "integrity": "sha512-hx0o7zWEUU4R2Amn+pjCBQQt23Khy/Dk56gQU5xi5jtPL1h83ACJCeFaB2M/+WO1AntvWrSoVnnCAfI1AQH4Cg==", + "license": "MIT" + }, + "node_modules/@types/triple-beam": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", + "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==", + "license": "MIT" + }, + "node_modules/@yarnpkg/core": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@yarnpkg/core/-/core-4.4.2.tgz", + "integrity": "sha512-Gf2p9WUygkcT8GobVjrQpFGE7A/GWXPXjDSIFTnZKTiq/W8giN3jqhWpIrpVa2XfPMguXzdEvb2brNYeW3IwdQ==", + "license": "BSD-2-Clause", + "dependencies": { + "@arcanis/slice-ansi": "^1.1.1", + "@types/semver": "^7.1.0", + "@types/treeify": "^1.0.0", + "@yarnpkg/fslib": "^3.1.2", + "@yarnpkg/libzip": "^3.2.1", + "@yarnpkg/parsers": "^3.0.3", + "@yarnpkg/shell": "^4.1.3", + "camelcase": "^5.3.1", + "chalk": "^4.1.2", + "ci-info": "^4.0.0", + "clipanion": "^4.0.0-rc.2", + "cross-spawn": "^7.0.3", + "diff": "^5.1.0", + "dotenv": "^16.3.1", + "fast-glob": "^3.2.2", + "got": "^11.7.0", + "hpagent": "^1.2.0", + "lodash": "^4.17.15", + "micromatch": "^4.0.2", + "p-limit": "^2.2.0", + "semver": "^7.1.2", + "strip-ansi": "^6.0.0", + "tar": "^6.0.5", + "tinylogic": "^2.0.0", + "treeify": "^1.1.0", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/@yarnpkg/fslib": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@yarnpkg/fslib/-/fslib-3.1.2.tgz", + "integrity": "sha512-FpB2F1Lrm43F94klS9UN0ceOpe/PHZSpJB7bIkvReF/ba890bSdu1NokSKr998yaFee7yqeD9Wkid5ye7azF3A==", + "license": "BSD-2-Clause", + "dependencies": { + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/@yarnpkg/libzip": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@yarnpkg/libzip/-/libzip-3.2.1.tgz", + "integrity": "sha512-xPdiZxwCXGXxc1GDEyPjRQ5KqkgoOmieDNszLozbqghaeXIaokRbMKLUNx0Mr0LAnzII64kN3gl5qVyzfMxnIg==", + "license": "BSD-2-Clause", + "dependencies": { + "@types/emscripten": "^1.39.6", + "@yarnpkg/fslib": "^3.1.2", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "@yarnpkg/fslib": "^3.1.2" + } + }, + "node_modules/@yarnpkg/nm": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@yarnpkg/nm/-/nm-4.0.7.tgz", + "integrity": "sha512-cY2dzqRoNIOwKtmVVdJojnzjYdQ6klYefa9Urv61cKY5bdrU/5NZdzQoa3/i9Ls7L9qYCg/9V2WGmEG2rCu64w==", + "license": "BSD-2-Clause", + "dependencies": { + "@yarnpkg/core": "^4.4.2", + "@yarnpkg/fslib": "^3.1.2", + "@yarnpkg/pnp": "^4.1.1" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/@yarnpkg/parsers": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.3.tgz", + "integrity": "sha512-mQZgUSgFurUtA07ceMjxrWkYz8QtDuYkvPlu0ZqncgjopQ0t6CNEo/OSealkmnagSUx8ZD5ewvezUwUuMqutQg==", + "license": "BSD-2-Clause", + "dependencies": { + "js-yaml": "^3.10.0", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/@yarnpkg/pnp": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@yarnpkg/pnp/-/pnp-4.1.1.tgz", + "integrity": "sha512-IDI3dBnxOY/JEyNn3rg9UD0Zw8R1oX8uc4XIa+qoE0duvEqNaNBhpZTlgf11alYf2sTanIg4R/FQsmgmMR0oOA==", + "license": "BSD-2-Clause", + "dependencies": { + "@types/node": "^18.17.15", + "@yarnpkg/fslib": "^3.1.2" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/@yarnpkg/pnp/node_modules/@types/node": { + "version": "18.19.111", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.111.tgz", + "integrity": "sha512-90sGdgA+QLJr1F9X79tQuEut0gEYIfkX9pydI4XGRgvFo9g2JWswefI+WUSUHPYVBHYSEfTEqBxA5hQvAZB3Mw==", + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@yarnpkg/pnp/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "license": "MIT" + }, + "node_modules/@yarnpkg/pnpify": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@yarnpkg/pnpify/-/pnpify-4.1.5.tgz", + "integrity": "sha512-zTij48UH83CeyNnx4Nz33cJRL9UCfHkA1mMQj30soHizLZT2qjYbnY8wu8X3T55v9cdy/EpqmYnjbG6/n2DfsQ==", + "license": "BSD-2-Clause", + "dependencies": { + "@yarnpkg/core": "^4.4.2", + "@yarnpkg/fslib": "^3.1.2", + "@yarnpkg/nm": "^4.0.7", + "clipanion": "^4.0.0-rc.2", + "tslib": "^2.4.0" + }, + "bin": { + "pnpify": "lib/cli.js" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/@yarnpkg/shell": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@yarnpkg/shell/-/shell-4.1.3.tgz", + "integrity": "sha512-5igwsHbPtSAlLdmMdKqU3atXjwhtLFQXsYAG0sn1XcPb3yF8WxxtWxN6fycBoUvFyIHFz1G0KeRefnAy8n6gdw==", + "license": "BSD-2-Clause", + "dependencies": { + "@yarnpkg/fslib": "^3.1.2", + "@yarnpkg/parsers": "^3.0.3", + "chalk": "^4.1.2", + "clipanion": "^4.0.0-rc.2", + "cross-spawn": "^7.0.3", + "fast-glob": "^3.2.2", + "micromatch": "^4.0.2", + "tslib": "^2.4.0" + }, + "bin": { + "shell": "lib/cli.js" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/abstract-leveldown": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", + "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", + "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)", + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "immediate": "^3.2.3", + "level-concat-iterator": "~2.0.0", + "level-supports": "~1.0.0", + "xtend": "~4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "license": "MIT" + }, + "node_modules/base-x": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-5.0.0.tgz", + "integrity": "sha512-sMW3VGSX1QWVFA6l8U62MLKz29rRfpTlYdCqLdpLo1/Yd4zZwSbnUaDfciIAowAqvq7YFnWq9hrhdg1KYgc1lQ==", + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/binascii": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/binascii/-/binascii-0.0.2.tgz", + "integrity": "sha512-rA2CrUl1+6yKrn+XgLs8Hdy18OER1UW146nM+ixzhQXDY+Bd3ySkyIJGwF2a4I45JwbvF1mDL/nWkqBwpOcdBA==" + }, + "node_modules/bip32": { + "version": "5.0.0-rc.0", + "resolved": "https://registry.npmjs.org/bip32/-/bip32-5.0.0-rc.0.tgz", + "integrity": "sha512-5hVFGrdCnF8GB1Lj2eEo4PRE7+jp+3xBLnfNjydivOkMvKmUKeJ9GG8uOy8prmWl3Oh154uzgfudR1FRkNBudA==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "^1.2.0", + "@scure/base": "^1.1.1", + "uint8array-tools": "^0.0.8", + "valibot": "^0.37.0", + "wif": "^5.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/bip39": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", + "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", + "license": "ISC", + "dependencies": { + "@noble/hashes": "^1.2.0" + } + }, + "node_modules/bip44-constants": { + "version": "366.0.0", + "resolved": "https://registry.npmjs.org/bip44-constants/-/bip44-constants-366.0.0.tgz", + "integrity": "sha512-oF53IRAiUZnwEjUsbVGci8H16WFSq/u/3UlEyzceuVWGFiB61xX4V/6nHm029WlZRCFd4Vdzxk8JEqjZX/HmKg==", + "license": "MIT" + }, + "node_modules/bloom-filter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bloom-filter/-/bloom-filter-0.2.0.tgz", + "integrity": "sha512-RMG2RpnKczVzRsEYSPaT5rKsyj0w5/wpQRjaW4vOMe1WyUDQpoqxjNc10uROEjdhu63ytRt6aFRPXFePi/Rd7A==" + }, + "node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "license": "MIT" + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "license": "MIT" + }, + "node_modules/browser-headers": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", + "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==", + "license": "Apache-2.0" + }, + "node_modules/bs58": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-6.0.0.tgz", + "integrity": "sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw==", + "license": "MIT", + "dependencies": { + "base-x": "^5.0.0" + } + }, + "node_modules/bs58check": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-4.0.0.tgz", + "integrity": "sha512-FsGDOnFg9aVI9erdriULkd/JjEWONV/lQE5aYziB5PoBsXRind56lh8doIZIc9X4HoxT5x4bLjMWN1/NB8Zp5g==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "^1.2.0", + "bs58": "^6.0.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-reverse": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-reverse/-/buffer-reverse-1.0.1.tgz", + "integrity": "sha512-M87YIUBsZ6N924W57vDwT/aOu8hw7ZgdByz6ijksLjmHJELBASmYTTlNHRgjE+pTsT9oJXGaDSgqqwfdHotDUg==", + "license": "MIT" + }, + "node_modules/cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "license": "MIT", + "engines": { + "node": ">=10.6.0" + } + }, + "node_modules/cacheable-request": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", + "license": "MIT", + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "license": "MIT", + "dependencies": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelcase-keys/node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cbor": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", + "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", + "license": "MIT", + "dependencies": { + "nofilter": "^3.1.0" + }, + "engines": { + "node": ">=12.19" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.2.0.tgz", + "integrity": "sha512-cYY9mypksY8NRqgDB1XD1RiJL338v/551niynFTGkZOO2LHuB2OmOYxDIe/ttN9AHwrqdum1360G3ald0W9kCg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cipher-base": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz", + "integrity": "sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cipher-base/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/clipanion": { + "version": "4.0.0-rc.4", + "resolved": "https://registry.npmjs.org/clipanion/-/clipanion-4.0.0-rc.4.tgz", + "integrity": "sha512-CXkMQxU6s9GklO/1f714dkKBMu1lopS1WFF0B8o4AxPykR1hpozxSiUZ5ZUeBjfPgCWqbcNOtZVFhB8Lkfp1+Q==", + "license": "MIT", + "workspaces": [ + "website" + ], + "dependencies": { + "typanion": "^3.8.0" + }, + "peerDependencies": { + "typanion": "*" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/clone-response": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "license": "MIT", + "dependencies": { + "mimic-response": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/color": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.3", + "color-string": "^1.6.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/color/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "license": "MIT" + }, + "node_modules/colorspace": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", + "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", + "license": "MIT", + "dependencies": { + "color": "^3.1.3", + "text-hex": "1.0.x" + } + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", + "license": "MIT" + }, + "node_modules/dash": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/dash/-/dash-4.8.0.tgz", + "integrity": "sha512-q3outJA4Ji4KNE4VZiZ+TYAIhurZ1s3yZVLOJE+MOMeEzhJukhODS82EpVdHozYdVt2WwJZsbWoJgVbrGClb0Q==", + "license": "MIT", + "dependencies": { + "@dashevo/bls": "~1.2.9", + "@dashevo/dapi-client": "1.8.0", + "@dashevo/dapi-grpc": "1.8.0", + "@dashevo/dashcore-lib": "~0.22.0", + "@dashevo/dashpay-contract": "1.8.0", + "@dashevo/dpns-contract": "1.8.0", + "@dashevo/grpc-common": "1.8.0", + "@dashevo/masternode-reward-shares-contract": "1.8.0", + "@dashevo/wallet-lib": "8.8.0", + "@dashevo/wasm-dpp": "1.8.0", + "@dashevo/withdrawals-contract": "1.8.0", + "bs58": "^4.0.1", + "node-inspect-extracted": "^1.0.8", + "winston": "^3.2.1" + } + }, + "node_modules/dash/node_modules/base-x": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz", + "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/dash/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/dashplatform": { + "resolved": "..", + "link": true + }, + "node_modules/dashtx": { + "resolved": "../../DashTx.js", + "link": true + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", + "license": "MIT", + "dependencies": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/deferred-leveldown": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", + "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", + "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)", + "license": "MIT", + "dependencies": { + "abstract-leveldown": "~6.2.1", + "inherits": "^2.0.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/deferred-leveldown/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dotenv": { + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz", + "integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", + "license": "MIT" + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "license": "MIT", + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-formatter-pretty": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-formatter-pretty/-/eslint-formatter-pretty-4.1.0.tgz", + "integrity": "sha512-IsUTtGxF1hrH6lMWiSl1WbGaiP01eT6kzywdY1U+zLc0MP+nwEnUiS9UI8IaOTUhTeQJLlCEWIbXINBH4YJbBQ==", + "license": "MIT", + "dependencies": { + "@types/eslint": "^7.2.13", + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "eslint-rule-docs": "^1.1.5", + "log-symbols": "^4.0.0", + "plur": "^4.0.0", + "string-width": "^4.2.0", + "supports-hyperlinks": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-rule-docs": { + "version": "1.1.235", + "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.235.tgz", + "integrity": "sha512-+TQ+x4JdTnDoFEXXb3fDvfGOwnyNV7duH8fXWTPD1ieaBmB8omj7Gw/pMBBu4uI2uJCCU8APDaQJzWuXnTsH4A==", + "license": "MIT" + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fecha": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", + "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==", + "license": "MIT" + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", + "license": "MIT" + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "license": "MIT" + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "license": "MIT", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/google-protobuf": { + "version": "3.21.4", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.4.tgz", + "integrity": "sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==", + "license": "(BSD-3-Clause AND Apache-2.0)" + }, + "node_modules/got": { + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", + "license": "MIT", + "dependencies": { + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=10.19.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "license": "MIT" + }, + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash-base/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hash.js/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/hpagent": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hpagent/-/hpagent-1.2.0.tgz", + "integrity": "sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA==", + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", + "license": "BSD-2-Clause" + }, + "node_modules/http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "license": "MIT", + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/immediate": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz", + "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==", + "license": "MIT" + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==", + "license": "ISC" + }, + "node_modules/irregular-plurals": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz", + "integrity": "sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/js-sha256": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.11.0.tgz", + "integrity": "sha512-6xNlKayMZvds9h1Y1VWc0fQHQ82BxTXizWPEtEeGvmOUYpBRy4gbWroHLpzowe6xiQhHpelCQiE7HEdznyBL9Q==", + "license": "MIT" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "license": "MIT" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", + "license": "MIT" + }, + "node_modules/level-concat-iterator": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", + "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", + "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/level-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", + "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", + "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)", + "license": "MIT", + "dependencies": { + "errno": "~0.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/level-iterator-stream": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz", + "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.4.0", + "xtend": "^4.0.2" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/level-iterator-stream/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/level-supports": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", + "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", + "license": "MIT", + "dependencies": { + "xtend": "^4.0.2" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/levelup": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", + "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==", + "deprecated": "Superseded by abstract-level (https://github.com/Level/community#faq)", + "license": "MIT", + "dependencies": { + "deferred-leveldown": "~5.3.0", + "level-errors": "~2.0.0", + "level-iterator-stream": "~4.0.0", + "level-supports": "~1.0.0", + "xtend": "~4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "license": "MIT" + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/logform": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.7.0.tgz", + "integrity": "sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==", + "license": "MIT", + "dependencies": { + "@colors/colors": "1.6.0", + "@types/triple-beam": "^1.3.2", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "safe-stable-stringify": "^2.3.1", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/long": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", + "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==", + "license": "Apache-2.0" + }, + "node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ltgt": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", + "integrity": "sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==", + "license": "MIT" + }, + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/memdown": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/memdown/-/memdown-5.1.0.tgz", + "integrity": "sha512-B3J+UizMRAlEArDjWHTMmadet+UKwHd3UjMgGBkZcKAxAYVPS9o0Yeiha4qvz7iGiL2Sb3igUft6p7nbFWctpw==", + "deprecated": "Superseded by memory-level (https://github.com/Level/community#faq)", + "license": "MIT", + "dependencies": { + "abstract-leveldown": "~6.2.1", + "functional-red-black-tree": "~1.0.1", + "immediate": "~3.2.3", + "inherits": "~2.0.1", + "ltgt": "~2.2.0", + "safe-buffer": "~5.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/memdown/node_modules/immediate": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz", + "integrity": "sha512-RrGCXRm/fRVqMIhqXrGEX9rRADavPiDFSoMb/k64i9XMk8uH4r/Omi5Ctierj6XzNecwDbO4WuFbDD1zmpl3Tg==", + "license": "MIT" + }, + "node_modules/meow": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", + "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", + "license": "MIT", + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "license": "ISC" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "license": "MIT" + }, + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "license": "MIT", + "dependencies": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-inspect-extracted": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/node-inspect-extracted/-/node-inspect-extracted-1.1.0.tgz", + "integrity": "sha512-GtmPYJiHqmkt4sd7oYqUIzFepBDY6aotmD7nuF9QV9lolH+Sru5FZCholI5QuuyM+NvgAq/BaQB6OgXv+ZT8lA==", + "license": "MIT", + "engines": { + "node": ">=10.18.0" + } + }, + "node_modules/nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", + "license": "MIT", + "engines": { + "node": ">=12.19" + } + }, + "node_modules/normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "license": "MIT", + "dependencies": { + "fn.name": "1.x.x" + } + }, + "node_modules/p-cancelable": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "license": "MIT", + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/plur": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz", + "integrity": "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==", + "license": "MIT", + "dependencies": { + "irregular-plurals": "^3.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/protobufjs": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", + "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", + "license": "MIT" + }, + "node_modules/pump": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT" + }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "license": "MIT", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "license": "MIT", + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "license": "ISC" + }, + "node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/read-pkg/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readable-stream/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "license": "MIT", + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "license": "MIT" + }, + "node_modules/responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "license": "MIT", + "dependencies": { + "lowercase-keys": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "license": "MIT" + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.21", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", + "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", + "license": "CC0-1.0" + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "license": "BSD-3-Clause" + }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "license": "MIT", + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz", + "integrity": "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", + "license": "MIT" + }, + "node_modules/tinylogic": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinylogic/-/tinylogic-2.0.0.tgz", + "integrity": "sha512-dljTkiLLITtsjqBvTA1MRZQK/sGP4kI3UJKc3yA9fMzYbMF2RhcN04SeROVqJBIYYOoJMM8u0WDnhFwMSFQotw==", + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/treeify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", + "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/triple-beam": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", + "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==", + "license": "MIT", + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/tsd": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.28.1.tgz", + "integrity": "sha512-FeYrfJ05QgEMW/qOukNCr4fAJHww4SaKnivAXRv4g5kj4FeLpNV7zH4dorzB9zAfVX4wmA7zWu/wQf7kkcvfbw==", + "license": "MIT", + "dependencies": { + "@tsd/typescript": "~5.0.2", + "eslint-formatter-pretty": "^4.1.0", + "globby": "^11.0.1", + "jest-diff": "^29.0.3", + "meow": "^9.0.0", + "path-exists": "^4.0.0", + "read-pkg-up": "^7.0.0" + }, + "bin": { + "tsd": "dist/cli.js" + }, + "engines": { + "node": ">=14.16" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/typanion": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/typanion/-/typanion-3.14.0.tgz", + "integrity": "sha512-ZW/lVMRabETuYCd9O9ZvMhAh8GslSqaUjxmK/JLPCh6l73CvLBiuXswj/+7LdnWOgYsQ130FqLzFz5aGT4I3Ug==", + "license": "MIT", + "workspaces": [ + "website" + ] + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/uint8array-tools": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/uint8array-tools/-/uint8array-tools-0.0.8.tgz", + "integrity": "sha512-xS6+s8e0Xbx++5/0L+yyexukU7pz//Yg6IHg3BKhXotg1JcYtgxVcUctQ0HxLByiJzpAkNFawz1Nz5Xadzo82g==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "license": "MIT" + }, + "node_modules/unorm": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz", + "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==", + "license": "MIT or GPL-2.0", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/valibot": { + "version": "0.37.0", + "resolved": "https://registry.npmjs.org/valibot/-/valibot-0.37.0.tgz", + "integrity": "sha512-FQz52I8RXgFgOHym3XHYSREbNtkgSjF9prvMFH1nBsRyfL6SfCzoT1GuSDTlbsuPubM7/6Kbw0ZMQb8A+V+VsQ==", + "license": "MIT", + "peerDependencies": { + "typescript": ">=5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "license": "MIT" + }, + "node_modules/wasm-x11-hash": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wasm-x11-hash/-/wasm-x11-hash-0.0.2.tgz", + "integrity": "sha512-NOw8gd8J45FvNI/TunWKdPB1UG+/WDVckP4lP36Ffp1JY5Oo1nGq7K+0gdE75kzmhadEihBkIpchV3E0RESDwA==", + "license": "MIT" + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wif": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/wif/-/wif-5.0.0.tgz", + "integrity": "sha512-iFzrC/9ne740qFbNjTZ2FciSRJlHIXoxqk/Y5EnE08QOXu1WjJyCCswwDTYbohAOEnlCtLaAAQBhyaLRFh2hMA==", + "license": "MIT", + "dependencies": { + "bs58check": "^4.0.0" + } + }, + "node_modules/winston": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.17.0.tgz", + "integrity": "sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==", + "license": "MIT", + "dependencies": { + "@colors/colors": "^1.6.0", + "@dabh/diagnostics": "^2.0.2", + "async": "^3.2.3", + "is-stream": "^2.0.0", + "logform": "^2.7.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "safe-stable-stringify": "^2.3.1", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.9.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/winston-transport": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.9.0.tgz", + "integrity": "sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==", + "license": "MIT", + "dependencies": { + "logform": "^2.7.0", + "readable-stream": "^3.6.2", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + } + } +} diff --git a/experiment/package.json b/experiment/package.json new file mode 100644 index 0000000..aed70ef --- /dev/null +++ b/experiment/package.json @@ -0,0 +1,26 @@ +{ + "name": "experiment", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "proto": "proto-loader-gen-types --longs=String --enums=String --defaults --oneofs --grpcLib=@grpc/grpc-js --outDir=proto/ ../../platform/packages/dapi-grpc/protos/core/v0/core.proto ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto", + "tsc": "tsc -m nodenext ./ts/*.ts", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "description": "", + "type": "module", + "dependencies": { + "@bitcoinerlab/secp256k1": "^1.2.0", + "@grpc/grpc-js": "^1.12.6", + "@grpc/proto-loader": "^0.7.13", + "bip32": "^5.0.0-rc.0", + "bip39": "^3.1.0", + "bip44-constants": "^366.0.0", + "dash": "^4.8.0", + "dashplatform": "file:..", + "dashtx": "file:../../DashTx.js", + "js-sha256": "^0.11.0" + } +} diff --git a/experiment/proto/core.ts b/experiment/proto/core.ts new file mode 100644 index 0000000..152f677 --- /dev/null +++ b/experiment/proto/core.ts @@ -0,0 +1,47 @@ +import type * as grpc from '@grpc/grpc-js'; +import type { MessageTypeDefinition } from '@grpc/proto-loader'; + +import type { CoreClient as _org_dash_platform_dapi_v0_CoreClient, CoreDefinition as _org_dash_platform_dapi_v0_CoreDefinition } from './org/dash/platform/dapi/v0/Core'; + +type SubtypeConstructor any, Subtype> = { + new(...args: ConstructorParameters): Subtype; +}; + +export interface ProtoGrpcType { + org: { + dash: { + platform: { + dapi: { + v0: { + BlockHeaders: MessageTypeDefinition + BlockHeadersWithChainLocksRequest: MessageTypeDefinition + BlockHeadersWithChainLocksResponse: MessageTypeDefinition + BloomFilter: MessageTypeDefinition + BroadcastTransactionRequest: MessageTypeDefinition + BroadcastTransactionResponse: MessageTypeDefinition + Core: SubtypeConstructor & { service: _org_dash_platform_dapi_v0_CoreDefinition } + GetBestBlockHeightRequest: MessageTypeDefinition + GetBestBlockHeightResponse: MessageTypeDefinition + GetBlockRequest: MessageTypeDefinition + GetBlockResponse: MessageTypeDefinition + GetBlockchainStatusRequest: MessageTypeDefinition + GetBlockchainStatusResponse: MessageTypeDefinition + GetEstimatedTransactionFeeRequest: MessageTypeDefinition + GetEstimatedTransactionFeeResponse: MessageTypeDefinition + GetMasternodeStatusRequest: MessageTypeDefinition + GetMasternodeStatusResponse: MessageTypeDefinition + GetTransactionRequest: MessageTypeDefinition + GetTransactionResponse: MessageTypeDefinition + InstantSendLockMessages: MessageTypeDefinition + MasternodeListRequest: MessageTypeDefinition + MasternodeListResponse: MessageTypeDefinition + RawTransactions: MessageTypeDefinition + TransactionsWithProofsRequest: MessageTypeDefinition + TransactionsWithProofsResponse: MessageTypeDefinition + } + } + } + } + } +} + diff --git a/experiment/proto/google/protobuf/BoolValue.ts b/experiment/proto/google/protobuf/BoolValue.ts new file mode 100644 index 0000000..86507ea --- /dev/null +++ b/experiment/proto/google/protobuf/BoolValue.ts @@ -0,0 +1,10 @@ +// Original file: null + + +export interface BoolValue { + 'value'?: (boolean); +} + +export interface BoolValue__Output { + 'value': (boolean); +} diff --git a/experiment/proto/google/protobuf/BytesValue.ts b/experiment/proto/google/protobuf/BytesValue.ts new file mode 100644 index 0000000..9cec76f --- /dev/null +++ b/experiment/proto/google/protobuf/BytesValue.ts @@ -0,0 +1,10 @@ +// Original file: null + + +export interface BytesValue { + 'value'?: (Buffer | Uint8Array | string); +} + +export interface BytesValue__Output { + 'value': (Buffer); +} diff --git a/experiment/proto/google/protobuf/DoubleValue.ts b/experiment/proto/google/protobuf/DoubleValue.ts new file mode 100644 index 0000000..d70b303 --- /dev/null +++ b/experiment/proto/google/protobuf/DoubleValue.ts @@ -0,0 +1,10 @@ +// Original file: null + + +export interface DoubleValue { + 'value'?: (number | string); +} + +export interface DoubleValue__Output { + 'value': (number); +} diff --git a/experiment/proto/google/protobuf/FloatValue.ts b/experiment/proto/google/protobuf/FloatValue.ts new file mode 100644 index 0000000..54a655f --- /dev/null +++ b/experiment/proto/google/protobuf/FloatValue.ts @@ -0,0 +1,10 @@ +// Original file: null + + +export interface FloatValue { + 'value'?: (number | string); +} + +export interface FloatValue__Output { + 'value': (number); +} diff --git a/experiment/proto/google/protobuf/Int32Value.ts b/experiment/proto/google/protobuf/Int32Value.ts new file mode 100644 index 0000000..ec4eeb7 --- /dev/null +++ b/experiment/proto/google/protobuf/Int32Value.ts @@ -0,0 +1,10 @@ +// Original file: null + + +export interface Int32Value { + 'value'?: (number); +} + +export interface Int32Value__Output { + 'value': (number); +} diff --git a/experiment/proto/google/protobuf/Int64Value.ts b/experiment/proto/google/protobuf/Int64Value.ts new file mode 100644 index 0000000..f737519 --- /dev/null +++ b/experiment/proto/google/protobuf/Int64Value.ts @@ -0,0 +1,11 @@ +// Original file: null + +import type { Long } from '@grpc/proto-loader'; + +export interface Int64Value { + 'value'?: (number | string | Long); +} + +export interface Int64Value__Output { + 'value': (string); +} diff --git a/experiment/proto/google/protobuf/ListValue.ts b/experiment/proto/google/protobuf/ListValue.ts new file mode 100644 index 0000000..fa762b9 --- /dev/null +++ b/experiment/proto/google/protobuf/ListValue.ts @@ -0,0 +1,11 @@ +// Original file: null + +import type { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../google/protobuf/Value'; + +export interface ListValue { + 'values'?: (_google_protobuf_Value)[]; +} + +export interface ListValue__Output { + 'values': (_google_protobuf_Value__Output)[]; +} diff --git a/experiment/proto/google/protobuf/NullValue.ts b/experiment/proto/google/protobuf/NullValue.ts new file mode 100644 index 0000000..c66dacc --- /dev/null +++ b/experiment/proto/google/protobuf/NullValue.ts @@ -0,0 +1,11 @@ +// Original file: null + +export const NullValue = { + NULL_VALUE: 'NULL_VALUE', +} as const; + +export type NullValue = + | 'NULL_VALUE' + | 0 + +export type NullValue__Output = typeof NullValue[keyof typeof NullValue] diff --git a/experiment/proto/google/protobuf/StringValue.ts b/experiment/proto/google/protobuf/StringValue.ts new file mode 100644 index 0000000..673090e --- /dev/null +++ b/experiment/proto/google/protobuf/StringValue.ts @@ -0,0 +1,10 @@ +// Original file: null + + +export interface StringValue { + 'value'?: (string); +} + +export interface StringValue__Output { + 'value': (string); +} diff --git a/experiment/proto/google/protobuf/Struct.ts b/experiment/proto/google/protobuf/Struct.ts new file mode 100644 index 0000000..41b79ea --- /dev/null +++ b/experiment/proto/google/protobuf/Struct.ts @@ -0,0 +1,11 @@ +// Original file: null + +import type { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../google/protobuf/Value'; + +export interface Struct { + 'fields'?: ({[key: string]: _google_protobuf_Value}); +} + +export interface Struct__Output { + 'fields': ({[key: string]: _google_protobuf_Value__Output}); +} diff --git a/experiment/proto/google/protobuf/Timestamp.ts b/experiment/proto/google/protobuf/Timestamp.ts new file mode 100644 index 0000000..ceaa32b --- /dev/null +++ b/experiment/proto/google/protobuf/Timestamp.ts @@ -0,0 +1,13 @@ +// Original file: null + +import type { Long } from '@grpc/proto-loader'; + +export interface Timestamp { + 'seconds'?: (number | string | Long); + 'nanos'?: (number); +} + +export interface Timestamp__Output { + 'seconds': (string); + 'nanos': (number); +} diff --git a/experiment/proto/google/protobuf/UInt32Value.ts b/experiment/proto/google/protobuf/UInt32Value.ts new file mode 100644 index 0000000..973ab34 --- /dev/null +++ b/experiment/proto/google/protobuf/UInt32Value.ts @@ -0,0 +1,10 @@ +// Original file: null + + +export interface UInt32Value { + 'value'?: (number); +} + +export interface UInt32Value__Output { + 'value': (number); +} diff --git a/experiment/proto/google/protobuf/UInt64Value.ts b/experiment/proto/google/protobuf/UInt64Value.ts new file mode 100644 index 0000000..7a85c39 --- /dev/null +++ b/experiment/proto/google/protobuf/UInt64Value.ts @@ -0,0 +1,11 @@ +// Original file: null + +import type { Long } from '@grpc/proto-loader'; + +export interface UInt64Value { + 'value'?: (number | string | Long); +} + +export interface UInt64Value__Output { + 'value': (string); +} diff --git a/experiment/proto/google/protobuf/Value.ts b/experiment/proto/google/protobuf/Value.ts new file mode 100644 index 0000000..67cc03f --- /dev/null +++ b/experiment/proto/google/protobuf/Value.ts @@ -0,0 +1,25 @@ +// Original file: null + +import type { NullValue as _google_protobuf_NullValue, NullValue__Output as _google_protobuf_NullValue__Output } from '../../google/protobuf/NullValue'; +import type { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../google/protobuf/Struct'; +import type { ListValue as _google_protobuf_ListValue, ListValue__Output as _google_protobuf_ListValue__Output } from '../../google/protobuf/ListValue'; + +export interface Value { + 'nullValue'?: (_google_protobuf_NullValue); + 'numberValue'?: (number | string); + 'stringValue'?: (string); + 'boolValue'?: (boolean); + 'structValue'?: (_google_protobuf_Struct | null); + 'listValue'?: (_google_protobuf_ListValue | null); + 'kind'?: "nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"; +} + +export interface Value__Output { + 'nullValue'?: (_google_protobuf_NullValue__Output); + 'numberValue'?: (number); + 'stringValue'?: (string); + 'boolValue'?: (boolean); + 'structValue'?: (_google_protobuf_Struct__Output | null); + 'listValue'?: (_google_protobuf_ListValue__Output | null); + 'kind': "nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/AllKeys.ts b/experiment/proto/org/dash/platform/dapi/v0/AllKeys.ts new file mode 100644 index 0000000..47e9cce --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/AllKeys.ts @@ -0,0 +1,8 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface AllKeys { +} + +export interface AllKeys__Output { +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/BlockHeaders.ts b/experiment/proto/org/dash/platform/dapi/v0/BlockHeaders.ts new file mode 100644 index 0000000..c95d136 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/BlockHeaders.ts @@ -0,0 +1,10 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface BlockHeaders { + 'headers'?: (Buffer | Uint8Array | string)[]; +} + +export interface BlockHeaders__Output { + 'headers': (Buffer)[]; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/BlockHeadersWithChainLocksRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/BlockHeadersWithChainLocksRequest.ts new file mode 100644 index 0000000..858034b --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/BlockHeadersWithChainLocksRequest.ts @@ -0,0 +1,16 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface BlockHeadersWithChainLocksRequest { + 'fromBlockHash'?: (Buffer | Uint8Array | string); + 'fromBlockHeight'?: (number); + 'count'?: (number); + 'fromBlock'?: "fromBlockHash"|"fromBlockHeight"; +} + +export interface BlockHeadersWithChainLocksRequest__Output { + 'fromBlockHash'?: (Buffer); + 'fromBlockHeight'?: (number); + 'count': (number); + 'fromBlock': "fromBlockHash"|"fromBlockHeight"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/BlockHeadersWithChainLocksResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/BlockHeadersWithChainLocksResponse.ts new file mode 100644 index 0000000..ef3111b --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/BlockHeadersWithChainLocksResponse.ts @@ -0,0 +1,15 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + +import type { BlockHeaders as _org_dash_platform_dapi_v0_BlockHeaders, BlockHeaders__Output as _org_dash_platform_dapi_v0_BlockHeaders__Output } from '../../../../../org/dash/platform/dapi/v0/BlockHeaders'; + +export interface BlockHeadersWithChainLocksResponse { + 'blockHeaders'?: (_org_dash_platform_dapi_v0_BlockHeaders | null); + 'chainLock'?: (Buffer | Uint8Array | string); + 'responses'?: "blockHeaders"|"chainLock"; +} + +export interface BlockHeadersWithChainLocksResponse__Output { + 'blockHeaders'?: (_org_dash_platform_dapi_v0_BlockHeaders__Output | null); + 'chainLock'?: (Buffer); + 'responses': "blockHeaders"|"chainLock"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/BloomFilter.ts b/experiment/proto/org/dash/platform/dapi/v0/BloomFilter.ts new file mode 100644 index 0000000..2cb68b7 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/BloomFilter.ts @@ -0,0 +1,16 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface BloomFilter { + 'vData'?: (Buffer | Uint8Array | string); + 'nHashFuncs'?: (number); + 'nTweak'?: (number); + 'nFlags'?: (number); +} + +export interface BloomFilter__Output { + 'vData': (Buffer); + 'nHashFuncs': (number); + 'nTweak': (number); + 'nFlags': (number); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/BroadcastStateTransitionRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/BroadcastStateTransitionRequest.ts new file mode 100644 index 0000000..46c472c --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/BroadcastStateTransitionRequest.ts @@ -0,0 +1,10 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface BroadcastStateTransitionRequest { + 'stateTransition'?: (Buffer | Uint8Array | string); +} + +export interface BroadcastStateTransitionRequest__Output { + 'stateTransition': (Buffer); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/BroadcastStateTransitionResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/BroadcastStateTransitionResponse.ts new file mode 100644 index 0000000..d2af81e --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/BroadcastStateTransitionResponse.ts @@ -0,0 +1,8 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface BroadcastStateTransitionResponse { +} + +export interface BroadcastStateTransitionResponse__Output { +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/BroadcastTransactionRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/BroadcastTransactionRequest.ts new file mode 100644 index 0000000..533feaa --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/BroadcastTransactionRequest.ts @@ -0,0 +1,14 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface BroadcastTransactionRequest { + 'transaction'?: (Buffer | Uint8Array | string); + 'allowHighFees'?: (boolean); + 'bypassLimits'?: (boolean); +} + +export interface BroadcastTransactionRequest__Output { + 'transaction': (Buffer); + 'allowHighFees': (boolean); + 'bypassLimits': (boolean); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/BroadcastTransactionResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/BroadcastTransactionResponse.ts new file mode 100644 index 0000000..d8b91a8 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/BroadcastTransactionResponse.ts @@ -0,0 +1,10 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface BroadcastTransactionResponse { + 'transactionId'?: (string); +} + +export interface BroadcastTransactionResponse__Output { + 'transactionId': (string); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/Core.ts b/experiment/proto/org/dash/platform/dapi/v0/Core.ts new file mode 100644 index 0000000..10f6310 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/Core.ts @@ -0,0 +1,107 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + +import type * as grpc from '@grpc/grpc-js' +import type { MethodDefinition } from '@grpc/proto-loader' +import type { BlockHeadersWithChainLocksRequest as _org_dash_platform_dapi_v0_BlockHeadersWithChainLocksRequest, BlockHeadersWithChainLocksRequest__Output as _org_dash_platform_dapi_v0_BlockHeadersWithChainLocksRequest__Output } from '../../../../../org/dash/platform/dapi/v0/BlockHeadersWithChainLocksRequest'; +import type { BlockHeadersWithChainLocksResponse as _org_dash_platform_dapi_v0_BlockHeadersWithChainLocksResponse, BlockHeadersWithChainLocksResponse__Output as _org_dash_platform_dapi_v0_BlockHeadersWithChainLocksResponse__Output } from '../../../../../org/dash/platform/dapi/v0/BlockHeadersWithChainLocksResponse'; +import type { BroadcastTransactionRequest as _org_dash_platform_dapi_v0_BroadcastTransactionRequest, BroadcastTransactionRequest__Output as _org_dash_platform_dapi_v0_BroadcastTransactionRequest__Output } from '../../../../../org/dash/platform/dapi/v0/BroadcastTransactionRequest'; +import type { BroadcastTransactionResponse as _org_dash_platform_dapi_v0_BroadcastTransactionResponse, BroadcastTransactionResponse__Output as _org_dash_platform_dapi_v0_BroadcastTransactionResponse__Output } from '../../../../../org/dash/platform/dapi/v0/BroadcastTransactionResponse'; +import type { GetBestBlockHeightRequest as _org_dash_platform_dapi_v0_GetBestBlockHeightRequest, GetBestBlockHeightRequest__Output as _org_dash_platform_dapi_v0_GetBestBlockHeightRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetBestBlockHeightRequest'; +import type { GetBestBlockHeightResponse as _org_dash_platform_dapi_v0_GetBestBlockHeightResponse, GetBestBlockHeightResponse__Output as _org_dash_platform_dapi_v0_GetBestBlockHeightResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetBestBlockHeightResponse'; +import type { GetBlockRequest as _org_dash_platform_dapi_v0_GetBlockRequest, GetBlockRequest__Output as _org_dash_platform_dapi_v0_GetBlockRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetBlockRequest'; +import type { GetBlockResponse as _org_dash_platform_dapi_v0_GetBlockResponse, GetBlockResponse__Output as _org_dash_platform_dapi_v0_GetBlockResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetBlockResponse'; +import type { GetBlockchainStatusRequest as _org_dash_platform_dapi_v0_GetBlockchainStatusRequest, GetBlockchainStatusRequest__Output as _org_dash_platform_dapi_v0_GetBlockchainStatusRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetBlockchainStatusRequest'; +import type { GetBlockchainStatusResponse as _org_dash_platform_dapi_v0_GetBlockchainStatusResponse, GetBlockchainStatusResponse__Output as _org_dash_platform_dapi_v0_GetBlockchainStatusResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetBlockchainStatusResponse'; +import type { GetEstimatedTransactionFeeRequest as _org_dash_platform_dapi_v0_GetEstimatedTransactionFeeRequest, GetEstimatedTransactionFeeRequest__Output as _org_dash_platform_dapi_v0_GetEstimatedTransactionFeeRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetEstimatedTransactionFeeRequest'; +import type { GetEstimatedTransactionFeeResponse as _org_dash_platform_dapi_v0_GetEstimatedTransactionFeeResponse, GetEstimatedTransactionFeeResponse__Output as _org_dash_platform_dapi_v0_GetEstimatedTransactionFeeResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetEstimatedTransactionFeeResponse'; +import type { GetMasternodeStatusRequest as _org_dash_platform_dapi_v0_GetMasternodeStatusRequest, GetMasternodeStatusRequest__Output as _org_dash_platform_dapi_v0_GetMasternodeStatusRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetMasternodeStatusRequest'; +import type { GetMasternodeStatusResponse as _org_dash_platform_dapi_v0_GetMasternodeStatusResponse, GetMasternodeStatusResponse__Output as _org_dash_platform_dapi_v0_GetMasternodeStatusResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetMasternodeStatusResponse'; +import type { GetTransactionRequest as _org_dash_platform_dapi_v0_GetTransactionRequest, GetTransactionRequest__Output as _org_dash_platform_dapi_v0_GetTransactionRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetTransactionRequest'; +import type { GetTransactionResponse as _org_dash_platform_dapi_v0_GetTransactionResponse, GetTransactionResponse__Output as _org_dash_platform_dapi_v0_GetTransactionResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetTransactionResponse'; +import type { MasternodeListRequest as _org_dash_platform_dapi_v0_MasternodeListRequest, MasternodeListRequest__Output as _org_dash_platform_dapi_v0_MasternodeListRequest__Output } from '../../../../../org/dash/platform/dapi/v0/MasternodeListRequest'; +import type { MasternodeListResponse as _org_dash_platform_dapi_v0_MasternodeListResponse, MasternodeListResponse__Output as _org_dash_platform_dapi_v0_MasternodeListResponse__Output } from '../../../../../org/dash/platform/dapi/v0/MasternodeListResponse'; +import type { TransactionsWithProofsRequest as _org_dash_platform_dapi_v0_TransactionsWithProofsRequest, TransactionsWithProofsRequest__Output as _org_dash_platform_dapi_v0_TransactionsWithProofsRequest__Output } from '../../../../../org/dash/platform/dapi/v0/TransactionsWithProofsRequest'; +import type { TransactionsWithProofsResponse as _org_dash_platform_dapi_v0_TransactionsWithProofsResponse, TransactionsWithProofsResponse__Output as _org_dash_platform_dapi_v0_TransactionsWithProofsResponse__Output } from '../../../../../org/dash/platform/dapi/v0/TransactionsWithProofsResponse'; + +export interface CoreClient extends grpc.Client { + broadcastTransaction(argument: _org_dash_platform_dapi_v0_BroadcastTransactionRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_BroadcastTransactionResponse__Output>): grpc.ClientUnaryCall; + broadcastTransaction(argument: _org_dash_platform_dapi_v0_BroadcastTransactionRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_BroadcastTransactionResponse__Output>): grpc.ClientUnaryCall; + broadcastTransaction(argument: _org_dash_platform_dapi_v0_BroadcastTransactionRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_BroadcastTransactionResponse__Output>): grpc.ClientUnaryCall; + broadcastTransaction(argument: _org_dash_platform_dapi_v0_BroadcastTransactionRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_BroadcastTransactionResponse__Output>): grpc.ClientUnaryCall; + + getBestBlockHeight(argument: _org_dash_platform_dapi_v0_GetBestBlockHeightRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetBestBlockHeightResponse__Output>): grpc.ClientUnaryCall; + getBestBlockHeight(argument: _org_dash_platform_dapi_v0_GetBestBlockHeightRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetBestBlockHeightResponse__Output>): grpc.ClientUnaryCall; + getBestBlockHeight(argument: _org_dash_platform_dapi_v0_GetBestBlockHeightRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetBestBlockHeightResponse__Output>): grpc.ClientUnaryCall; + getBestBlockHeight(argument: _org_dash_platform_dapi_v0_GetBestBlockHeightRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetBestBlockHeightResponse__Output>): grpc.ClientUnaryCall; + + getBlock(argument: _org_dash_platform_dapi_v0_GetBlockRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetBlockResponse__Output>): grpc.ClientUnaryCall; + getBlock(argument: _org_dash_platform_dapi_v0_GetBlockRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetBlockResponse__Output>): grpc.ClientUnaryCall; + getBlock(argument: _org_dash_platform_dapi_v0_GetBlockRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetBlockResponse__Output>): grpc.ClientUnaryCall; + getBlock(argument: _org_dash_platform_dapi_v0_GetBlockRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetBlockResponse__Output>): grpc.ClientUnaryCall; + + getBlockchainStatus(argument: _org_dash_platform_dapi_v0_GetBlockchainStatusRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetBlockchainStatusResponse__Output>): grpc.ClientUnaryCall; + getBlockchainStatus(argument: _org_dash_platform_dapi_v0_GetBlockchainStatusRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetBlockchainStatusResponse__Output>): grpc.ClientUnaryCall; + getBlockchainStatus(argument: _org_dash_platform_dapi_v0_GetBlockchainStatusRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetBlockchainStatusResponse__Output>): grpc.ClientUnaryCall; + getBlockchainStatus(argument: _org_dash_platform_dapi_v0_GetBlockchainStatusRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetBlockchainStatusResponse__Output>): grpc.ClientUnaryCall; + + getEstimatedTransactionFee(argument: _org_dash_platform_dapi_v0_GetEstimatedTransactionFeeRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEstimatedTransactionFeeResponse__Output>): grpc.ClientUnaryCall; + getEstimatedTransactionFee(argument: _org_dash_platform_dapi_v0_GetEstimatedTransactionFeeRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEstimatedTransactionFeeResponse__Output>): grpc.ClientUnaryCall; + getEstimatedTransactionFee(argument: _org_dash_platform_dapi_v0_GetEstimatedTransactionFeeRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEstimatedTransactionFeeResponse__Output>): grpc.ClientUnaryCall; + getEstimatedTransactionFee(argument: _org_dash_platform_dapi_v0_GetEstimatedTransactionFeeRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEstimatedTransactionFeeResponse__Output>): grpc.ClientUnaryCall; + + getMasternodeStatus(argument: _org_dash_platform_dapi_v0_GetMasternodeStatusRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetMasternodeStatusResponse__Output>): grpc.ClientUnaryCall; + getMasternodeStatus(argument: _org_dash_platform_dapi_v0_GetMasternodeStatusRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetMasternodeStatusResponse__Output>): grpc.ClientUnaryCall; + getMasternodeStatus(argument: _org_dash_platform_dapi_v0_GetMasternodeStatusRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetMasternodeStatusResponse__Output>): grpc.ClientUnaryCall; + getMasternodeStatus(argument: _org_dash_platform_dapi_v0_GetMasternodeStatusRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetMasternodeStatusResponse__Output>): grpc.ClientUnaryCall; + + getTransaction(argument: _org_dash_platform_dapi_v0_GetTransactionRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTransactionResponse__Output>): grpc.ClientUnaryCall; + getTransaction(argument: _org_dash_platform_dapi_v0_GetTransactionRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTransactionResponse__Output>): grpc.ClientUnaryCall; + getTransaction(argument: _org_dash_platform_dapi_v0_GetTransactionRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTransactionResponse__Output>): grpc.ClientUnaryCall; + getTransaction(argument: _org_dash_platform_dapi_v0_GetTransactionRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTransactionResponse__Output>): grpc.ClientUnaryCall; + + subscribeToBlockHeadersWithChainLocks(argument: _org_dash_platform_dapi_v0_BlockHeadersWithChainLocksRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_org_dash_platform_dapi_v0_BlockHeadersWithChainLocksResponse__Output>; + subscribeToBlockHeadersWithChainLocks(argument: _org_dash_platform_dapi_v0_BlockHeadersWithChainLocksRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<_org_dash_platform_dapi_v0_BlockHeadersWithChainLocksResponse__Output>; + + subscribeToMasternodeList(argument: _org_dash_platform_dapi_v0_MasternodeListRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_org_dash_platform_dapi_v0_MasternodeListResponse__Output>; + subscribeToMasternodeList(argument: _org_dash_platform_dapi_v0_MasternodeListRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<_org_dash_platform_dapi_v0_MasternodeListResponse__Output>; + + subscribeToTransactionsWithProofs(argument: _org_dash_platform_dapi_v0_TransactionsWithProofsRequest, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_org_dash_platform_dapi_v0_TransactionsWithProofsResponse__Output>; + subscribeToTransactionsWithProofs(argument: _org_dash_platform_dapi_v0_TransactionsWithProofsRequest, options?: grpc.CallOptions): grpc.ClientReadableStream<_org_dash_platform_dapi_v0_TransactionsWithProofsResponse__Output>; + +} + +export interface CoreHandlers extends grpc.UntypedServiceImplementation { + broadcastTransaction: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_BroadcastTransactionRequest__Output, _org_dash_platform_dapi_v0_BroadcastTransactionResponse>; + + getBestBlockHeight: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetBestBlockHeightRequest__Output, _org_dash_platform_dapi_v0_GetBestBlockHeightResponse>; + + getBlock: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetBlockRequest__Output, _org_dash_platform_dapi_v0_GetBlockResponse>; + + getBlockchainStatus: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetBlockchainStatusRequest__Output, _org_dash_platform_dapi_v0_GetBlockchainStatusResponse>; + + getEstimatedTransactionFee: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetEstimatedTransactionFeeRequest__Output, _org_dash_platform_dapi_v0_GetEstimatedTransactionFeeResponse>; + + getMasternodeStatus: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetMasternodeStatusRequest__Output, _org_dash_platform_dapi_v0_GetMasternodeStatusResponse>; + + getTransaction: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetTransactionRequest__Output, _org_dash_platform_dapi_v0_GetTransactionResponse>; + + subscribeToBlockHeadersWithChainLocks: grpc.handleServerStreamingCall<_org_dash_platform_dapi_v0_BlockHeadersWithChainLocksRequest__Output, _org_dash_platform_dapi_v0_BlockHeadersWithChainLocksResponse>; + + subscribeToMasternodeList: grpc.handleServerStreamingCall<_org_dash_platform_dapi_v0_MasternodeListRequest__Output, _org_dash_platform_dapi_v0_MasternodeListResponse>; + + subscribeToTransactionsWithProofs: grpc.handleServerStreamingCall<_org_dash_platform_dapi_v0_TransactionsWithProofsRequest__Output, _org_dash_platform_dapi_v0_TransactionsWithProofsResponse>; + +} + +export interface CoreDefinition extends grpc.ServiceDefinition { + broadcastTransaction: MethodDefinition<_org_dash_platform_dapi_v0_BroadcastTransactionRequest, _org_dash_platform_dapi_v0_BroadcastTransactionResponse, _org_dash_platform_dapi_v0_BroadcastTransactionRequest__Output, _org_dash_platform_dapi_v0_BroadcastTransactionResponse__Output> + getBestBlockHeight: MethodDefinition<_org_dash_platform_dapi_v0_GetBestBlockHeightRequest, _org_dash_platform_dapi_v0_GetBestBlockHeightResponse, _org_dash_platform_dapi_v0_GetBestBlockHeightRequest__Output, _org_dash_platform_dapi_v0_GetBestBlockHeightResponse__Output> + getBlock: MethodDefinition<_org_dash_platform_dapi_v0_GetBlockRequest, _org_dash_platform_dapi_v0_GetBlockResponse, _org_dash_platform_dapi_v0_GetBlockRequest__Output, _org_dash_platform_dapi_v0_GetBlockResponse__Output> + getBlockchainStatus: MethodDefinition<_org_dash_platform_dapi_v0_GetBlockchainStatusRequest, _org_dash_platform_dapi_v0_GetBlockchainStatusResponse, _org_dash_platform_dapi_v0_GetBlockchainStatusRequest__Output, _org_dash_platform_dapi_v0_GetBlockchainStatusResponse__Output> + getEstimatedTransactionFee: MethodDefinition<_org_dash_platform_dapi_v0_GetEstimatedTransactionFeeRequest, _org_dash_platform_dapi_v0_GetEstimatedTransactionFeeResponse, _org_dash_platform_dapi_v0_GetEstimatedTransactionFeeRequest__Output, _org_dash_platform_dapi_v0_GetEstimatedTransactionFeeResponse__Output> + getMasternodeStatus: MethodDefinition<_org_dash_platform_dapi_v0_GetMasternodeStatusRequest, _org_dash_platform_dapi_v0_GetMasternodeStatusResponse, _org_dash_platform_dapi_v0_GetMasternodeStatusRequest__Output, _org_dash_platform_dapi_v0_GetMasternodeStatusResponse__Output> + getTransaction: MethodDefinition<_org_dash_platform_dapi_v0_GetTransactionRequest, _org_dash_platform_dapi_v0_GetTransactionResponse, _org_dash_platform_dapi_v0_GetTransactionRequest__Output, _org_dash_platform_dapi_v0_GetTransactionResponse__Output> + subscribeToBlockHeadersWithChainLocks: MethodDefinition<_org_dash_platform_dapi_v0_BlockHeadersWithChainLocksRequest, _org_dash_platform_dapi_v0_BlockHeadersWithChainLocksResponse, _org_dash_platform_dapi_v0_BlockHeadersWithChainLocksRequest__Output, _org_dash_platform_dapi_v0_BlockHeadersWithChainLocksResponse__Output> + subscribeToMasternodeList: MethodDefinition<_org_dash_platform_dapi_v0_MasternodeListRequest, _org_dash_platform_dapi_v0_MasternodeListResponse, _org_dash_platform_dapi_v0_MasternodeListRequest__Output, _org_dash_platform_dapi_v0_MasternodeListResponse__Output> + subscribeToTransactionsWithProofs: MethodDefinition<_org_dash_platform_dapi_v0_TransactionsWithProofsRequest, _org_dash_platform_dapi_v0_TransactionsWithProofsResponse, _org_dash_platform_dapi_v0_TransactionsWithProofsRequest__Output, _org_dash_platform_dapi_v0_TransactionsWithProofsResponse__Output> +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetBestBlockHeightRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetBestBlockHeightRequest.ts new file mode 100644 index 0000000..6d0f634 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetBestBlockHeightRequest.ts @@ -0,0 +1,8 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface GetBestBlockHeightRequest { +} + +export interface GetBestBlockHeightRequest__Output { +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetBestBlockHeightResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetBestBlockHeightResponse.ts new file mode 100644 index 0000000..98b2e24 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetBestBlockHeightResponse.ts @@ -0,0 +1,10 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface GetBestBlockHeightResponse { + 'height'?: (number); +} + +export interface GetBestBlockHeightResponse__Output { + 'height': (number); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetBlockRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetBlockRequest.ts new file mode 100644 index 0000000..07ce13d --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetBlockRequest.ts @@ -0,0 +1,14 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface GetBlockRequest { + 'height'?: (number); + 'hash'?: (string); + 'block'?: "height"|"hash"; +} + +export interface GetBlockRequest__Output { + 'height'?: (number); + 'hash'?: (string); + 'block': "height"|"hash"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetBlockResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetBlockResponse.ts new file mode 100644 index 0000000..c517f5d --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetBlockResponse.ts @@ -0,0 +1,10 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface GetBlockResponse { + 'block'?: (Buffer | Uint8Array | string); +} + +export interface GetBlockResponse__Output { + 'block': (Buffer); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetBlockchainStatusRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetBlockchainStatusRequest.ts new file mode 100644 index 0000000..3970558 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetBlockchainStatusRequest.ts @@ -0,0 +1,8 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface GetBlockchainStatusRequest { +} + +export interface GetBlockchainStatusRequest__Output { +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetBlockchainStatusResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetBlockchainStatusResponse.ts new file mode 100644 index 0000000..ed33f32 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetBlockchainStatusResponse.ts @@ -0,0 +1,107 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Chain { + 'name'?: (string); + 'headersCount'?: (number); + 'blocksCount'?: (number); + 'bestBlockHash'?: (Buffer | Uint8Array | string); + 'difficulty'?: (number | string); + 'chainWork'?: (Buffer | Uint8Array | string); + 'isSynced'?: (boolean); + 'syncProgress'?: (number | string); +} + +export interface _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Chain__Output { + 'name': (string); + 'headersCount': (number); + 'blocksCount': (number); + 'bestBlockHash': (Buffer); + 'difficulty': (number); + 'chainWork': (Buffer); + 'isSynced': (boolean); + 'syncProgress': (number); +} + +export interface _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Network { + 'peersCount'?: (number); + 'fee'?: (_org_dash_platform_dapi_v0_GetBlockchainStatusResponse_NetworkFee | null); +} + +export interface _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Network__Output { + 'peersCount': (number); + 'fee': (_org_dash_platform_dapi_v0_GetBlockchainStatusResponse_NetworkFee__Output | null); +} + +export interface _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_NetworkFee { + 'relay'?: (number | string); + 'incremental'?: (number | string); +} + +export interface _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_NetworkFee__Output { + 'relay': (number); + 'incremental': (number); +} + +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + +export const _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Status = { + NOT_STARTED: 'NOT_STARTED', + SYNCING: 'SYNCING', + READY: 'READY', + ERROR: 'ERROR', +} as const; + +export type _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Status = + | 'NOT_STARTED' + | 0 + | 'SYNCING' + | 1 + | 'READY' + | 2 + | 'ERROR' + | 3 + +export type _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Status__Output = typeof _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Status[keyof typeof _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Status] + +export interface _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Time { + 'now'?: (number); + 'offset'?: (number); + 'median'?: (number); +} + +export interface _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Time__Output { + 'now': (number); + 'offset': (number); + 'median': (number); +} + +export interface _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Version { + 'protocol'?: (number); + 'software'?: (number); + 'agent'?: (string); +} + +export interface _org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Version__Output { + 'protocol': (number); + 'software': (number); + 'agent': (string); +} + +export interface GetBlockchainStatusResponse { + 'version'?: (_org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Version | null); + 'time'?: (_org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Time | null); + 'status'?: (_org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Status); + 'syncProgress'?: (number | string); + 'chain'?: (_org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Chain | null); + 'network'?: (_org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Network | null); +} + +export interface GetBlockchainStatusResponse__Output { + 'version': (_org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Version__Output | null); + 'time': (_org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Time__Output | null); + 'status': (_org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Status__Output); + 'syncProgress': (number); + 'chain': (_org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Chain__Output | null); + 'network': (_org_dash_platform_dapi_v0_GetBlockchainStatusResponse_Network__Output | null); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetConsensusParamsRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetConsensusParamsRequest.ts new file mode 100644 index 0000000..f6494ae --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetConsensusParamsRequest.ts @@ -0,0 +1,22 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetConsensusParamsRequest_GetConsensusParamsRequestV0 { + 'height'?: (number); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetConsensusParamsRequest_GetConsensusParamsRequestV0__Output { + 'height': (number); + 'prove': (boolean); +} + +export interface GetConsensusParamsRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetConsensusParamsRequest_GetConsensusParamsRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetConsensusParamsRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetConsensusParamsRequest_GetConsensusParamsRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetConsensusParamsResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetConsensusParamsResponse.ts new file mode 100644 index 0000000..a1231e9 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetConsensusParamsResponse.ts @@ -0,0 +1,46 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetConsensusParamsResponse_ConsensusParamsBlock { + 'maxBytes'?: (string); + 'maxGas'?: (string); + 'timeIotaMs'?: (string); +} + +export interface _org_dash_platform_dapi_v0_GetConsensusParamsResponse_ConsensusParamsBlock__Output { + 'maxBytes': (string); + 'maxGas': (string); + 'timeIotaMs': (string); +} + +export interface _org_dash_platform_dapi_v0_GetConsensusParamsResponse_ConsensusParamsEvidence { + 'maxAgeNumBlocks'?: (string); + 'maxAgeDuration'?: (string); + 'maxBytes'?: (string); +} + +export interface _org_dash_platform_dapi_v0_GetConsensusParamsResponse_ConsensusParamsEvidence__Output { + 'maxAgeNumBlocks': (string); + 'maxAgeDuration': (string); + 'maxBytes': (string); +} + +export interface _org_dash_platform_dapi_v0_GetConsensusParamsResponse_GetConsensusParamsResponseV0 { + 'block'?: (_org_dash_platform_dapi_v0_GetConsensusParamsResponse_ConsensusParamsBlock | null); + 'evidence'?: (_org_dash_platform_dapi_v0_GetConsensusParamsResponse_ConsensusParamsEvidence | null); +} + +export interface _org_dash_platform_dapi_v0_GetConsensusParamsResponse_GetConsensusParamsResponseV0__Output { + 'block': (_org_dash_platform_dapi_v0_GetConsensusParamsResponse_ConsensusParamsBlock__Output | null); + 'evidence': (_org_dash_platform_dapi_v0_GetConsensusParamsResponse_ConsensusParamsEvidence__Output | null); +} + +export interface GetConsensusParamsResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetConsensusParamsResponse_GetConsensusParamsResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetConsensusParamsResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetConsensusParamsResponse_GetConsensusParamsResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceIdentityVotesRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceIdentityVotesRequest.ts new file mode 100644 index 0000000..f57a398 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceIdentityVotesRequest.ts @@ -0,0 +1,43 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../../google/protobuf/UInt32Value'; + +export interface _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0 { + 'identityId'?: (Buffer | Uint8Array | string); + 'limit'?: (_google_protobuf_UInt32Value | null); + 'offset'?: (_google_protobuf_UInt32Value | null); + 'orderAscending'?: (boolean); + 'startAtVotePollIdInfo'?: (_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo | null); + 'prove'?: (boolean); + '_startAtVotePollIdInfo'?: "startAtVotePollIdInfo"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0__Output { + 'identityId': (Buffer); + 'limit': (_google_protobuf_UInt32Value__Output | null); + 'offset': (_google_protobuf_UInt32Value__Output | null); + 'orderAscending': (boolean); + 'startAtVotePollIdInfo'?: (_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo__Output | null); + 'prove': (boolean); + '_startAtVotePollIdInfo': "startAtVotePollIdInfo"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo { + 'startAtPollIdentifier'?: (Buffer | Uint8Array | string); + 'startPollIdentifierIncluded'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo__Output { + 'startAtPollIdentifier': (Buffer); + 'startPollIdentifierIncluded': (boolean); +} + +export interface GetContestedResourceIdentityVotesRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetContestedResourceIdentityVotesRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceIdentityVotesResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceIdentityVotesResponse.ts new file mode 100644 index 0000000..279dfc3 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceIdentityVotesResponse.ts @@ -0,0 +1,82 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote { + 'contractId'?: (Buffer | Uint8Array | string); + 'documentTypeName'?: (string); + 'serializedIndexStorageValues'?: (Buffer | Uint8Array | string)[]; + 'voteChoice'?: (_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice | null); +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote__Output { + 'contractId': (Buffer); + 'documentTypeName': (string); + 'serializedIndexStorageValues': (Buffer)[]; + 'voteChoice': (_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice__Output | null); +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes { + 'contestedResourceIdentityVotes'?: (_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote)[]; + 'finishedResults'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes__Output { + 'contestedResourceIdentityVotes': (_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote__Output)[]; + 'finishedResults': (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0 { + 'votes'?: (_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "votes"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0__Output { + 'votes'?: (_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "votes"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice { + 'voteChoiceType'?: (_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType); + 'identityId'?: (Buffer | Uint8Array | string); + '_identityId'?: "identityId"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice__Output { + 'voteChoiceType': (_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType__Output); + 'identityId'?: (Buffer); + '_identityId': "identityId"; +} + +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +export const _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType = { + TOWARDS_IDENTITY: 'TOWARDS_IDENTITY', + ABSTAIN: 'ABSTAIN', + LOCK: 'LOCK', +} as const; + +export type _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType = + | 'TOWARDS_IDENTITY' + | 0 + | 'ABSTAIN' + | 1 + | 'LOCK' + | 2 + +export type _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType__Output = typeof _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType[keyof typeof _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType] + +export interface GetContestedResourceIdentityVotesResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetContestedResourceIdentityVotesResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceVoteStateRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceVoteStateRequest.ts new file mode 100644 index 0000000..9279cbd --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceVoteStateRequest.ts @@ -0,0 +1,68 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0 { + 'contractId'?: (Buffer | Uint8Array | string); + 'documentTypeName'?: (string); + 'indexName'?: (string); + 'indexValues'?: (Buffer | Uint8Array | string)[]; + 'resultType'?: (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType); + 'allowIncludeLockedAndAbstainingVoteTally'?: (boolean); + 'startAtIdentifierInfo'?: (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo | null); + 'count'?: (number); + 'prove'?: (boolean); + '_startAtIdentifierInfo'?: "startAtIdentifierInfo"; + '_count'?: "count"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0__Output { + 'contractId': (Buffer); + 'documentTypeName': (string); + 'indexName': (string); + 'indexValues': (Buffer)[]; + 'resultType': (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType__Output); + 'allowIncludeLockedAndAbstainingVoteTally': (boolean); + 'startAtIdentifierInfo'?: (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo__Output | null); + 'count'?: (number); + 'prove': (boolean); + '_startAtIdentifierInfo': "startAtIdentifierInfo"; + '_count': "count"; +} + +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +export const _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType = { + DOCUMENTS: 'DOCUMENTS', + VOTE_TALLY: 'VOTE_TALLY', + DOCUMENTS_AND_VOTE_TALLY: 'DOCUMENTS_AND_VOTE_TALLY', +} as const; + +export type _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType = + | 'DOCUMENTS' + | 0 + | 'VOTE_TALLY' + | 1 + | 'DOCUMENTS_AND_VOTE_TALLY' + | 2 + +export type _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType__Output = typeof _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType[keyof typeof _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType] + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo { + 'startIdentifier'?: (Buffer | Uint8Array | string); + 'startIdentifierIncluded'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo__Output { + 'startIdentifier': (Buffer); + 'startIdentifierIncluded': (boolean); +} + +export interface GetContestedResourceVoteStateRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetContestedResourceVoteStateRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceVoteStateResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceVoteStateResponse.ts new file mode 100644 index 0000000..ff7e731 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceVoteStateResponse.ts @@ -0,0 +1,103 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender { + 'identifier'?: (Buffer | Uint8Array | string); + 'voteCount'?: (number); + 'document'?: (Buffer | Uint8Array | string); + '_voteCount'?: "voteCount"; + '_document'?: "document"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender__Output { + 'identifier': (Buffer); + 'voteCount'?: (number); + 'document'?: (Buffer); + '_voteCount': "voteCount"; + '_document': "document"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders { + 'contenders'?: (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender)[]; + 'abstainVoteTally'?: (number); + 'lockVoteTally'?: (number); + 'finishedVoteInfo'?: (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo | null); + '_abstainVoteTally'?: "abstainVoteTally"; + '_lockVoteTally'?: "lockVoteTally"; + '_finishedVoteInfo'?: "finishedVoteInfo"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders__Output { + 'contenders': (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender__Output)[]; + 'abstainVoteTally'?: (number); + 'lockVoteTally'?: (number); + 'finishedVoteInfo'?: (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo__Output | null); + '_abstainVoteTally': "abstainVoteTally"; + '_lockVoteTally': "lockVoteTally"; + '_finishedVoteInfo': "finishedVoteInfo"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo { + 'finishedVoteOutcome'?: (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome); + 'wonByIdentityId'?: (Buffer | Uint8Array | string); + 'finishedAtBlockHeight'?: (number | string | Long); + 'finishedAtCoreBlockHeight'?: (number); + 'finishedAtBlockTimeMs'?: (number | string | Long); + 'finishedAtEpoch'?: (number); + '_wonByIdentityId'?: "wonByIdentityId"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo__Output { + 'finishedVoteOutcome': (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome__Output); + 'wonByIdentityId'?: (Buffer); + 'finishedAtBlockHeight': (string); + 'finishedAtCoreBlockHeight': (number); + 'finishedAtBlockTimeMs': (string); + 'finishedAtEpoch': (number); + '_wonByIdentityId': "wonByIdentityId"; +} + +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +export const _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome = { + TOWARDS_IDENTITY: 'TOWARDS_IDENTITY', + LOCKED: 'LOCKED', + NO_PREVIOUS_WINNER: 'NO_PREVIOUS_WINNER', +} as const; + +export type _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome = + | 'TOWARDS_IDENTITY' + | 0 + | 'LOCKED' + | 1 + | 'NO_PREVIOUS_WINNER' + | 2 + +export type _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome__Output = typeof _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome[keyof typeof _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome] + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0 { + 'contestedResourceContenders'?: (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "contestedResourceContenders"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0__Output { + 'contestedResourceContenders'?: (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "contestedResourceContenders"|"proof"; +} + +export interface GetContestedResourceVoteStateResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetContestedResourceVoteStateResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceVotersForIdentityRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceVotersForIdentityRequest.ts new file mode 100644 index 0000000..9867173 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceVotersForIdentityRequest.ts @@ -0,0 +1,50 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0 { + 'contractId'?: (Buffer | Uint8Array | string); + 'documentTypeName'?: (string); + 'indexName'?: (string); + 'indexValues'?: (Buffer | Uint8Array | string)[]; + 'contestantId'?: (Buffer | Uint8Array | string); + 'startAtIdentifierInfo'?: (_org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo | null); + 'count'?: (number); + 'orderAscending'?: (boolean); + 'prove'?: (boolean); + '_startAtIdentifierInfo'?: "startAtIdentifierInfo"; + '_count'?: "count"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0__Output { + 'contractId': (Buffer); + 'documentTypeName': (string); + 'indexName': (string); + 'indexValues': (Buffer)[]; + 'contestantId': (Buffer); + 'startAtIdentifierInfo'?: (_org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo__Output | null); + 'count'?: (number); + 'orderAscending': (boolean); + 'prove': (boolean); + '_startAtIdentifierInfo': "startAtIdentifierInfo"; + '_count': "count"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo { + 'startIdentifier'?: (Buffer | Uint8Array | string); + 'startIdentifierIncluded'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo__Output { + 'startIdentifier': (Buffer); + 'startIdentifierIncluded': (boolean); +} + +export interface GetContestedResourceVotersForIdentityRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetContestedResourceVotersForIdentityRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceVotersForIdentityResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceVotersForIdentityResponse.ts new file mode 100644 index 0000000..15d3cf4 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourceVotersForIdentityResponse.ts @@ -0,0 +1,38 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters { + 'voters'?: (Buffer | Uint8Array | string)[]; + 'finishedResults'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters__Output { + 'voters': (Buffer)[]; + 'finishedResults': (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0 { + 'contestedResourceVoters'?: (_org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "contestedResourceVoters"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0__Output { + 'contestedResourceVoters'?: (_org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "contestedResourceVoters"|"proof"; +} + +export interface GetContestedResourceVotersForIdentityResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetContestedResourceVotersForIdentityResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourcesRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourcesRequest.ts new file mode 100644 index 0000000..cf7f177 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourcesRequest.ts @@ -0,0 +1,50 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetContestedResourcesRequest_GetContestedResourcesRequestV0 { + 'contractId'?: (Buffer | Uint8Array | string); + 'documentTypeName'?: (string); + 'indexName'?: (string); + 'startIndexValues'?: (Buffer | Uint8Array | string)[]; + 'endIndexValues'?: (Buffer | Uint8Array | string)[]; + 'startAtValueInfo'?: (_org_dash_platform_dapi_v0_GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo | null); + 'count'?: (number); + 'orderAscending'?: (boolean); + 'prove'?: (boolean); + '_startAtValueInfo'?: "startAtValueInfo"; + '_count'?: "count"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourcesRequest_GetContestedResourcesRequestV0__Output { + 'contractId': (Buffer); + 'documentTypeName': (string); + 'indexName': (string); + 'startIndexValues': (Buffer)[]; + 'endIndexValues': (Buffer)[]; + 'startAtValueInfo'?: (_org_dash_platform_dapi_v0_GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo__Output | null); + 'count'?: (number); + 'orderAscending': (boolean); + 'prove': (boolean); + '_startAtValueInfo': "startAtValueInfo"; + '_count': "count"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo { + 'startValue'?: (Buffer | Uint8Array | string); + 'startValueIncluded'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo__Output { + 'startValue': (Buffer); + 'startValueIncluded': (boolean); +} + +export interface GetContestedResourcesRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourcesRequest_GetContestedResourcesRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetContestedResourcesRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourcesRequest_GetContestedResourcesRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourcesResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourcesResponse.ts new file mode 100644 index 0000000..8df5844 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetContestedResourcesResponse.ts @@ -0,0 +1,36 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues { + 'contestedResourceValues'?: (Buffer | Uint8Array | string)[]; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues__Output { + 'contestedResourceValues': (Buffer)[]; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourcesResponse_GetContestedResourcesResponseV0 { + 'contestedResourceValues'?: (_org_dash_platform_dapi_v0_GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "contestedResourceValues"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetContestedResourcesResponse_GetContestedResourcesResponseV0__Output { + 'contestedResourceValues'?: (_org_dash_platform_dapi_v0_GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "contestedResourceValues"|"proof"; +} + +export interface GetContestedResourcesResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourcesResponse_GetContestedResourcesResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetContestedResourcesResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetContestedResourcesResponse_GetContestedResourcesResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetCurrentQuorumsInfoRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetCurrentQuorumsInfoRequest.ts new file mode 100644 index 0000000..3486d03 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetCurrentQuorumsInfoRequest.ts @@ -0,0 +1,18 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0 { +} + +export interface _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0__Output { +} + +export interface GetCurrentQuorumsInfoRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetCurrentQuorumsInfoRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetCurrentQuorumsInfoResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetCurrentQuorumsInfoResponse.ts new file mode 100644 index 0000000..b69d46a --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetCurrentQuorumsInfoResponse.ts @@ -0,0 +1,55 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0 { + 'quorumHashes'?: (Buffer | Uint8Array | string)[]; + 'currentQuorumHash'?: (Buffer | Uint8Array | string); + 'validatorSets'?: (_org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse_ValidatorSetV0)[]; + 'lastBlockProposer'?: (Buffer | Uint8Array | string); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); +} + +export interface _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0__Output { + 'quorumHashes': (Buffer)[]; + 'currentQuorumHash': (Buffer); + 'validatorSets': (_org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse_ValidatorSetV0__Output)[]; + 'lastBlockProposer': (Buffer); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); +} + +export interface _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse_ValidatorSetV0 { + 'quorumHash'?: (Buffer | Uint8Array | string); + 'coreHeight'?: (number); + 'members'?: (_org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse_ValidatorV0)[]; + 'thresholdPublicKey'?: (Buffer | Uint8Array | string); +} + +export interface _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse_ValidatorSetV0__Output { + 'quorumHash': (Buffer); + 'coreHeight': (number); + 'members': (_org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse_ValidatorV0__Output)[]; + 'thresholdPublicKey': (Buffer); +} + +export interface _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse_ValidatorV0 { + 'proTxHash'?: (Buffer | Uint8Array | string); + 'nodeIp'?: (string); + 'isBanned'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse_ValidatorV0__Output { + 'proTxHash': (Buffer); + 'nodeIp': (string); + 'isBanned': (boolean); +} + +export interface GetCurrentQuorumsInfoResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetCurrentQuorumsInfoResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetDataContractHistoryRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetDataContractHistoryRequest.ts new file mode 100644 index 0000000..36af3c6 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetDataContractHistoryRequest.ts @@ -0,0 +1,30 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../../google/protobuf/UInt32Value'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetDataContractHistoryRequest_GetDataContractHistoryRequestV0 { + 'id'?: (Buffer | Uint8Array | string); + 'limit'?: (_google_protobuf_UInt32Value | null); + 'offset'?: (_google_protobuf_UInt32Value | null); + 'startAtMs'?: (number | string | Long); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetDataContractHistoryRequest_GetDataContractHistoryRequestV0__Output { + 'id': (Buffer); + 'limit': (_google_protobuf_UInt32Value__Output | null); + 'offset': (_google_protobuf_UInt32Value__Output | null); + 'startAtMs': (string); + 'prove': (boolean); +} + +export interface GetDataContractHistoryRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetDataContractHistoryRequest_GetDataContractHistoryRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetDataContractHistoryRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetDataContractHistoryRequest_GetDataContractHistoryRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetDataContractHistoryResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetDataContractHistoryResponse.ts new file mode 100644 index 0000000..386e5d3 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetDataContractHistoryResponse.ts @@ -0,0 +1,47 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory { + 'dataContractEntries'?: (_org_dash_platform_dapi_v0_GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry)[]; +} + +export interface _org_dash_platform_dapi_v0_GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory__Output { + 'dataContractEntries': (_org_dash_platform_dapi_v0_GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry__Output)[]; +} + +export interface _org_dash_platform_dapi_v0_GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry { + 'date'?: (number | string | Long); + 'value'?: (Buffer | Uint8Array | string); +} + +export interface _org_dash_platform_dapi_v0_GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry__Output { + 'date': (string); + 'value': (Buffer); +} + +export interface _org_dash_platform_dapi_v0_GetDataContractHistoryResponse_GetDataContractHistoryResponseV0 { + 'dataContractHistory'?: (_org_dash_platform_dapi_v0_GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "dataContractHistory"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetDataContractHistoryResponse_GetDataContractHistoryResponseV0__Output { + 'dataContractHistory'?: (_org_dash_platform_dapi_v0_GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "dataContractHistory"|"proof"; +} + +export interface GetDataContractHistoryResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetDataContractHistoryResponse_GetDataContractHistoryResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetDataContractHistoryResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetDataContractHistoryResponse_GetDataContractHistoryResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetDataContractRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetDataContractRequest.ts new file mode 100644 index 0000000..7ee504b --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetDataContractRequest.ts @@ -0,0 +1,22 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetDataContractRequest_GetDataContractRequestV0 { + 'id'?: (Buffer | Uint8Array | string); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetDataContractRequest_GetDataContractRequestV0__Output { + 'id': (Buffer); + 'prove': (boolean); +} + +export interface GetDataContractRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetDataContractRequest_GetDataContractRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetDataContractRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetDataContractRequest_GetDataContractRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetDataContractResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetDataContractResponse.ts new file mode 100644 index 0000000..168f377 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetDataContractResponse.ts @@ -0,0 +1,28 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetDataContractResponse_GetDataContractResponseV0 { + 'dataContract'?: (Buffer | Uint8Array | string); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "dataContract"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetDataContractResponse_GetDataContractResponseV0__Output { + 'dataContract'?: (Buffer); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "dataContract"|"proof"; +} + +export interface GetDataContractResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetDataContractResponse_GetDataContractResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetDataContractResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetDataContractResponse_GetDataContractResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetDataContractsRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetDataContractsRequest.ts new file mode 100644 index 0000000..95c79aa --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetDataContractsRequest.ts @@ -0,0 +1,22 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetDataContractsRequest_GetDataContractsRequestV0 { + 'ids'?: (Buffer | Uint8Array | string)[]; + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetDataContractsRequest_GetDataContractsRequestV0__Output { + 'ids': (Buffer)[]; + 'prove': (boolean); +} + +export interface GetDataContractsRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetDataContractsRequest_GetDataContractsRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetDataContractsRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetDataContractsRequest_GetDataContractsRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetDataContractsResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetDataContractsResponse.ts new file mode 100644 index 0000000..a9f9c78 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetDataContractsResponse.ts @@ -0,0 +1,47 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { BytesValue as _google_protobuf_BytesValue, BytesValue__Output as _google_protobuf_BytesValue__Output } from '../../../../../google/protobuf/BytesValue'; +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetDataContractsResponse_DataContractEntry { + 'identifier'?: (Buffer | Uint8Array | string); + 'dataContract'?: (_google_protobuf_BytesValue | null); +} + +export interface _org_dash_platform_dapi_v0_GetDataContractsResponse_DataContractEntry__Output { + 'identifier': (Buffer); + 'dataContract': (_google_protobuf_BytesValue__Output | null); +} + +export interface _org_dash_platform_dapi_v0_GetDataContractsResponse_DataContracts { + 'dataContractEntries'?: (_org_dash_platform_dapi_v0_GetDataContractsResponse_DataContractEntry)[]; +} + +export interface _org_dash_platform_dapi_v0_GetDataContractsResponse_DataContracts__Output { + 'dataContractEntries': (_org_dash_platform_dapi_v0_GetDataContractsResponse_DataContractEntry__Output)[]; +} + +export interface _org_dash_platform_dapi_v0_GetDataContractsResponse_GetDataContractsResponseV0 { + 'dataContracts'?: (_org_dash_platform_dapi_v0_GetDataContractsResponse_DataContracts | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "dataContracts"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetDataContractsResponse_GetDataContractsResponseV0__Output { + 'dataContracts'?: (_org_dash_platform_dapi_v0_GetDataContractsResponse_DataContracts__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "dataContracts"|"proof"; +} + +export interface GetDataContractsResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetDataContractsResponse_GetDataContractsResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetDataContractsResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetDataContractsResponse_GetDataContractsResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetDocumentsRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetDocumentsRequest.ts new file mode 100644 index 0000000..17dba08 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetDocumentsRequest.ts @@ -0,0 +1,36 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetDocumentsRequest_GetDocumentsRequestV0 { + 'dataContractId'?: (Buffer | Uint8Array | string); + 'documentType'?: (string); + 'where'?: (Buffer | Uint8Array | string); + 'orderBy'?: (Buffer | Uint8Array | string); + 'limit'?: (number); + 'startAfter'?: (Buffer | Uint8Array | string); + 'startAt'?: (Buffer | Uint8Array | string); + 'prove'?: (boolean); + 'start'?: "startAfter"|"startAt"; +} + +export interface _org_dash_platform_dapi_v0_GetDocumentsRequest_GetDocumentsRequestV0__Output { + 'dataContractId': (Buffer); + 'documentType': (string); + 'where': (Buffer); + 'orderBy': (Buffer); + 'limit': (number); + 'startAfter'?: (Buffer); + 'startAt'?: (Buffer); + 'prove': (boolean); + 'start': "startAfter"|"startAt"; +} + +export interface GetDocumentsRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetDocumentsRequest_GetDocumentsRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetDocumentsRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetDocumentsRequest_GetDocumentsRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetDocumentsResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetDocumentsResponse.ts new file mode 100644 index 0000000..c032ca0 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetDocumentsResponse.ts @@ -0,0 +1,36 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetDocumentsResponse_GetDocumentsResponseV0_Documents { + 'documents'?: (Buffer | Uint8Array | string)[]; +} + +export interface _org_dash_platform_dapi_v0_GetDocumentsResponse_GetDocumentsResponseV0_Documents__Output { + 'documents': (Buffer)[]; +} + +export interface _org_dash_platform_dapi_v0_GetDocumentsResponse_GetDocumentsResponseV0 { + 'documents'?: (_org_dash_platform_dapi_v0_GetDocumentsResponse_GetDocumentsResponseV0_Documents | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "documents"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetDocumentsResponse_GetDocumentsResponseV0__Output { + 'documents'?: (_org_dash_platform_dapi_v0_GetDocumentsResponse_GetDocumentsResponseV0_Documents__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "documents"|"proof"; +} + +export interface GetDocumentsResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetDocumentsResponse_GetDocumentsResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetDocumentsResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetDocumentsResponse_GetDocumentsResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetEpochsInfoRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetEpochsInfoRequest.ts new file mode 100644 index 0000000..bad0950 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetEpochsInfoRequest.ts @@ -0,0 +1,27 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../../google/protobuf/UInt32Value'; + +export interface _org_dash_platform_dapi_v0_GetEpochsInfoRequest_GetEpochsInfoRequestV0 { + 'startEpoch'?: (_google_protobuf_UInt32Value | null); + 'count'?: (number); + 'ascending'?: (boolean); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetEpochsInfoRequest_GetEpochsInfoRequestV0__Output { + 'startEpoch': (_google_protobuf_UInt32Value__Output | null); + 'count': (number); + 'ascending': (boolean); + 'prove': (boolean); +} + +export interface GetEpochsInfoRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetEpochsInfoRequest_GetEpochsInfoRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetEpochsInfoRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetEpochsInfoRequest_GetEpochsInfoRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetEpochsInfoResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetEpochsInfoResponse.ts new file mode 100644 index 0000000..0809456 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetEpochsInfoResponse.ts @@ -0,0 +1,55 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo { + 'number'?: (number); + 'firstBlockHeight'?: (number | string | Long); + 'firstCoreBlockHeight'?: (number); + 'startTime'?: (number | string | Long); + 'feeMultiplier'?: (number | string); + 'protocolVersion'?: (number); +} + +export interface _org_dash_platform_dapi_v0_GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo__Output { + 'number': (number); + 'firstBlockHeight': (string); + 'firstCoreBlockHeight': (number); + 'startTime': (string); + 'feeMultiplier': (number); + 'protocolVersion': (number); +} + +export interface _org_dash_platform_dapi_v0_GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos { + 'epochInfos'?: (_org_dash_platform_dapi_v0_GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo)[]; +} + +export interface _org_dash_platform_dapi_v0_GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos__Output { + 'epochInfos': (_org_dash_platform_dapi_v0_GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo__Output)[]; +} + +export interface _org_dash_platform_dapi_v0_GetEpochsInfoResponse_GetEpochsInfoResponseV0 { + 'epochs'?: (_org_dash_platform_dapi_v0_GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "epochs"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetEpochsInfoResponse_GetEpochsInfoResponseV0__Output { + 'epochs'?: (_org_dash_platform_dapi_v0_GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "epochs"|"proof"; +} + +export interface GetEpochsInfoResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetEpochsInfoResponse_GetEpochsInfoResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetEpochsInfoResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetEpochsInfoResponse_GetEpochsInfoResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetEstimatedTransactionFeeRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetEstimatedTransactionFeeRequest.ts new file mode 100644 index 0000000..85048e9 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetEstimatedTransactionFeeRequest.ts @@ -0,0 +1,10 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface GetEstimatedTransactionFeeRequest { + 'blocks'?: (number); +} + +export interface GetEstimatedTransactionFeeRequest__Output { + 'blocks': (number); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetEstimatedTransactionFeeResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetEstimatedTransactionFeeResponse.ts new file mode 100644 index 0000000..492f954 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetEstimatedTransactionFeeResponse.ts @@ -0,0 +1,10 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface GetEstimatedTransactionFeeResponse { + 'fee'?: (number | string); +} + +export interface GetEstimatedTransactionFeeResponse__Output { + 'fee': (number); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetEvonodesProposedEpochBlocksByIdsRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetEvonodesProposedEpochBlocksByIdsRequest.ts new file mode 100644 index 0000000..97f6588 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetEvonodesProposedEpochBlocksByIdsRequest.ts @@ -0,0 +1,26 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 { + 'epoch'?: (number); + 'ids'?: (Buffer | Uint8Array | string)[]; + 'prove'?: (boolean); + '_epoch'?: "epoch"; +} + +export interface _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0__Output { + 'epoch'?: (number); + 'ids': (Buffer)[]; + 'prove': (boolean); + '_epoch': "epoch"; +} + +export interface GetEvonodesProposedEpochBlocksByIdsRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetEvonodesProposedEpochBlocksByIdsRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetEvonodesProposedEpochBlocksByRangeRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetEvonodesProposedEpochBlocksByRangeRequest.ts new file mode 100644 index 0000000..f81f831 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetEvonodesProposedEpochBlocksByRangeRequest.ts @@ -0,0 +1,34 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 { + 'epoch'?: (number); + 'limit'?: (number); + 'startAfter'?: (Buffer | Uint8Array | string); + 'startAt'?: (Buffer | Uint8Array | string); + 'prove'?: (boolean); + '_epoch'?: "epoch"; + '_limit'?: "limit"; + 'start'?: "startAfter"|"startAt"; +} + +export interface _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0__Output { + 'epoch'?: (number); + 'limit'?: (number); + 'startAfter'?: (Buffer); + 'startAt'?: (Buffer); + 'prove': (boolean); + '_epoch': "epoch"; + '_limit': "limit"; + 'start': "startAfter"|"startAt"; +} + +export interface GetEvonodesProposedEpochBlocksByRangeRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetEvonodesProposedEpochBlocksByRangeRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetEvonodesProposedEpochBlocksResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetEvonodesProposedEpochBlocksResponse.ts new file mode 100644 index 0000000..d1096ad --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetEvonodesProposedEpochBlocksResponse.ts @@ -0,0 +1,47 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks { + 'proTxHash'?: (Buffer | Uint8Array | string); + 'count'?: (number | string | Long); +} + +export interface _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks__Output { + 'proTxHash': (Buffer); + 'count': (string); +} + +export interface _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks { + 'evonodesProposedBlockCounts'?: (_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks)[]; +} + +export interface _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks__Output { + 'evonodesProposedBlockCounts': (_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks__Output)[]; +} + +export interface _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 { + 'evonodesProposedBlockCountsInfo'?: (_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "evonodesProposedBlockCountsInfo"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0__Output { + 'evonodesProposedBlockCountsInfo'?: (_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "evonodesProposedBlockCountsInfo"|"proof"; +} + +export interface GetEvonodesProposedEpochBlocksResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetEvonodesProposedEpochBlocksResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetGroupActionSignersRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetGroupActionSignersRequest.ts new file mode 100644 index 0000000..9e52aff --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetGroupActionSignersRequest.ts @@ -0,0 +1,43 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +export const _org_dash_platform_dapi_v0_GetGroupActionSignersRequest_ActionStatus = { + ACTIVE: 'ACTIVE', + CLOSED: 'CLOSED', +} as const; + +export type _org_dash_platform_dapi_v0_GetGroupActionSignersRequest_ActionStatus = + | 'ACTIVE' + | 0 + | 'CLOSED' + | 1 + +export type _org_dash_platform_dapi_v0_GetGroupActionSignersRequest_ActionStatus__Output = typeof _org_dash_platform_dapi_v0_GetGroupActionSignersRequest_ActionStatus[keyof typeof _org_dash_platform_dapi_v0_GetGroupActionSignersRequest_ActionStatus] + +export interface _org_dash_platform_dapi_v0_GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 { + 'contractId'?: (Buffer | Uint8Array | string); + 'groupContractPosition'?: (number); + 'status'?: (_org_dash_platform_dapi_v0_GetGroupActionSignersRequest_ActionStatus); + 'actionId'?: (Buffer | Uint8Array | string); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionSignersRequest_GetGroupActionSignersRequestV0__Output { + 'contractId': (Buffer); + 'groupContractPosition': (number); + 'status': (_org_dash_platform_dapi_v0_GetGroupActionSignersRequest_ActionStatus__Output); + 'actionId': (Buffer); + 'prove': (boolean); +} + +export interface GetGroupActionSignersRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetGroupActionSignersRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupActionSignersRequest_GetGroupActionSignersRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetGroupActionSignersResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetGroupActionSignersResponse.ts new file mode 100644 index 0000000..d255f8e --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetGroupActionSignersResponse.ts @@ -0,0 +1,46 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 { + 'groupActionSigners'?: (_org_dash_platform_dapi_v0_GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "groupActionSigners"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionSignersResponse_GetGroupActionSignersResponseV0__Output { + 'groupActionSigners'?: (_org_dash_platform_dapi_v0_GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "groupActionSigners"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner { + 'signerId'?: (Buffer | Uint8Array | string); + 'power'?: (number); +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner__Output { + 'signerId': (Buffer); + 'power': (number); +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners { + 'signers'?: (_org_dash_platform_dapi_v0_GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner)[]; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners__Output { + 'signers': (_org_dash_platform_dapi_v0_GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner__Output)[]; +} + +export interface GetGroupActionSignersResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetGroupActionSignersResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupActionSignersResponse_GetGroupActionSignersResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetGroupActionsRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetGroupActionsRequest.ts new file mode 100644 index 0000000..2efddb9 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetGroupActionsRequest.ts @@ -0,0 +1,59 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +export const _org_dash_platform_dapi_v0_GetGroupActionsRequest_ActionStatus = { + ACTIVE: 'ACTIVE', + CLOSED: 'CLOSED', +} as const; + +export type _org_dash_platform_dapi_v0_GetGroupActionsRequest_ActionStatus = + | 'ACTIVE' + | 0 + | 'CLOSED' + | 1 + +export type _org_dash_platform_dapi_v0_GetGroupActionsRequest_ActionStatus__Output = typeof _org_dash_platform_dapi_v0_GetGroupActionsRequest_ActionStatus[keyof typeof _org_dash_platform_dapi_v0_GetGroupActionsRequest_ActionStatus] + +export interface _org_dash_platform_dapi_v0_GetGroupActionsRequest_GetGroupActionsRequestV0 { + 'contractId'?: (Buffer | Uint8Array | string); + 'groupContractPosition'?: (number); + 'status'?: (_org_dash_platform_dapi_v0_GetGroupActionsRequest_ActionStatus); + 'startAtActionId'?: (_org_dash_platform_dapi_v0_GetGroupActionsRequest_StartAtActionId | null); + 'count'?: (number); + 'prove'?: (boolean); + '_startAtActionId'?: "startAtActionId"; + '_count'?: "count"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsRequest_GetGroupActionsRequestV0__Output { + 'contractId': (Buffer); + 'groupContractPosition': (number); + 'status': (_org_dash_platform_dapi_v0_GetGroupActionsRequest_ActionStatus__Output); + 'startAtActionId'?: (_org_dash_platform_dapi_v0_GetGroupActionsRequest_StartAtActionId__Output | null); + 'count'?: (number); + 'prove': (boolean); + '_startAtActionId': "startAtActionId"; + '_count': "count"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsRequest_StartAtActionId { + 'startActionId'?: (Buffer | Uint8Array | string); + 'startActionIdIncluded'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsRequest_StartAtActionId__Output { + 'startActionId': (Buffer); + 'startActionIdIncluded': (boolean); +} + +export interface GetGroupActionsRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupActionsRequest_GetGroupActionsRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetGroupActionsRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupActionsRequest_GetGroupActionsRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetGroupActionsResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetGroupActionsResponse.ts new file mode 100644 index 0000000..e27a832 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetGroupActionsResponse.ts @@ -0,0 +1,270 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +export const _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType = { + PAUSE: 'PAUSE', + RESUME: 'RESUME', +} as const; + +export type _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType = + | 'PAUSE' + | 0 + | 'RESUME' + | 1 + +export type _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType__Output = typeof _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType[keyof typeof _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType] + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent { + 'amount'?: (number | string | Long); + 'publicNote'?: (string); + '_publicNote'?: "publicNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent__Output { + 'amount': (string); + 'publicNote'?: (string); + '_publicNote': "publicNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent { + 'update'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent | null); + 'type'?: "update"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent__Output { + 'update'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent__Output | null); + 'type': "update"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent { + 'updatedContract'?: (Buffer | Uint8Array | string); +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent__Output { + 'updatedContract': (Buffer); +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent { + 'frozenId'?: (Buffer | Uint8Array | string); + 'amount'?: (number | string | Long); + 'publicNote'?: (string); + '_publicNote'?: "publicNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent__Output { + 'frozenId': (Buffer); + 'amount': (string); + 'publicNote'?: (string); + '_publicNote': "publicNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent { + 'createdDocument'?: (Buffer | Uint8Array | string); +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent__Output { + 'createdDocument': (Buffer); +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent { + 'create'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent | null); + 'type'?: "create"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent__Output { + 'create'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent__Output | null); + 'type': "create"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent { + 'actionType'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType); + 'publicNote'?: (string); + '_publicNote'?: "publicNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent__Output { + 'actionType': (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType__Output); + 'publicNote'?: (string); + '_publicNote': "publicNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent { + 'frozenId'?: (Buffer | Uint8Array | string); + 'publicNote'?: (string); + '_publicNote'?: "publicNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent__Output { + 'frozenId': (Buffer); + 'publicNote'?: (string); + '_publicNote': "publicNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0 { + 'groupActions'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "groupActions"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0__Output { + 'groupActions'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "groupActions"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry { + 'actionId'?: (Buffer | Uint8Array | string); + 'event'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent | null); +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry__Output { + 'actionId': (Buffer); + 'event': (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent__Output | null); +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent { + 'tokenEvent'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent | null); + 'documentEvent'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent | null); + 'contractEvent'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent | null); + 'eventType'?: "tokenEvent"|"documentEvent"|"contractEvent"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent__Output { + 'tokenEvent'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent__Output | null); + 'documentEvent'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent__Output | null); + 'contractEvent'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent__Output | null); + 'eventType': "tokenEvent"|"documentEvent"|"contractEvent"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions { + 'groupActions'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry)[]; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions__Output { + 'groupActions': (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry__Output)[]; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent { + 'amount'?: (number | string | Long); + 'recipientId'?: (Buffer | Uint8Array | string); + 'publicNote'?: (string); + '_publicNote'?: "publicNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent__Output { + 'amount': (string); + 'recipientId': (Buffer); + 'publicNote'?: (string); + '_publicNote': "publicNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote { + 'rootEncryptionKeyIndex'?: (number); + 'derivationEncryptionKeyIndex'?: (number); + 'encryptedData'?: (Buffer | Uint8Array | string); +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote__Output { + 'rootEncryptionKeyIndex': (number); + 'derivationEncryptionKeyIndex': (number); + 'encryptedData': (Buffer); +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote { + 'senderKeyIndex'?: (number); + 'recipientKeyIndex'?: (number); + 'encryptedData'?: (Buffer | Uint8Array | string); +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote__Output { + 'senderKeyIndex': (number); + 'recipientKeyIndex': (number); + 'encryptedData': (Buffer); +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent { + 'tokenConfigUpdateItem'?: (Buffer | Uint8Array | string); + 'publicNote'?: (string); + '_publicNote'?: "publicNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent__Output { + 'tokenConfigUpdateItem': (Buffer); + 'publicNote'?: (string); + '_publicNote': "publicNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent { + 'mint'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent | null); + 'burn'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent | null); + 'freeze'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent | null); + 'unfreeze'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent | null); + 'destroyFrozenFunds'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent | null); + 'transfer'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent | null); + 'emergencyAction'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent | null); + 'tokenConfigUpdate'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent | null); + 'type'?: "mint"|"burn"|"freeze"|"unfreeze"|"destroyFrozenFunds"|"transfer"|"emergencyAction"|"tokenConfigUpdate"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent__Output { + 'mint'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent__Output | null); + 'burn'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent__Output | null); + 'freeze'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent__Output | null); + 'unfreeze'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent__Output | null); + 'destroyFrozenFunds'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent__Output | null); + 'transfer'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent__Output | null); + 'emergencyAction'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent__Output | null); + 'tokenConfigUpdate'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent__Output | null); + 'type': "mint"|"burn"|"freeze"|"unfreeze"|"destroyFrozenFunds"|"transfer"|"emergencyAction"|"tokenConfigUpdate"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent { + 'recipientId'?: (Buffer | Uint8Array | string); + 'publicNote'?: (string); + 'sharedEncryptedNote'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote | null); + 'personalEncryptedNote'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote | null); + 'amount'?: (number | string | Long); + '_publicNote'?: "publicNote"; + '_sharedEncryptedNote'?: "sharedEncryptedNote"; + '_personalEncryptedNote'?: "personalEncryptedNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent__Output { + 'recipientId': (Buffer); + 'publicNote'?: (string); + 'sharedEncryptedNote'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote__Output | null); + 'personalEncryptedNote'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote__Output | null); + 'amount': (string); + '_publicNote': "publicNote"; + '_sharedEncryptedNote': "sharedEncryptedNote"; + '_personalEncryptedNote': "personalEncryptedNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent { + 'frozenId'?: (Buffer | Uint8Array | string); + 'publicNote'?: (string); + '_publicNote'?: "publicNote"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent__Output { + 'frozenId': (Buffer); + 'publicNote'?: (string); + '_publicNote': "publicNote"; +} + +export interface GetGroupActionsResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetGroupActionsResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupActionsResponse_GetGroupActionsResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetGroupInfoRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetGroupInfoRequest.ts new file mode 100644 index 0000000..b6177eb --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetGroupInfoRequest.ts @@ -0,0 +1,24 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetGroupInfoRequest_GetGroupInfoRequestV0 { + 'contractId'?: (Buffer | Uint8Array | string); + 'groupContractPosition'?: (number); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfoRequest_GetGroupInfoRequestV0__Output { + 'contractId': (Buffer); + 'groupContractPosition': (number); + 'prove': (boolean); +} + +export interface GetGroupInfoRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupInfoRequest_GetGroupInfoRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetGroupInfoRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupInfoRequest_GetGroupInfoRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetGroupInfoResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetGroupInfoResponse.ts new file mode 100644 index 0000000..1cc9b2b --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetGroupInfoResponse.ts @@ -0,0 +1,58 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0 { + 'groupInfo'?: (_org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "groupInfo"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0__Output { + 'groupInfo'?: (_org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "groupInfo"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo { + 'groupInfo'?: (_org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry | null); + '_groupInfo'?: "groupInfo"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo__Output { + 'groupInfo'?: (_org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry__Output | null); + '_groupInfo': "groupInfo"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry { + 'members'?: (_org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry)[]; + 'groupRequiredPower'?: (number); +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry__Output { + 'members': (_org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry__Output)[]; + 'groupRequiredPower': (number); +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry { + 'memberId'?: (Buffer | Uint8Array | string); + 'power'?: (number); +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry__Output { + 'memberId': (Buffer); + 'power': (number); +} + +export interface GetGroupInfoResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetGroupInfoResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupInfoResponse_GetGroupInfoResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetGroupInfosRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetGroupInfosRequest.ts new file mode 100644 index 0000000..1f24e05 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetGroupInfosRequest.ts @@ -0,0 +1,40 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetGroupInfosRequest_GetGroupInfosRequestV0 { + 'contractId'?: (Buffer | Uint8Array | string); + 'startAtGroupContractPosition'?: (_org_dash_platform_dapi_v0_GetGroupInfosRequest_StartAtGroupContractPosition | null); + 'count'?: (number); + 'prove'?: (boolean); + '_startAtGroupContractPosition'?: "startAtGroupContractPosition"; + '_count'?: "count"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfosRequest_GetGroupInfosRequestV0__Output { + 'contractId': (Buffer); + 'startAtGroupContractPosition'?: (_org_dash_platform_dapi_v0_GetGroupInfosRequest_StartAtGroupContractPosition__Output | null); + 'count'?: (number); + 'prove': (boolean); + '_startAtGroupContractPosition': "startAtGroupContractPosition"; + '_count': "count"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfosRequest_StartAtGroupContractPosition { + 'startGroupContractPosition'?: (number); + 'startGroupContractPositionIncluded'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfosRequest_StartAtGroupContractPosition__Output { + 'startGroupContractPosition': (number); + 'startGroupContractPositionIncluded': (boolean); +} + +export interface GetGroupInfosRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupInfosRequest_GetGroupInfosRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetGroupInfosRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupInfosRequest_GetGroupInfosRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetGroupInfosResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetGroupInfosResponse.ts new file mode 100644 index 0000000..ae5200a --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetGroupInfosResponse.ts @@ -0,0 +1,58 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0 { + 'groupInfos'?: (_org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "groupInfos"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0__Output { + 'groupInfos'?: (_org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "groupInfos"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos { + 'groupInfos'?: (_org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry)[]; +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos__Output { + 'groupInfos': (_org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry__Output)[]; +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry { + 'memberId'?: (Buffer | Uint8Array | string); + 'power'?: (number); +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry__Output { + 'memberId': (Buffer); + 'power': (number); +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry { + 'groupContractPosition'?: (number); + 'members'?: (_org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry)[]; + 'groupRequiredPower'?: (number); +} + +export interface _org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry__Output { + 'groupContractPosition': (number); + 'members': (_org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry__Output)[]; + 'groupRequiredPower': (number); +} + +export interface GetGroupInfosResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetGroupInfosResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetGroupInfosResponse_GetGroupInfosResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesBalancesRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesBalancesRequest.ts new file mode 100644 index 0000000..f43185e --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesBalancesRequest.ts @@ -0,0 +1,22 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 { + 'ids'?: (Buffer | Uint8Array | string)[]; + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0__Output { + 'ids': (Buffer)[]; + 'prove': (boolean); +} + +export interface GetIdentitiesBalancesRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentitiesBalancesRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesBalancesResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesBalancesResponse.ts new file mode 100644 index 0000000..30699d5 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesBalancesResponse.ts @@ -0,0 +1,49 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 { + 'identitiesBalances'?: (_org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "identitiesBalances"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0__Output { + 'identitiesBalances'?: (_org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "identitiesBalances"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances { + 'entries'?: (_org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance)[]; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances__Output { + 'entries': (_org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance__Output)[]; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance { + 'identityId'?: (Buffer | Uint8Array | string); + 'balance'?: (number | string | Long); + '_balance'?: "balance"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance__Output { + 'identityId': (Buffer); + 'balance'?: (string); + '_balance': "balance"; +} + +export interface GetIdentitiesBalancesResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentitiesBalancesResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesContractKeysRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesContractKeysRequest.ts new file mode 100644 index 0000000..b35392d --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesContractKeysRequest.ts @@ -0,0 +1,31 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { KeyPurpose as _org_dash_platform_dapi_v0_KeyPurpose, KeyPurpose__Output as _org_dash_platform_dapi_v0_KeyPurpose__Output } from '../../../../../org/dash/platform/dapi/v0/KeyPurpose'; + +export interface _org_dash_platform_dapi_v0_GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0 { + 'identitiesIds'?: (Buffer | Uint8Array | string)[]; + 'contractId'?: (Buffer | Uint8Array | string); + 'documentTypeName'?: (string); + 'purposes'?: (_org_dash_platform_dapi_v0_KeyPurpose)[]; + 'prove'?: (boolean); + '_documentTypeName'?: "documentTypeName"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0__Output { + 'identitiesIds': (Buffer)[]; + 'contractId': (Buffer); + 'documentTypeName'?: (string); + 'purposes': (_org_dash_platform_dapi_v0_KeyPurpose__Output)[]; + 'prove': (boolean); + '_documentTypeName': "documentTypeName"; +} + +export interface GetIdentitiesContractKeysRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentitiesContractKeysRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesContractKeysResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesContractKeysResponse.ts new file mode 100644 index 0000000..f21c884 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesContractKeysResponse.ts @@ -0,0 +1,57 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { KeyPurpose as _org_dash_platform_dapi_v0_KeyPurpose, KeyPurpose__Output as _org_dash_platform_dapi_v0_KeyPurpose__Output } from '../../../../../org/dash/platform/dapi/v0/KeyPurpose'; + +export interface _org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0 { + 'identitiesKeys'?: (_org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "identitiesKeys"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0__Output { + 'identitiesKeys'?: (_org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "identitiesKeys"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys { + 'entries'?: (_org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys)[]; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys__Output { + 'entries': (_org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys__Output)[]; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys { + 'identityId'?: (Buffer | Uint8Array | string); + 'keys'?: (_org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys)[]; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys__Output { + 'identityId': (Buffer); + 'keys': (_org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys__Output)[]; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys { + 'purpose'?: (_org_dash_platform_dapi_v0_KeyPurpose); + 'keysBytes'?: (Buffer | Uint8Array | string)[]; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys__Output { + 'purpose': (_org_dash_platform_dapi_v0_KeyPurpose__Output); + 'keysBytes': (Buffer)[]; +} + +export interface GetIdentitiesContractKeysResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentitiesContractKeysResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesTokenBalancesRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesTokenBalancesRequest.ts new file mode 100644 index 0000000..68eb13a --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesTokenBalancesRequest.ts @@ -0,0 +1,24 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 { + 'tokenId'?: (Buffer | Uint8Array | string); + 'identityIds'?: (Buffer | Uint8Array | string)[]; + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0__Output { + 'tokenId': (Buffer); + 'identityIds': (Buffer)[]; + 'prove': (boolean); +} + +export interface GetIdentitiesTokenBalancesRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentitiesTokenBalancesRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesTokenBalancesResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesTokenBalancesResponse.ts new file mode 100644 index 0000000..2fd5c3b --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesTokenBalancesResponse.ts @@ -0,0 +1,49 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 { + 'identityTokenBalances'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "identityTokenBalances"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0__Output { + 'identityTokenBalances'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "identityTokenBalances"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry { + 'identityId'?: (Buffer | Uint8Array | string); + 'balance'?: (number | string | Long); + '_balance'?: "balance"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry__Output { + 'identityId': (Buffer); + 'balance'?: (string); + '_balance': "balance"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances { + 'identityTokenBalances'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry)[]; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances__Output { + 'identityTokenBalances': (_org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry__Output)[]; +} + +export interface GetIdentitiesTokenBalancesResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentitiesTokenBalancesResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesTokenInfosRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesTokenInfosRequest.ts new file mode 100644 index 0000000..5d20b9b --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesTokenInfosRequest.ts @@ -0,0 +1,24 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 { + 'tokenId'?: (Buffer | Uint8Array | string); + 'identityIds'?: (Buffer | Uint8Array | string)[]; + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0__Output { + 'tokenId': (Buffer); + 'identityIds': (Buffer)[]; + 'prove': (boolean); +} + +export interface GetIdentitiesTokenInfosRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentitiesTokenInfosRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesTokenInfosResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesTokenInfosResponse.ts new file mode 100644 index 0000000..d230d32 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentitiesTokenInfosResponse.ts @@ -0,0 +1,56 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 { + 'identityTokenInfos'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "identityTokenInfos"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0__Output { + 'identityTokenInfos'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "identityTokenInfos"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos { + 'tokenInfos'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry)[]; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos__Output { + 'tokenInfos': (_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry__Output)[]; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry { + 'frozen'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry__Output { + 'frozen': (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry { + 'identityId'?: (Buffer | Uint8Array | string); + 'info'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry | null); + '_info'?: "info"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry__Output { + 'identityId': (Buffer); + 'info'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry__Output | null); + '_info': "info"; +} + +export interface GetIdentitiesTokenInfosResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentitiesTokenInfosResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityBalanceAndRevisionRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityBalanceAndRevisionRequest.ts new file mode 100644 index 0000000..5130f8c --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityBalanceAndRevisionRequest.ts @@ -0,0 +1,22 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0 { + 'id'?: (Buffer | Uint8Array | string); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0__Output { + 'id': (Buffer); + 'prove': (boolean); +} + +export interface GetIdentityBalanceAndRevisionRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityBalanceAndRevisionRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityBalanceAndRevisionResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityBalanceAndRevisionResponse.ts new file mode 100644 index 0000000..51f65ff --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityBalanceAndRevisionResponse.ts @@ -0,0 +1,39 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision { + 'balance'?: (number | string | Long); + 'revision'?: (number | string | Long); +} + +export interface _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision__Output { + 'balance': (string); + 'revision': (string); +} + +export interface _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0 { + 'balanceAndRevision'?: (_org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "balanceAndRevision"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0__Output { + 'balanceAndRevision'?: (_org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "balanceAndRevision"|"proof"; +} + +export interface GetIdentityBalanceAndRevisionResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityBalanceAndRevisionResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityBalanceRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityBalanceRequest.ts new file mode 100644 index 0000000..1010a2d --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityBalanceRequest.ts @@ -0,0 +1,22 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetIdentityBalanceRequest_GetIdentityBalanceRequestV0 { + 'id'?: (Buffer | Uint8Array | string); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentityBalanceRequest_GetIdentityBalanceRequestV0__Output { + 'id': (Buffer); + 'prove': (boolean); +} + +export interface GetIdentityBalanceRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityBalanceRequest_GetIdentityBalanceRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityBalanceRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityBalanceRequest_GetIdentityBalanceRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityBalanceResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityBalanceResponse.ts new file mode 100644 index 0000000..c674c18 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityBalanceResponse.ts @@ -0,0 +1,29 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetIdentityBalanceResponse_GetIdentityBalanceResponseV0 { + 'balance'?: (number | string | Long); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "balance"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityBalanceResponse_GetIdentityBalanceResponseV0__Output { + 'balance'?: (string); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "balance"|"proof"; +} + +export interface GetIdentityBalanceResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityBalanceResponse_GetIdentityBalanceResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityBalanceResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityBalanceResponse_GetIdentityBalanceResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityByPublicKeyHashRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityByPublicKeyHashRequest.ts new file mode 100644 index 0000000..9e58475 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityByPublicKeyHashRequest.ts @@ -0,0 +1,22 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0 { + 'publicKeyHash'?: (Buffer | Uint8Array | string); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0__Output { + 'publicKeyHash': (Buffer); + 'prove': (boolean); +} + +export interface GetIdentityByPublicKeyHashRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityByPublicKeyHashRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityByPublicKeyHashResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityByPublicKeyHashResponse.ts new file mode 100644 index 0000000..15db390 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityByPublicKeyHashResponse.ts @@ -0,0 +1,28 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0 { + 'identity'?: (Buffer | Uint8Array | string); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "identity"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0__Output { + 'identity'?: (Buffer); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "identity"|"proof"; +} + +export interface GetIdentityByPublicKeyHashResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityByPublicKeyHashResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityContractNonceRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityContractNonceRequest.ts new file mode 100644 index 0000000..3c062cd --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityContractNonceRequest.ts @@ -0,0 +1,24 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0 { + 'identityId'?: (Buffer | Uint8Array | string); + 'contractId'?: (Buffer | Uint8Array | string); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0__Output { + 'identityId': (Buffer); + 'contractId': (Buffer); + 'prove': (boolean); +} + +export interface GetIdentityContractNonceRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityContractNonceRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityContractNonceResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityContractNonceResponse.ts new file mode 100644 index 0000000..94de687 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityContractNonceResponse.ts @@ -0,0 +1,29 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0 { + 'identityContractNonce'?: (number | string | Long); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "identityContractNonce"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0__Output { + 'identityContractNonce'?: (string); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "identityContractNonce"|"proof"; +} + +export interface GetIdentityContractNonceResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityContractNonceResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityKeysRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityKeysRequest.ts new file mode 100644 index 0000000..3e8bf13 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityKeysRequest.ts @@ -0,0 +1,30 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { KeyRequestType as _org_dash_platform_dapi_v0_KeyRequestType, KeyRequestType__Output as _org_dash_platform_dapi_v0_KeyRequestType__Output } from '../../../../../org/dash/platform/dapi/v0/KeyRequestType'; +import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../../google/protobuf/UInt32Value'; + +export interface _org_dash_platform_dapi_v0_GetIdentityKeysRequest_GetIdentityKeysRequestV0 { + 'identityId'?: (Buffer | Uint8Array | string); + 'requestType'?: (_org_dash_platform_dapi_v0_KeyRequestType | null); + 'limit'?: (_google_protobuf_UInt32Value | null); + 'offset'?: (_google_protobuf_UInt32Value | null); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentityKeysRequest_GetIdentityKeysRequestV0__Output { + 'identityId': (Buffer); + 'requestType': (_org_dash_platform_dapi_v0_KeyRequestType__Output | null); + 'limit': (_google_protobuf_UInt32Value__Output | null); + 'offset': (_google_protobuf_UInt32Value__Output | null); + 'prove': (boolean); +} + +export interface GetIdentityKeysRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityKeysRequest_GetIdentityKeysRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityKeysRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityKeysRequest_GetIdentityKeysRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityKeysResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityKeysResponse.ts new file mode 100644 index 0000000..a1ab9ea --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityKeysResponse.ts @@ -0,0 +1,36 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetIdentityKeysResponse_GetIdentityKeysResponseV0 { + 'keys'?: (_org_dash_platform_dapi_v0_GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "keys"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityKeysResponse_GetIdentityKeysResponseV0__Output { + 'keys'?: (_org_dash_platform_dapi_v0_GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "keys"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys { + 'keysBytes'?: (Buffer | Uint8Array | string)[]; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys__Output { + 'keysBytes': (Buffer)[]; +} + +export interface GetIdentityKeysResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityKeysResponse_GetIdentityKeysResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityKeysResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityKeysResponse_GetIdentityKeysResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityNonceRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityNonceRequest.ts new file mode 100644 index 0000000..60aee3d --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityNonceRequest.ts @@ -0,0 +1,22 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetIdentityNonceRequest_GetIdentityNonceRequestV0 { + 'identityId'?: (Buffer | Uint8Array | string); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentityNonceRequest_GetIdentityNonceRequestV0__Output { + 'identityId': (Buffer); + 'prove': (boolean); +} + +export interface GetIdentityNonceRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityNonceRequest_GetIdentityNonceRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityNonceRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityNonceRequest_GetIdentityNonceRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityNonceResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityNonceResponse.ts new file mode 100644 index 0000000..c978914 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityNonceResponse.ts @@ -0,0 +1,29 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetIdentityNonceResponse_GetIdentityNonceResponseV0 { + 'identityNonce'?: (number | string | Long); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "identityNonce"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityNonceResponse_GetIdentityNonceResponseV0__Output { + 'identityNonce'?: (string); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "identityNonce"|"proof"; +} + +export interface GetIdentityNonceResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityNonceResponse_GetIdentityNonceResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityNonceResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityNonceResponse_GetIdentityNonceResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityRequest.ts new file mode 100644 index 0000000..be413df --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityRequest.ts @@ -0,0 +1,22 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetIdentityRequest_GetIdentityRequestV0 { + 'id'?: (Buffer | Uint8Array | string); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentityRequest_GetIdentityRequestV0__Output { + 'id': (Buffer); + 'prove': (boolean); +} + +export interface GetIdentityRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityRequest_GetIdentityRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityRequest_GetIdentityRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityResponse.ts new file mode 100644 index 0000000..4b8b441 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityResponse.ts @@ -0,0 +1,28 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetIdentityResponse_GetIdentityResponseV0 { + 'identity'?: (Buffer | Uint8Array | string); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "identity"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityResponse_GetIdentityResponseV0__Output { + 'identity'?: (Buffer); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "identity"|"proof"; +} + +export interface GetIdentityResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityResponse_GetIdentityResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityResponse_GetIdentityResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityTokenBalancesRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityTokenBalancesRequest.ts new file mode 100644 index 0000000..01013e7 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityTokenBalancesRequest.ts @@ -0,0 +1,24 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 { + 'identityId'?: (Buffer | Uint8Array | string); + 'tokenIds'?: (Buffer | Uint8Array | string)[]; + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0__Output { + 'identityId': (Buffer); + 'tokenIds': (Buffer)[]; + 'prove': (boolean); +} + +export interface GetIdentityTokenBalancesRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityTokenBalancesRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityTokenBalancesResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityTokenBalancesResponse.ts new file mode 100644 index 0000000..08712bc --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityTokenBalancesResponse.ts @@ -0,0 +1,49 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 { + 'tokenBalances'?: (_org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "tokenBalances"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0__Output { + 'tokenBalances'?: (_org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "tokenBalances"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry { + 'tokenId'?: (Buffer | Uint8Array | string); + 'balance'?: (number | string | Long); + '_balance'?: "balance"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry__Output { + 'tokenId': (Buffer); + 'balance'?: (string); + '_balance': "balance"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances { + 'tokenBalances'?: (_org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry)[]; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances__Output { + 'tokenBalances': (_org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry__Output)[]; +} + +export interface GetIdentityTokenBalancesResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityTokenBalancesResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityTokenInfosRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityTokenInfosRequest.ts new file mode 100644 index 0000000..b0ecad8 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityTokenInfosRequest.ts @@ -0,0 +1,24 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 { + 'identityId'?: (Buffer | Uint8Array | string); + 'tokenIds'?: (Buffer | Uint8Array | string)[]; + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0__Output { + 'identityId': (Buffer); + 'tokenIds': (Buffer)[]; + 'prove': (boolean); +} + +export interface GetIdentityTokenInfosRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityTokenInfosRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetIdentityTokenInfosResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityTokenInfosResponse.ts new file mode 100644 index 0000000..b45b016 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetIdentityTokenInfosResponse.ts @@ -0,0 +1,56 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 { + 'tokenInfos'?: (_org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "tokenInfos"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0__Output { + 'tokenInfos'?: (_org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "tokenInfos"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry { + 'frozen'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry__Output { + 'frozen': (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry { + 'tokenId'?: (Buffer | Uint8Array | string); + 'info'?: (_org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry | null); + '_info'?: "info"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry__Output { + 'tokenId': (Buffer); + 'info'?: (_org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry__Output | null); + '_info': "info"; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos { + 'tokenInfos'?: (_org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry)[]; +} + +export interface _org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos__Output { + 'tokenInfos': (_org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry__Output)[]; +} + +export interface GetIdentityTokenInfosResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetIdentityTokenInfosResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetMasternodeStatusRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetMasternodeStatusRequest.ts new file mode 100644 index 0000000..a56ad03 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetMasternodeStatusRequest.ts @@ -0,0 +1,8 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface GetMasternodeStatusRequest { +} + +export interface GetMasternodeStatusRequest__Output { +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetMasternodeStatusResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetMasternodeStatusResponse.ts new file mode 100644 index 0000000..dde1e5b --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetMasternodeStatusResponse.ts @@ -0,0 +1,51 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + +export const _org_dash_platform_dapi_v0_GetMasternodeStatusResponse_Status = { + UNKNOWN: 'UNKNOWN', + WAITING_FOR_PROTX: 'WAITING_FOR_PROTX', + POSE_BANNED: 'POSE_BANNED', + REMOVED: 'REMOVED', + OPERATOR_KEY_CHANGED: 'OPERATOR_KEY_CHANGED', + PROTX_IP_CHANGED: 'PROTX_IP_CHANGED', + READY: 'READY', + ERROR: 'ERROR', +} as const; + +export type _org_dash_platform_dapi_v0_GetMasternodeStatusResponse_Status = + | 'UNKNOWN' + | 0 + | 'WAITING_FOR_PROTX' + | 1 + | 'POSE_BANNED' + | 2 + | 'REMOVED' + | 3 + | 'OPERATOR_KEY_CHANGED' + | 4 + | 'PROTX_IP_CHANGED' + | 5 + | 'READY' + | 6 + | 'ERROR' + | 7 + +export type _org_dash_platform_dapi_v0_GetMasternodeStatusResponse_Status__Output = typeof _org_dash_platform_dapi_v0_GetMasternodeStatusResponse_Status[keyof typeof _org_dash_platform_dapi_v0_GetMasternodeStatusResponse_Status] + +export interface GetMasternodeStatusResponse { + 'status'?: (_org_dash_platform_dapi_v0_GetMasternodeStatusResponse_Status); + 'proTxHash'?: (Buffer | Uint8Array | string); + 'posePenalty'?: (number); + 'isSynced'?: (boolean); + 'syncProgress'?: (number | string); +} + +export interface GetMasternodeStatusResponse__Output { + 'status': (_org_dash_platform_dapi_v0_GetMasternodeStatusResponse_Status__Output); + 'proTxHash': (Buffer); + 'posePenalty': (number); + 'isSynced': (boolean); + 'syncProgress': (number); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetPathElementsRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetPathElementsRequest.ts new file mode 100644 index 0000000..2eb72e0 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetPathElementsRequest.ts @@ -0,0 +1,24 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetPathElementsRequest_GetPathElementsRequestV0 { + 'path'?: (Buffer | Uint8Array | string)[]; + 'keys'?: (Buffer | Uint8Array | string)[]; + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetPathElementsRequest_GetPathElementsRequestV0__Output { + 'path': (Buffer)[]; + 'keys': (Buffer)[]; + 'prove': (boolean); +} + +export interface GetPathElementsRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetPathElementsRequest_GetPathElementsRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetPathElementsRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetPathElementsRequest_GetPathElementsRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetPathElementsResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetPathElementsResponse.ts new file mode 100644 index 0000000..ffc05e0 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetPathElementsResponse.ts @@ -0,0 +1,36 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetPathElementsResponse_GetPathElementsResponseV0_Elements { + 'elements'?: (Buffer | Uint8Array | string)[]; +} + +export interface _org_dash_platform_dapi_v0_GetPathElementsResponse_GetPathElementsResponseV0_Elements__Output { + 'elements': (Buffer)[]; +} + +export interface _org_dash_platform_dapi_v0_GetPathElementsResponse_GetPathElementsResponseV0 { + 'elements'?: (_org_dash_platform_dapi_v0_GetPathElementsResponse_GetPathElementsResponseV0_Elements | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "elements"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetPathElementsResponse_GetPathElementsResponseV0__Output { + 'elements'?: (_org_dash_platform_dapi_v0_GetPathElementsResponse_GetPathElementsResponseV0_Elements__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "elements"|"proof"; +} + +export interface GetPathElementsResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetPathElementsResponse_GetPathElementsResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetPathElementsResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetPathElementsResponse_GetPathElementsResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetPrefundedSpecializedBalanceRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetPrefundedSpecializedBalanceRequest.ts new file mode 100644 index 0000000..479fb1c --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetPrefundedSpecializedBalanceRequest.ts @@ -0,0 +1,22 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0 { + 'id'?: (Buffer | Uint8Array | string); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0__Output { + 'id': (Buffer); + 'prove': (boolean); +} + +export interface GetPrefundedSpecializedBalanceRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetPrefundedSpecializedBalanceRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetPrefundedSpecializedBalanceResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetPrefundedSpecializedBalanceResponse.ts new file mode 100644 index 0000000..3c74d95 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetPrefundedSpecializedBalanceResponse.ts @@ -0,0 +1,29 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0 { + 'balance'?: (number | string | Long); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "balance"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0__Output { + 'balance'?: (string); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "balance"|"proof"; +} + +export interface GetPrefundedSpecializedBalanceResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetPrefundedSpecializedBalanceResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetProofsRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetProofsRequest.ts new file mode 100644 index 0000000..ee97989 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetProofsRequest.ts @@ -0,0 +1,159 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest { + 'contractId'?: (Buffer | Uint8Array | string); + 'documentTypeName'?: (string); + 'indexName'?: (string); + 'indexValues'?: (Buffer | Uint8Array | string)[]; + 'voterIdentifier'?: (Buffer | Uint8Array | string); +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest__Output { + 'contractId': (Buffer); + 'documentTypeName': (string); + 'indexName': (string); + 'indexValues': (Buffer)[]; + 'voterIdentifier': (Buffer); +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_ContractRequest { + 'contractId'?: (Buffer | Uint8Array | string); +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_ContractRequest__Output { + 'contractId': (Buffer); +} + +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +export const _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus = { + NOT_CONTESTED: 'NOT_CONTESTED', + MAYBE_CONTESTED: 'MAYBE_CONTESTED', + CONTESTED: 'CONTESTED', +} as const; + +export type _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus = + | 'NOT_CONTESTED' + | 0 + | 'MAYBE_CONTESTED' + | 1 + | 'CONTESTED' + | 2 + +export type _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus__Output = typeof _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus[keyof typeof _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus] + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_DocumentRequest { + 'contractId'?: (Buffer | Uint8Array | string); + 'documentType'?: (string); + 'documentTypeKeepsHistory'?: (boolean); + 'documentId'?: (Buffer | Uint8Array | string); + 'documentContestedStatus'?: (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus); +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_DocumentRequest__Output { + 'contractId': (Buffer); + 'documentType': (string); + 'documentTypeKeepsHistory': (boolean); + 'documentId': (Buffer); + 'documentContestedStatus': (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus__Output); +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0 { + 'identities'?: (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityRequest)[]; + 'contracts'?: (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_ContractRequest)[]; + 'documents'?: (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_DocumentRequest)[]; + 'votes'?: (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_VoteStatusRequest)[]; + 'identityTokenBalances'?: (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest)[]; + 'identityTokenInfos'?: (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest)[]; + 'tokenStatuses'?: (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_TokenStatusRequest)[]; +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0__Output { + 'identities': (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityRequest__Output)[]; + 'contracts': (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_ContractRequest__Output)[]; + 'documents': (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_DocumentRequest__Output)[]; + 'votes': (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_VoteStatusRequest__Output)[]; + 'identityTokenBalances': (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest__Output)[]; + 'identityTokenInfos': (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest__Output)[]; + 'tokenStatuses': (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_TokenStatusRequest__Output)[]; +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityRequest { + 'identityId'?: (Buffer | Uint8Array | string); + 'requestType'?: (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type); +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityRequest__Output { + 'identityId': (Buffer); + 'requestType': (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type__Output); +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest { + 'tokenId'?: (Buffer | Uint8Array | string); + 'identityId'?: (Buffer | Uint8Array | string); +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest__Output { + 'tokenId': (Buffer); + 'identityId': (Buffer); +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest { + 'tokenId'?: (Buffer | Uint8Array | string); + 'identityId'?: (Buffer | Uint8Array | string); +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest__Output { + 'tokenId': (Buffer); + 'identityId': (Buffer); +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_TokenStatusRequest { + 'tokenId'?: (Buffer | Uint8Array | string); +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_TokenStatusRequest__Output { + 'tokenId': (Buffer); +} + +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +export const _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type = { + FULL_IDENTITY: 'FULL_IDENTITY', + BALANCE: 'BALANCE', + KEYS: 'KEYS', + REVISION: 'REVISION', +} as const; + +export type _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type = + | 'FULL_IDENTITY' + | 0 + | 'BALANCE' + | 1 + | 'KEYS' + | 2 + | 'REVISION' + | 3 + +export type _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type__Output = typeof _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type[keyof typeof _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type] + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_VoteStatusRequest { + 'contestedResourceVoteStatusRequest'?: (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest | null); + 'requestType'?: "contestedResourceVoteStatusRequest"; +} + +export interface _org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_VoteStatusRequest__Output { + 'contestedResourceVoteStatusRequest'?: (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest__Output | null); + 'requestType': "contestedResourceVoteStatusRequest"; +} + +export interface GetProofsRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetProofsRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetProofsRequest_GetProofsRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetProofsResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetProofsResponse.ts new file mode 100644 index 0000000..12d1541 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetProofsResponse.ts @@ -0,0 +1,26 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetProofsResponse_GetProofsResponseV0 { + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "proof"; +} + +export interface _org_dash_platform_dapi_v0_GetProofsResponse_GetProofsResponseV0__Output { + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "proof"; +} + +export interface GetProofsResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetProofsResponse_GetProofsResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetProofsResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetProofsResponse_GetProofsResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetProtocolVersionUpgradeStateRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetProtocolVersionUpgradeStateRequest.ts new file mode 100644 index 0000000..6569343 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetProtocolVersionUpgradeStateRequest.ts @@ -0,0 +1,20 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0 { + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0__Output { + 'prove': (boolean); +} + +export interface GetProtocolVersionUpgradeStateRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetProtocolVersionUpgradeStateRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetProtocolVersionUpgradeStateResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetProtocolVersionUpgradeStateResponse.ts new file mode 100644 index 0000000..484f767 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetProtocolVersionUpgradeStateResponse.ts @@ -0,0 +1,46 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0 { + 'versions'?: (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "versions"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0__Output { + 'versions'?: (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "versions"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry { + 'versionNumber'?: (number); + 'voteCount'?: (number); +} + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry__Output { + 'versionNumber': (number); + 'voteCount': (number); +} + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions { + 'versions'?: (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry)[]; +} + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions__Output { + 'versions': (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry__Output)[]; +} + +export interface GetProtocolVersionUpgradeStateResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetProtocolVersionUpgradeStateResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetProtocolVersionUpgradeVoteStatusRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetProtocolVersionUpgradeVoteStatusRequest.ts new file mode 100644 index 0000000..33d0e38 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetProtocolVersionUpgradeVoteStatusRequest.ts @@ -0,0 +1,24 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0 { + 'startProTxHash'?: (Buffer | Uint8Array | string); + 'count'?: (number); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0__Output { + 'startProTxHash': (Buffer); + 'count': (number); + 'prove': (boolean); +} + +export interface GetProtocolVersionUpgradeVoteStatusRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetProtocolVersionUpgradeVoteStatusRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetProtocolVersionUpgradeVoteStatusResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetProtocolVersionUpgradeVoteStatusResponse.ts new file mode 100644 index 0000000..de31a32 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetProtocolVersionUpgradeVoteStatusResponse.ts @@ -0,0 +1,46 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0 { + 'versions'?: (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "versions"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0__Output { + 'versions'?: (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "versions"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal { + 'proTxHash'?: (Buffer | Uint8Array | string); + 'version'?: (number); +} + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal__Output { + 'proTxHash': (Buffer); + 'version': (number); +} + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals { + 'versionSignals'?: (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal)[]; +} + +export interface _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals__Output { + 'versionSignals': (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal__Output)[]; +} + +export interface GetProtocolVersionUpgradeVoteStatusResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetProtocolVersionUpgradeVoteStatusResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetStatusRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetStatusRequest.ts new file mode 100644 index 0000000..645cb06 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetStatusRequest.ts @@ -0,0 +1,18 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetStatusRequest_GetStatusRequestV0 { +} + +export interface _org_dash_platform_dapi_v0_GetStatusRequest_GetStatusRequestV0__Output { +} + +export interface GetStatusRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetStatusRequest_GetStatusRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetStatusRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetStatusRequest_GetStatusRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetStatusResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetStatusResponse.ts new file mode 100644 index 0000000..e5e5657 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetStatusResponse.ts @@ -0,0 +1,179 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Chain { + 'catchingUp'?: (boolean); + 'latestBlockHash'?: (Buffer | Uint8Array | string); + 'latestAppHash'?: (Buffer | Uint8Array | string); + 'latestBlockHeight'?: (number | string | Long); + 'earliestBlockHash'?: (Buffer | Uint8Array | string); + 'earliestAppHash'?: (Buffer | Uint8Array | string); + 'earliestBlockHeight'?: (number | string | Long); + 'maxPeerBlockHeight'?: (number | string | Long); + 'coreChainLockedHeight'?: (number); + '_coreChainLockedHeight'?: "coreChainLockedHeight"; +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Chain__Output { + 'catchingUp': (boolean); + 'latestBlockHash': (Buffer); + 'latestAppHash': (Buffer); + 'latestBlockHeight': (string); + 'earliestBlockHash': (Buffer); + 'earliestAppHash': (Buffer); + 'earliestBlockHeight': (string); + 'maxPeerBlockHeight': (string); + 'coreChainLockedHeight'?: (number); + '_coreChainLockedHeight': "coreChainLockedHeight"; +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive { + 'latest'?: (number); + 'current'?: (number); +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive__Output { + 'latest': (number); + 'current': (number); +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0 { + 'version'?: (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version | null); + 'node'?: (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Node | null); + 'chain'?: (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Chain | null); + 'network'?: (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Network | null); + 'stateSync'?: (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_StateSync | null); + 'time'?: (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Time | null); +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0__Output { + 'version': (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version__Output | null); + 'node': (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Node__Output | null); + 'chain': (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Chain__Output | null); + 'network': (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Network__Output | null); + 'stateSync': (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_StateSync__Output | null); + 'time': (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Time__Output | null); +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Network { + 'chainId'?: (string); + 'peersCount'?: (number); + 'listening'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Network__Output { + 'chainId': (string); + 'peersCount': (number); + 'listening': (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Node { + 'id'?: (Buffer | Uint8Array | string); + 'proTxHash'?: (Buffer | Uint8Array | string); + '_proTxHash'?: "proTxHash"; +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Node__Output { + 'id': (Buffer); + 'proTxHash'?: (Buffer); + '_proTxHash': "proTxHash"; +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Protocol { + 'tenderdash'?: (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash | null); + 'drive'?: (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive | null); +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Protocol__Output { + 'tenderdash': (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash__Output | null); + 'drive': (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive__Output | null); +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Software { + 'dapi'?: (string); + 'drive'?: (string); + 'tenderdash'?: (string); + '_drive'?: "drive"; + '_tenderdash'?: "tenderdash"; +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Software__Output { + 'dapi': (string); + 'drive'?: (string); + 'tenderdash'?: (string); + '_drive': "drive"; + '_tenderdash': "tenderdash"; +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_StateSync { + 'totalSyncedTime'?: (number | string | Long); + 'remainingTime'?: (number | string | Long); + 'totalSnapshots'?: (number); + 'chunkProcessAvgTime'?: (number | string | Long); + 'snapshotHeight'?: (number | string | Long); + 'snapshotChunksCount'?: (number | string | Long); + 'backfilledBlocks'?: (number | string | Long); + 'backfillBlocksTotal'?: (number | string | Long); +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_StateSync__Output { + 'totalSyncedTime': (string); + 'remainingTime': (string); + 'totalSnapshots': (number); + 'chunkProcessAvgTime': (string); + 'snapshotHeight': (string); + 'snapshotChunksCount': (string); + 'backfilledBlocks': (string); + 'backfillBlocksTotal': (string); +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash { + 'p2p'?: (number); + 'block'?: (number); +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash__Output { + 'p2p': (number); + 'block': (number); +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Time { + 'local'?: (number | string | Long); + 'block'?: (number | string | Long); + 'genesis'?: (number | string | Long); + 'epoch'?: (number); + '_block'?: "block"; + '_genesis'?: "genesis"; + '_epoch'?: "epoch"; +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Time__Output { + 'local': (string); + 'block'?: (string); + 'genesis'?: (string); + 'epoch'?: (number); + '_block': "block"; + '_genesis': "genesis"; + '_epoch': "epoch"; +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version { + 'software'?: (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Software | null); + 'protocol'?: (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Protocol | null); +} + +export interface _org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version__Output { + 'software': (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Software__Output | null); + 'protocol': (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0_Version_Protocol__Output | null); +} + +export interface GetStatusResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetStatusResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetStatusResponse_GetStatusResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetTokenPreProgrammedDistributionsRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetTokenPreProgrammedDistributionsRequest.ts new file mode 100644 index 0000000..a35a4bc --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetTokenPreProgrammedDistributionsRequest.ts @@ -0,0 +1,47 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 { + 'tokenId'?: (Buffer | Uint8Array | string); + 'startAtInfo'?: (_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo | null); + 'limit'?: (number); + 'prove'?: (boolean); + '_startAtInfo'?: "startAtInfo"; + '_limit'?: "limit"; +} + +export interface _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0__Output { + 'tokenId': (Buffer); + 'startAtInfo'?: (_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo__Output | null); + 'limit'?: (number); + 'prove': (boolean); + '_startAtInfo': "startAtInfo"; + '_limit': "limit"; +} + +export interface _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo { + 'startTimeMs'?: (number | string | Long); + 'startRecipient'?: (Buffer | Uint8Array | string); + 'startRecipientIncluded'?: (boolean); + '_startRecipient'?: "startRecipient"; + '_startRecipientIncluded'?: "startRecipientIncluded"; +} + +export interface _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo__Output { + 'startTimeMs': (string); + 'startRecipient'?: (Buffer); + 'startRecipientIncluded'?: (boolean); + '_startRecipient': "startRecipient"; + '_startRecipientIncluded': "startRecipientIncluded"; +} + +export interface GetTokenPreProgrammedDistributionsRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetTokenPreProgrammedDistributionsRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetTokenPreProgrammedDistributionsResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetTokenPreProgrammedDistributionsResponse.ts new file mode 100644 index 0000000..bc4f66f --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetTokenPreProgrammedDistributionsResponse.ts @@ -0,0 +1,57 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 { + 'tokenDistributions'?: (_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "tokenDistributions"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0__Output { + 'tokenDistributions'?: (_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "tokenDistributions"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry { + 'recipientId'?: (Buffer | Uint8Array | string); + 'amount'?: (number | string | Long); +} + +export interface _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry__Output { + 'recipientId': (Buffer); + 'amount': (string); +} + +export interface _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions { + 'tokenDistributions'?: (_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry)[]; +} + +export interface _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions__Output { + 'tokenDistributions': (_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry__Output)[]; +} + +export interface _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry { + 'timestamp'?: (number | string | Long); + 'distributions'?: (_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry)[]; +} + +export interface _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry__Output { + 'timestamp': (string); + 'distributions': (_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry__Output)[]; +} + +export interface GetTokenPreProgrammedDistributionsResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetTokenPreProgrammedDistributionsResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetTokenStatusesRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetTokenStatusesRequest.ts new file mode 100644 index 0000000..3a4299a --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetTokenStatusesRequest.ts @@ -0,0 +1,22 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetTokenStatusesRequest_GetTokenStatusesRequestV0 { + 'tokenIds'?: (Buffer | Uint8Array | string)[]; + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetTokenStatusesRequest_GetTokenStatusesRequestV0__Output { + 'tokenIds': (Buffer)[]; + 'prove': (boolean); +} + +export interface GetTokenStatusesRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetTokenStatusesRequest_GetTokenStatusesRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetTokenStatusesRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetTokenStatusesRequest_GetTokenStatusesRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetTokenStatusesResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetTokenStatusesResponse.ts new file mode 100644 index 0000000..ab12f71 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetTokenStatusesResponse.ts @@ -0,0 +1,48 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_GetTokenStatusesResponse_GetTokenStatusesResponseV0 { + 'tokenStatuses'?: (_org_dash_platform_dapi_v0_GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "tokenStatuses"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetTokenStatusesResponse_GetTokenStatusesResponseV0__Output { + 'tokenStatuses'?: (_org_dash_platform_dapi_v0_GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "tokenStatuses"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry { + 'tokenId'?: (Buffer | Uint8Array | string); + 'paused'?: (boolean); + '_paused'?: "paused"; +} + +export interface _org_dash_platform_dapi_v0_GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry__Output { + 'tokenId': (Buffer); + 'paused'?: (boolean); + '_paused': "paused"; +} + +export interface _org_dash_platform_dapi_v0_GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses { + 'tokenStatuses'?: (_org_dash_platform_dapi_v0_GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry)[]; +} + +export interface _org_dash_platform_dapi_v0_GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses__Output { + 'tokenStatuses': (_org_dash_platform_dapi_v0_GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry__Output)[]; +} + +export interface GetTokenStatusesResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetTokenStatusesResponse_GetTokenStatusesResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetTokenStatusesResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetTokenStatusesResponse_GetTokenStatusesResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetTokenTotalSupplyRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetTokenTotalSupplyRequest.ts new file mode 100644 index 0000000..c3a4b7d --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetTokenTotalSupplyRequest.ts @@ -0,0 +1,22 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 { + 'tokenId'?: (Buffer | Uint8Array | string); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0__Output { + 'tokenId': (Buffer); + 'prove': (boolean); +} + +export interface GetTokenTotalSupplyRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetTokenTotalSupplyRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetTokenTotalSupplyResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetTokenTotalSupplyResponse.ts new file mode 100644 index 0000000..063237f --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetTokenTotalSupplyResponse.ts @@ -0,0 +1,41 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 { + 'tokenTotalSupply'?: (_org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "tokenTotalSupply"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0__Output { + 'tokenTotalSupply'?: (_org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "tokenTotalSupply"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry { + 'tokenId'?: (Buffer | Uint8Array | string); + 'totalAggregatedAmountInUserAccounts'?: (number | string | Long); + 'totalSystemAmount'?: (number | string | Long); +} + +export interface _org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry__Output { + 'tokenId': (Buffer); + 'totalAggregatedAmountInUserAccounts': (string); + 'totalSystemAmount': (string); +} + +export interface GetTokenTotalSupplyResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetTokenTotalSupplyResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetTotalCreditsInPlatformRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetTotalCreditsInPlatformRequest.ts new file mode 100644 index 0000000..7c3a2de --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetTotalCreditsInPlatformRequest.ts @@ -0,0 +1,20 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0 { + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0__Output { + 'prove': (boolean); +} + +export interface GetTotalCreditsInPlatformRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetTotalCreditsInPlatformRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetTotalCreditsInPlatformResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetTotalCreditsInPlatformResponse.ts new file mode 100644 index 0000000..a660436 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetTotalCreditsInPlatformResponse.ts @@ -0,0 +1,29 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0 { + 'credits'?: (number | string | Long); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "credits"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0__Output { + 'credits'?: (string); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "credits"|"proof"; +} + +export interface GetTotalCreditsInPlatformResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetTotalCreditsInPlatformResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetTransactionRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetTransactionRequest.ts new file mode 100644 index 0000000..10bdc2f --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetTransactionRequest.ts @@ -0,0 +1,10 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface GetTransactionRequest { + 'id'?: (string); +} + +export interface GetTransactionRequest__Output { + 'id': (string); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetTransactionResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetTransactionResponse.ts new file mode 100644 index 0000000..30bbcc7 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetTransactionResponse.ts @@ -0,0 +1,20 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface GetTransactionResponse { + 'transaction'?: (Buffer | Uint8Array | string); + 'blockHash'?: (Buffer | Uint8Array | string); + 'height'?: (number); + 'confirmations'?: (number); + 'isInstantLocked'?: (boolean); + 'isChainLocked'?: (boolean); +} + +export interface GetTransactionResponse__Output { + 'transaction': (Buffer); + 'blockHash': (Buffer); + 'height': (number); + 'confirmations': (number); + 'isInstantLocked': (boolean); + 'isChainLocked': (boolean); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetVotePollsByEndDateRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/GetVotePollsByEndDateRequest.ts new file mode 100644 index 0000000..d6de7f3 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetVotePollsByEndDateRequest.ts @@ -0,0 +1,59 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo { + 'endTimeMs'?: (number | string | Long); + 'endTimeIncluded'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo__Output { + 'endTimeMs': (string); + 'endTimeIncluded': (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0 { + 'startTimeInfo'?: (_org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo | null); + 'endTimeInfo'?: (_org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo | null); + 'limit'?: (number); + 'offset'?: (number); + 'ascending'?: (boolean); + 'prove'?: (boolean); + '_startTimeInfo'?: "startTimeInfo"; + '_endTimeInfo'?: "endTimeInfo"; + '_limit'?: "limit"; + '_offset'?: "offset"; +} + +export interface _org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0__Output { + 'startTimeInfo'?: (_org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo__Output | null); + 'endTimeInfo'?: (_org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo__Output | null); + 'limit'?: (number); + 'offset'?: (number); + 'ascending': (boolean); + 'prove': (boolean); + '_startTimeInfo': "startTimeInfo"; + '_endTimeInfo': "endTimeInfo"; + '_limit': "limit"; + '_offset': "offset"; +} + +export interface _org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo { + 'startTimeMs'?: (number | string | Long); + 'startTimeIncluded'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo__Output { + 'startTimeMs': (string); + 'startTimeIncluded': (boolean); +} + +export interface GetVotePollsByEndDateRequest { + 'v0'?: (_org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0 | null); + 'version'?: "v0"; +} + +export interface GetVotePollsByEndDateRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/GetVotePollsByEndDateResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/GetVotePollsByEndDateResponse.ts new file mode 100644 index 0000000..1cef9a1 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/GetVotePollsByEndDateResponse.ts @@ -0,0 +1,49 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; +import type { Long } from '@grpc/proto-loader'; + +export interface _org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0 { + 'votePollsByTimestamps'?: (_org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "votePollsByTimestamps"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0__Output { + 'votePollsByTimestamps'?: (_org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "votePollsByTimestamps"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp { + 'timestamp'?: (number | string | Long); + 'serializedVotePolls'?: (Buffer | Uint8Array | string)[]; +} + +export interface _org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp__Output { + 'timestamp': (string); + 'serializedVotePolls': (Buffer)[]; +} + +export interface _org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps { + 'votePollsByTimestamps'?: (_org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp)[]; + 'finishedResults'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps__Output { + 'votePollsByTimestamps': (_org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp__Output)[]; + 'finishedResults': (boolean); +} + +export interface GetVotePollsByEndDateResponse { + 'v0'?: (_org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0 | null); + 'version'?: "v0"; +} + +export interface GetVotePollsByEndDateResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/InstantSendLockMessages.ts b/experiment/proto/org/dash/platform/dapi/v0/InstantSendLockMessages.ts new file mode 100644 index 0000000..2cdab8b --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/InstantSendLockMessages.ts @@ -0,0 +1,10 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface InstantSendLockMessages { + 'messages'?: (Buffer | Uint8Array | string)[]; +} + +export interface InstantSendLockMessages__Output { + 'messages': (Buffer)[]; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/KeyPurpose.ts b/experiment/proto/org/dash/platform/dapi/v0/KeyPurpose.ts new file mode 100644 index 0000000..5afe3db --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/KeyPurpose.ts @@ -0,0 +1,23 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +export const KeyPurpose = { + AUTHENTICATION: 'AUTHENTICATION', + ENCRYPTION: 'ENCRYPTION', + DECRYPTION: 'DECRYPTION', + TRANSFER: 'TRANSFER', + VOTING: 'VOTING', +} as const; + +export type KeyPurpose = + | 'AUTHENTICATION' + | 0 + | 'ENCRYPTION' + | 1 + | 'DECRYPTION' + | 2 + | 'TRANSFER' + | 3 + | 'VOTING' + | 5 + +export type KeyPurpose__Output = typeof KeyPurpose[keyof typeof KeyPurpose] diff --git a/experiment/proto/org/dash/platform/dapi/v0/KeyRequestType.ts b/experiment/proto/org/dash/platform/dapi/v0/KeyRequestType.ts new file mode 100644 index 0000000..dc5660e --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/KeyRequestType.ts @@ -0,0 +1,19 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { AllKeys as _org_dash_platform_dapi_v0_AllKeys, AllKeys__Output as _org_dash_platform_dapi_v0_AllKeys__Output } from '../../../../../org/dash/platform/dapi/v0/AllKeys'; +import type { SpecificKeys as _org_dash_platform_dapi_v0_SpecificKeys, SpecificKeys__Output as _org_dash_platform_dapi_v0_SpecificKeys__Output } from '../../../../../org/dash/platform/dapi/v0/SpecificKeys'; +import type { SearchKey as _org_dash_platform_dapi_v0_SearchKey, SearchKey__Output as _org_dash_platform_dapi_v0_SearchKey__Output } from '../../../../../org/dash/platform/dapi/v0/SearchKey'; + +export interface KeyRequestType { + 'allKeys'?: (_org_dash_platform_dapi_v0_AllKeys | null); + 'specificKeys'?: (_org_dash_platform_dapi_v0_SpecificKeys | null); + 'searchKey'?: (_org_dash_platform_dapi_v0_SearchKey | null); + 'request'?: "allKeys"|"specificKeys"|"searchKey"; +} + +export interface KeyRequestType__Output { + 'allKeys'?: (_org_dash_platform_dapi_v0_AllKeys__Output | null); + 'specificKeys'?: (_org_dash_platform_dapi_v0_SpecificKeys__Output | null); + 'searchKey'?: (_org_dash_platform_dapi_v0_SearchKey__Output | null); + 'request': "allKeys"|"specificKeys"|"searchKey"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/MasternodeListRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/MasternodeListRequest.ts new file mode 100644 index 0000000..5f3345b --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/MasternodeListRequest.ts @@ -0,0 +1,8 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface MasternodeListRequest { +} + +export interface MasternodeListRequest__Output { +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/MasternodeListResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/MasternodeListResponse.ts new file mode 100644 index 0000000..4786828 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/MasternodeListResponse.ts @@ -0,0 +1,10 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface MasternodeListResponse { + 'masternodeListDiff'?: (Buffer | Uint8Array | string); +} + +export interface MasternodeListResponse__Output { + 'masternodeListDiff': (Buffer); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/Platform.ts b/experiment/proto/org/dash/platform/dapi/v0/Platform.ts new file mode 100644 index 0000000..991558f --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/Platform.ts @@ -0,0 +1,442 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type * as grpc from '@grpc/grpc-js' +import type { MethodDefinition } from '@grpc/proto-loader' +import type { BroadcastStateTransitionRequest as _org_dash_platform_dapi_v0_BroadcastStateTransitionRequest, BroadcastStateTransitionRequest__Output as _org_dash_platform_dapi_v0_BroadcastStateTransitionRequest__Output } from '../../../../../org/dash/platform/dapi/v0/BroadcastStateTransitionRequest'; +import type { BroadcastStateTransitionResponse as _org_dash_platform_dapi_v0_BroadcastStateTransitionResponse, BroadcastStateTransitionResponse__Output as _org_dash_platform_dapi_v0_BroadcastStateTransitionResponse__Output } from '../../../../../org/dash/platform/dapi/v0/BroadcastStateTransitionResponse'; +import type { GetConsensusParamsRequest as _org_dash_platform_dapi_v0_GetConsensusParamsRequest, GetConsensusParamsRequest__Output as _org_dash_platform_dapi_v0_GetConsensusParamsRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetConsensusParamsRequest'; +import type { GetConsensusParamsResponse as _org_dash_platform_dapi_v0_GetConsensusParamsResponse, GetConsensusParamsResponse__Output as _org_dash_platform_dapi_v0_GetConsensusParamsResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetConsensusParamsResponse'; +import type { GetContestedResourceIdentityVotesRequest as _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest, GetContestedResourceIdentityVotesRequest__Output as _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetContestedResourceIdentityVotesRequest'; +import type { GetContestedResourceIdentityVotesResponse as _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse, GetContestedResourceIdentityVotesResponse__Output as _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetContestedResourceIdentityVotesResponse'; +import type { GetContestedResourceVoteStateRequest as _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest, GetContestedResourceVoteStateRequest__Output as _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetContestedResourceVoteStateRequest'; +import type { GetContestedResourceVoteStateResponse as _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse, GetContestedResourceVoteStateResponse__Output as _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetContestedResourceVoteStateResponse'; +import type { GetContestedResourceVotersForIdentityRequest as _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest, GetContestedResourceVotersForIdentityRequest__Output as _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetContestedResourceVotersForIdentityRequest'; +import type { GetContestedResourceVotersForIdentityResponse as _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse, GetContestedResourceVotersForIdentityResponse__Output as _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetContestedResourceVotersForIdentityResponse'; +import type { GetContestedResourcesRequest as _org_dash_platform_dapi_v0_GetContestedResourcesRequest, GetContestedResourcesRequest__Output as _org_dash_platform_dapi_v0_GetContestedResourcesRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetContestedResourcesRequest'; +import type { GetContestedResourcesResponse as _org_dash_platform_dapi_v0_GetContestedResourcesResponse, GetContestedResourcesResponse__Output as _org_dash_platform_dapi_v0_GetContestedResourcesResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetContestedResourcesResponse'; +import type { GetCurrentQuorumsInfoRequest as _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoRequest, GetCurrentQuorumsInfoRequest__Output as _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetCurrentQuorumsInfoRequest'; +import type { GetCurrentQuorumsInfoResponse as _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse, GetCurrentQuorumsInfoResponse__Output as _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetCurrentQuorumsInfoResponse'; +import type { GetDataContractHistoryRequest as _org_dash_platform_dapi_v0_GetDataContractHistoryRequest, GetDataContractHistoryRequest__Output as _org_dash_platform_dapi_v0_GetDataContractHistoryRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetDataContractHistoryRequest'; +import type { GetDataContractHistoryResponse as _org_dash_platform_dapi_v0_GetDataContractHistoryResponse, GetDataContractHistoryResponse__Output as _org_dash_platform_dapi_v0_GetDataContractHistoryResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetDataContractHistoryResponse'; +import type { GetDataContractRequest as _org_dash_platform_dapi_v0_GetDataContractRequest, GetDataContractRequest__Output as _org_dash_platform_dapi_v0_GetDataContractRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetDataContractRequest'; +import type { GetDataContractResponse as _org_dash_platform_dapi_v0_GetDataContractResponse, GetDataContractResponse__Output as _org_dash_platform_dapi_v0_GetDataContractResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetDataContractResponse'; +import type { GetDataContractsRequest as _org_dash_platform_dapi_v0_GetDataContractsRequest, GetDataContractsRequest__Output as _org_dash_platform_dapi_v0_GetDataContractsRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetDataContractsRequest'; +import type { GetDataContractsResponse as _org_dash_platform_dapi_v0_GetDataContractsResponse, GetDataContractsResponse__Output as _org_dash_platform_dapi_v0_GetDataContractsResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetDataContractsResponse'; +import type { GetDocumentsRequest as _org_dash_platform_dapi_v0_GetDocumentsRequest, GetDocumentsRequest__Output as _org_dash_platform_dapi_v0_GetDocumentsRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetDocumentsRequest'; +import type { GetDocumentsResponse as _org_dash_platform_dapi_v0_GetDocumentsResponse, GetDocumentsResponse__Output as _org_dash_platform_dapi_v0_GetDocumentsResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetDocumentsResponse'; +import type { GetEpochsInfoRequest as _org_dash_platform_dapi_v0_GetEpochsInfoRequest, GetEpochsInfoRequest__Output as _org_dash_platform_dapi_v0_GetEpochsInfoRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetEpochsInfoRequest'; +import type { GetEpochsInfoResponse as _org_dash_platform_dapi_v0_GetEpochsInfoResponse, GetEpochsInfoResponse__Output as _org_dash_platform_dapi_v0_GetEpochsInfoResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetEpochsInfoResponse'; +import type { GetEvonodesProposedEpochBlocksByIdsRequest as _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByIdsRequest, GetEvonodesProposedEpochBlocksByIdsRequest__Output as _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByIdsRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetEvonodesProposedEpochBlocksByIdsRequest'; +import type { GetEvonodesProposedEpochBlocksByRangeRequest as _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByRangeRequest, GetEvonodesProposedEpochBlocksByRangeRequest__Output as _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByRangeRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetEvonodesProposedEpochBlocksByRangeRequest'; +import type { GetEvonodesProposedEpochBlocksResponse as _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse, GetEvonodesProposedEpochBlocksResponse__Output as _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetEvonodesProposedEpochBlocksResponse'; +import type { GetGroupActionSignersRequest as _org_dash_platform_dapi_v0_GetGroupActionSignersRequest, GetGroupActionSignersRequest__Output as _org_dash_platform_dapi_v0_GetGroupActionSignersRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetGroupActionSignersRequest'; +import type { GetGroupActionSignersResponse as _org_dash_platform_dapi_v0_GetGroupActionSignersResponse, GetGroupActionSignersResponse__Output as _org_dash_platform_dapi_v0_GetGroupActionSignersResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetGroupActionSignersResponse'; +import type { GetGroupActionsRequest as _org_dash_platform_dapi_v0_GetGroupActionsRequest, GetGroupActionsRequest__Output as _org_dash_platform_dapi_v0_GetGroupActionsRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetGroupActionsRequest'; +import type { GetGroupActionsResponse as _org_dash_platform_dapi_v0_GetGroupActionsResponse, GetGroupActionsResponse__Output as _org_dash_platform_dapi_v0_GetGroupActionsResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetGroupActionsResponse'; +import type { GetGroupInfoRequest as _org_dash_platform_dapi_v0_GetGroupInfoRequest, GetGroupInfoRequest__Output as _org_dash_platform_dapi_v0_GetGroupInfoRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetGroupInfoRequest'; +import type { GetGroupInfoResponse as _org_dash_platform_dapi_v0_GetGroupInfoResponse, GetGroupInfoResponse__Output as _org_dash_platform_dapi_v0_GetGroupInfoResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetGroupInfoResponse'; +import type { GetGroupInfosRequest as _org_dash_platform_dapi_v0_GetGroupInfosRequest, GetGroupInfosRequest__Output as _org_dash_platform_dapi_v0_GetGroupInfosRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetGroupInfosRequest'; +import type { GetGroupInfosResponse as _org_dash_platform_dapi_v0_GetGroupInfosResponse, GetGroupInfosResponse__Output as _org_dash_platform_dapi_v0_GetGroupInfosResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetGroupInfosResponse'; +import type { GetIdentitiesBalancesRequest as _org_dash_platform_dapi_v0_GetIdentitiesBalancesRequest, GetIdentitiesBalancesRequest__Output as _org_dash_platform_dapi_v0_GetIdentitiesBalancesRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentitiesBalancesRequest'; +import type { GetIdentitiesBalancesResponse as _org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse, GetIdentitiesBalancesResponse__Output as _org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentitiesBalancesResponse'; +import type { GetIdentitiesContractKeysRequest as _org_dash_platform_dapi_v0_GetIdentitiesContractKeysRequest, GetIdentitiesContractKeysRequest__Output as _org_dash_platform_dapi_v0_GetIdentitiesContractKeysRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentitiesContractKeysRequest'; +import type { GetIdentitiesContractKeysResponse as _org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse, GetIdentitiesContractKeysResponse__Output as _org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentitiesContractKeysResponse'; +import type { GetIdentitiesTokenBalancesRequest as _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesRequest, GetIdentitiesTokenBalancesRequest__Output as _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentitiesTokenBalancesRequest'; +import type { GetIdentitiesTokenBalancesResponse as _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse, GetIdentitiesTokenBalancesResponse__Output as _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentitiesTokenBalancesResponse'; +import type { GetIdentitiesTokenInfosRequest as _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosRequest, GetIdentitiesTokenInfosRequest__Output as _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentitiesTokenInfosRequest'; +import type { GetIdentitiesTokenInfosResponse as _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse, GetIdentitiesTokenInfosResponse__Output as _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentitiesTokenInfosResponse'; +import type { GetIdentityBalanceAndRevisionRequest as _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionRequest, GetIdentityBalanceAndRevisionRequest__Output as _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityBalanceAndRevisionRequest'; +import type { GetIdentityBalanceAndRevisionResponse as _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse, GetIdentityBalanceAndRevisionResponse__Output as _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityBalanceAndRevisionResponse'; +import type { GetIdentityBalanceRequest as _org_dash_platform_dapi_v0_GetIdentityBalanceRequest, GetIdentityBalanceRequest__Output as _org_dash_platform_dapi_v0_GetIdentityBalanceRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityBalanceRequest'; +import type { GetIdentityBalanceResponse as _org_dash_platform_dapi_v0_GetIdentityBalanceResponse, GetIdentityBalanceResponse__Output as _org_dash_platform_dapi_v0_GetIdentityBalanceResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityBalanceResponse'; +import type { GetIdentityByPublicKeyHashRequest as _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashRequest, GetIdentityByPublicKeyHashRequest__Output as _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityByPublicKeyHashRequest'; +import type { GetIdentityByPublicKeyHashResponse as _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashResponse, GetIdentityByPublicKeyHashResponse__Output as _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityByPublicKeyHashResponse'; +import type { GetIdentityContractNonceRequest as _org_dash_platform_dapi_v0_GetIdentityContractNonceRequest, GetIdentityContractNonceRequest__Output as _org_dash_platform_dapi_v0_GetIdentityContractNonceRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityContractNonceRequest'; +import type { GetIdentityContractNonceResponse as _org_dash_platform_dapi_v0_GetIdentityContractNonceResponse, GetIdentityContractNonceResponse__Output as _org_dash_platform_dapi_v0_GetIdentityContractNonceResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityContractNonceResponse'; +import type { GetIdentityKeysRequest as _org_dash_platform_dapi_v0_GetIdentityKeysRequest, GetIdentityKeysRequest__Output as _org_dash_platform_dapi_v0_GetIdentityKeysRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityKeysRequest'; +import type { GetIdentityKeysResponse as _org_dash_platform_dapi_v0_GetIdentityKeysResponse, GetIdentityKeysResponse__Output as _org_dash_platform_dapi_v0_GetIdentityKeysResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityKeysResponse'; +import type { GetIdentityNonceRequest as _org_dash_platform_dapi_v0_GetIdentityNonceRequest, GetIdentityNonceRequest__Output as _org_dash_platform_dapi_v0_GetIdentityNonceRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityNonceRequest'; +import type { GetIdentityNonceResponse as _org_dash_platform_dapi_v0_GetIdentityNonceResponse, GetIdentityNonceResponse__Output as _org_dash_platform_dapi_v0_GetIdentityNonceResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityNonceResponse'; +import type { GetIdentityRequest as _org_dash_platform_dapi_v0_GetIdentityRequest, GetIdentityRequest__Output as _org_dash_platform_dapi_v0_GetIdentityRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityRequest'; +import type { GetIdentityResponse as _org_dash_platform_dapi_v0_GetIdentityResponse, GetIdentityResponse__Output as _org_dash_platform_dapi_v0_GetIdentityResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityResponse'; +import type { GetIdentityTokenBalancesRequest as _org_dash_platform_dapi_v0_GetIdentityTokenBalancesRequest, GetIdentityTokenBalancesRequest__Output as _org_dash_platform_dapi_v0_GetIdentityTokenBalancesRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityTokenBalancesRequest'; +import type { GetIdentityTokenBalancesResponse as _org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse, GetIdentityTokenBalancesResponse__Output as _org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityTokenBalancesResponse'; +import type { GetIdentityTokenInfosRequest as _org_dash_platform_dapi_v0_GetIdentityTokenInfosRequest, GetIdentityTokenInfosRequest__Output as _org_dash_platform_dapi_v0_GetIdentityTokenInfosRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityTokenInfosRequest'; +import type { GetIdentityTokenInfosResponse as _org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse, GetIdentityTokenInfosResponse__Output as _org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetIdentityTokenInfosResponse'; +import type { GetPathElementsRequest as _org_dash_platform_dapi_v0_GetPathElementsRequest, GetPathElementsRequest__Output as _org_dash_platform_dapi_v0_GetPathElementsRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetPathElementsRequest'; +import type { GetPathElementsResponse as _org_dash_platform_dapi_v0_GetPathElementsResponse, GetPathElementsResponse__Output as _org_dash_platform_dapi_v0_GetPathElementsResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetPathElementsResponse'; +import type { GetPrefundedSpecializedBalanceRequest as _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceRequest, GetPrefundedSpecializedBalanceRequest__Output as _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetPrefundedSpecializedBalanceRequest'; +import type { GetPrefundedSpecializedBalanceResponse as _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceResponse, GetPrefundedSpecializedBalanceResponse__Output as _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetPrefundedSpecializedBalanceResponse'; +import type { GetProofsRequest as _org_dash_platform_dapi_v0_GetProofsRequest, GetProofsRequest__Output as _org_dash_platform_dapi_v0_GetProofsRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetProofsRequest'; +import type { GetProofsResponse as _org_dash_platform_dapi_v0_GetProofsResponse, GetProofsResponse__Output as _org_dash_platform_dapi_v0_GetProofsResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetProofsResponse'; +import type { GetProtocolVersionUpgradeStateRequest as _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateRequest, GetProtocolVersionUpgradeStateRequest__Output as _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetProtocolVersionUpgradeStateRequest'; +import type { GetProtocolVersionUpgradeStateResponse as _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse, GetProtocolVersionUpgradeStateResponse__Output as _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetProtocolVersionUpgradeStateResponse'; +import type { GetProtocolVersionUpgradeVoteStatusRequest as _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusRequest, GetProtocolVersionUpgradeVoteStatusRequest__Output as _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetProtocolVersionUpgradeVoteStatusRequest'; +import type { GetProtocolVersionUpgradeVoteStatusResponse as _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse, GetProtocolVersionUpgradeVoteStatusResponse__Output as _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetProtocolVersionUpgradeVoteStatusResponse'; +import type { GetStatusRequest as _org_dash_platform_dapi_v0_GetStatusRequest, GetStatusRequest__Output as _org_dash_platform_dapi_v0_GetStatusRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetStatusRequest'; +import type { GetStatusResponse as _org_dash_platform_dapi_v0_GetStatusResponse, GetStatusResponse__Output as _org_dash_platform_dapi_v0_GetStatusResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetStatusResponse'; +import type { GetTokenPreProgrammedDistributionsRequest as _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest, GetTokenPreProgrammedDistributionsRequest__Output as _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetTokenPreProgrammedDistributionsRequest'; +import type { GetTokenPreProgrammedDistributionsResponse as _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse, GetTokenPreProgrammedDistributionsResponse__Output as _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetTokenPreProgrammedDistributionsResponse'; +import type { GetTokenStatusesRequest as _org_dash_platform_dapi_v0_GetTokenStatusesRequest, GetTokenStatusesRequest__Output as _org_dash_platform_dapi_v0_GetTokenStatusesRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetTokenStatusesRequest'; +import type { GetTokenStatusesResponse as _org_dash_platform_dapi_v0_GetTokenStatusesResponse, GetTokenStatusesResponse__Output as _org_dash_platform_dapi_v0_GetTokenStatusesResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetTokenStatusesResponse'; +import type { GetTokenTotalSupplyRequest as _org_dash_platform_dapi_v0_GetTokenTotalSupplyRequest, GetTokenTotalSupplyRequest__Output as _org_dash_platform_dapi_v0_GetTokenTotalSupplyRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetTokenTotalSupplyRequest'; +import type { GetTokenTotalSupplyResponse as _org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse, GetTokenTotalSupplyResponse__Output as _org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetTokenTotalSupplyResponse'; +import type { GetTotalCreditsInPlatformRequest as _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformRequest, GetTotalCreditsInPlatformRequest__Output as _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetTotalCreditsInPlatformRequest'; +import type { GetTotalCreditsInPlatformResponse as _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformResponse, GetTotalCreditsInPlatformResponse__Output as _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetTotalCreditsInPlatformResponse'; +import type { GetVotePollsByEndDateRequest as _org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest, GetVotePollsByEndDateRequest__Output as _org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest__Output } from '../../../../../org/dash/platform/dapi/v0/GetVotePollsByEndDateRequest'; +import type { GetVotePollsByEndDateResponse as _org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse, GetVotePollsByEndDateResponse__Output as _org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse__Output } from '../../../../../org/dash/platform/dapi/v0/GetVotePollsByEndDateResponse'; +import type { WaitForStateTransitionResultRequest as _org_dash_platform_dapi_v0_WaitForStateTransitionResultRequest, WaitForStateTransitionResultRequest__Output as _org_dash_platform_dapi_v0_WaitForStateTransitionResultRequest__Output } from '../../../../../org/dash/platform/dapi/v0/WaitForStateTransitionResultRequest'; +import type { WaitForStateTransitionResultResponse as _org_dash_platform_dapi_v0_WaitForStateTransitionResultResponse, WaitForStateTransitionResultResponse__Output as _org_dash_platform_dapi_v0_WaitForStateTransitionResultResponse__Output } from '../../../../../org/dash/platform/dapi/v0/WaitForStateTransitionResultResponse'; + +export interface PlatformClient extends grpc.Client { + broadcastStateTransition(argument: _org_dash_platform_dapi_v0_BroadcastStateTransitionRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_BroadcastStateTransitionResponse__Output>): grpc.ClientUnaryCall; + broadcastStateTransition(argument: _org_dash_platform_dapi_v0_BroadcastStateTransitionRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_BroadcastStateTransitionResponse__Output>): grpc.ClientUnaryCall; + broadcastStateTransition(argument: _org_dash_platform_dapi_v0_BroadcastStateTransitionRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_BroadcastStateTransitionResponse__Output>): grpc.ClientUnaryCall; + broadcastStateTransition(argument: _org_dash_platform_dapi_v0_BroadcastStateTransitionRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_BroadcastStateTransitionResponse__Output>): grpc.ClientUnaryCall; + + getConsensusParams(argument: _org_dash_platform_dapi_v0_GetConsensusParamsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetConsensusParamsResponse__Output>): grpc.ClientUnaryCall; + getConsensusParams(argument: _org_dash_platform_dapi_v0_GetConsensusParamsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetConsensusParamsResponse__Output>): grpc.ClientUnaryCall; + getConsensusParams(argument: _org_dash_platform_dapi_v0_GetConsensusParamsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetConsensusParamsResponse__Output>): grpc.ClientUnaryCall; + getConsensusParams(argument: _org_dash_platform_dapi_v0_GetConsensusParamsRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetConsensusParamsResponse__Output>): grpc.ClientUnaryCall; + + getContestedResourceIdentityVotes(argument: _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse__Output>): grpc.ClientUnaryCall; + getContestedResourceIdentityVotes(argument: _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse__Output>): grpc.ClientUnaryCall; + getContestedResourceIdentityVotes(argument: _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse__Output>): grpc.ClientUnaryCall; + getContestedResourceIdentityVotes(argument: _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse__Output>): grpc.ClientUnaryCall; + + getContestedResourceVoteState(argument: _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse__Output>): grpc.ClientUnaryCall; + getContestedResourceVoteState(argument: _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse__Output>): grpc.ClientUnaryCall; + getContestedResourceVoteState(argument: _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse__Output>): grpc.ClientUnaryCall; + getContestedResourceVoteState(argument: _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse__Output>): grpc.ClientUnaryCall; + + getContestedResourceVotersForIdentity(argument: _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse__Output>): grpc.ClientUnaryCall; + getContestedResourceVotersForIdentity(argument: _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse__Output>): grpc.ClientUnaryCall; + getContestedResourceVotersForIdentity(argument: _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse__Output>): grpc.ClientUnaryCall; + getContestedResourceVotersForIdentity(argument: _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse__Output>): grpc.ClientUnaryCall; + + getContestedResources(argument: _org_dash_platform_dapi_v0_GetContestedResourcesRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourcesResponse__Output>): grpc.ClientUnaryCall; + getContestedResources(argument: _org_dash_platform_dapi_v0_GetContestedResourcesRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourcesResponse__Output>): grpc.ClientUnaryCall; + getContestedResources(argument: _org_dash_platform_dapi_v0_GetContestedResourcesRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourcesResponse__Output>): grpc.ClientUnaryCall; + getContestedResources(argument: _org_dash_platform_dapi_v0_GetContestedResourcesRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetContestedResourcesResponse__Output>): grpc.ClientUnaryCall; + + getCurrentQuorumsInfo(argument: _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse__Output>): grpc.ClientUnaryCall; + getCurrentQuorumsInfo(argument: _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse__Output>): grpc.ClientUnaryCall; + getCurrentQuorumsInfo(argument: _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse__Output>): grpc.ClientUnaryCall; + getCurrentQuorumsInfo(argument: _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse__Output>): grpc.ClientUnaryCall; + + getDataContract(argument: _org_dash_platform_dapi_v0_GetDataContractRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDataContractResponse__Output>): grpc.ClientUnaryCall; + getDataContract(argument: _org_dash_platform_dapi_v0_GetDataContractRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDataContractResponse__Output>): grpc.ClientUnaryCall; + getDataContract(argument: _org_dash_platform_dapi_v0_GetDataContractRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDataContractResponse__Output>): grpc.ClientUnaryCall; + getDataContract(argument: _org_dash_platform_dapi_v0_GetDataContractRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDataContractResponse__Output>): grpc.ClientUnaryCall; + + getDataContractHistory(argument: _org_dash_platform_dapi_v0_GetDataContractHistoryRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDataContractHistoryResponse__Output>): grpc.ClientUnaryCall; + getDataContractHistory(argument: _org_dash_platform_dapi_v0_GetDataContractHistoryRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDataContractHistoryResponse__Output>): grpc.ClientUnaryCall; + getDataContractHistory(argument: _org_dash_platform_dapi_v0_GetDataContractHistoryRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDataContractHistoryResponse__Output>): grpc.ClientUnaryCall; + getDataContractHistory(argument: _org_dash_platform_dapi_v0_GetDataContractHistoryRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDataContractHistoryResponse__Output>): grpc.ClientUnaryCall; + + getDataContracts(argument: _org_dash_platform_dapi_v0_GetDataContractsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDataContractsResponse__Output>): grpc.ClientUnaryCall; + getDataContracts(argument: _org_dash_platform_dapi_v0_GetDataContractsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDataContractsResponse__Output>): grpc.ClientUnaryCall; + getDataContracts(argument: _org_dash_platform_dapi_v0_GetDataContractsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDataContractsResponse__Output>): grpc.ClientUnaryCall; + getDataContracts(argument: _org_dash_platform_dapi_v0_GetDataContractsRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDataContractsResponse__Output>): grpc.ClientUnaryCall; + + getDocuments(argument: _org_dash_platform_dapi_v0_GetDocumentsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDocumentsResponse__Output>): grpc.ClientUnaryCall; + getDocuments(argument: _org_dash_platform_dapi_v0_GetDocumentsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDocumentsResponse__Output>): grpc.ClientUnaryCall; + getDocuments(argument: _org_dash_platform_dapi_v0_GetDocumentsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDocumentsResponse__Output>): grpc.ClientUnaryCall; + getDocuments(argument: _org_dash_platform_dapi_v0_GetDocumentsRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetDocumentsResponse__Output>): grpc.ClientUnaryCall; + + getEpochsInfo(argument: _org_dash_platform_dapi_v0_GetEpochsInfoRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEpochsInfoResponse__Output>): grpc.ClientUnaryCall; + getEpochsInfo(argument: _org_dash_platform_dapi_v0_GetEpochsInfoRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEpochsInfoResponse__Output>): grpc.ClientUnaryCall; + getEpochsInfo(argument: _org_dash_platform_dapi_v0_GetEpochsInfoRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEpochsInfoResponse__Output>): grpc.ClientUnaryCall; + getEpochsInfo(argument: _org_dash_platform_dapi_v0_GetEpochsInfoRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEpochsInfoResponse__Output>): grpc.ClientUnaryCall; + + getEvonodesProposedEpochBlocksByIds(argument: _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByIdsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse__Output>): grpc.ClientUnaryCall; + getEvonodesProposedEpochBlocksByIds(argument: _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByIdsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse__Output>): grpc.ClientUnaryCall; + getEvonodesProposedEpochBlocksByIds(argument: _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByIdsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse__Output>): grpc.ClientUnaryCall; + getEvonodesProposedEpochBlocksByIds(argument: _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByIdsRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse__Output>): grpc.ClientUnaryCall; + + getEvonodesProposedEpochBlocksByRange(argument: _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByRangeRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse__Output>): grpc.ClientUnaryCall; + getEvonodesProposedEpochBlocksByRange(argument: _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByRangeRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse__Output>): grpc.ClientUnaryCall; + getEvonodesProposedEpochBlocksByRange(argument: _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByRangeRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse__Output>): grpc.ClientUnaryCall; + getEvonodesProposedEpochBlocksByRange(argument: _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByRangeRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse__Output>): grpc.ClientUnaryCall; + + getGroupActionSigners(argument: _org_dash_platform_dapi_v0_GetGroupActionSignersRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupActionSignersResponse__Output>): grpc.ClientUnaryCall; + getGroupActionSigners(argument: _org_dash_platform_dapi_v0_GetGroupActionSignersRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupActionSignersResponse__Output>): grpc.ClientUnaryCall; + getGroupActionSigners(argument: _org_dash_platform_dapi_v0_GetGroupActionSignersRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupActionSignersResponse__Output>): grpc.ClientUnaryCall; + getGroupActionSigners(argument: _org_dash_platform_dapi_v0_GetGroupActionSignersRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupActionSignersResponse__Output>): grpc.ClientUnaryCall; + + getGroupActions(argument: _org_dash_platform_dapi_v0_GetGroupActionsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupActionsResponse__Output>): grpc.ClientUnaryCall; + getGroupActions(argument: _org_dash_platform_dapi_v0_GetGroupActionsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupActionsResponse__Output>): grpc.ClientUnaryCall; + getGroupActions(argument: _org_dash_platform_dapi_v0_GetGroupActionsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupActionsResponse__Output>): grpc.ClientUnaryCall; + getGroupActions(argument: _org_dash_platform_dapi_v0_GetGroupActionsRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupActionsResponse__Output>): grpc.ClientUnaryCall; + + getGroupInfo(argument: _org_dash_platform_dapi_v0_GetGroupInfoRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupInfoResponse__Output>): grpc.ClientUnaryCall; + getGroupInfo(argument: _org_dash_platform_dapi_v0_GetGroupInfoRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupInfoResponse__Output>): grpc.ClientUnaryCall; + getGroupInfo(argument: _org_dash_platform_dapi_v0_GetGroupInfoRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupInfoResponse__Output>): grpc.ClientUnaryCall; + getGroupInfo(argument: _org_dash_platform_dapi_v0_GetGroupInfoRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupInfoResponse__Output>): grpc.ClientUnaryCall; + + getGroupInfos(argument: _org_dash_platform_dapi_v0_GetGroupInfosRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupInfosResponse__Output>): grpc.ClientUnaryCall; + getGroupInfos(argument: _org_dash_platform_dapi_v0_GetGroupInfosRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupInfosResponse__Output>): grpc.ClientUnaryCall; + getGroupInfos(argument: _org_dash_platform_dapi_v0_GetGroupInfosRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupInfosResponse__Output>): grpc.ClientUnaryCall; + getGroupInfos(argument: _org_dash_platform_dapi_v0_GetGroupInfosRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetGroupInfosResponse__Output>): grpc.ClientUnaryCall; + + getIdentitiesBalances(argument: _org_dash_platform_dapi_v0_GetIdentitiesBalancesRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse__Output>): grpc.ClientUnaryCall; + getIdentitiesBalances(argument: _org_dash_platform_dapi_v0_GetIdentitiesBalancesRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse__Output>): grpc.ClientUnaryCall; + getIdentitiesBalances(argument: _org_dash_platform_dapi_v0_GetIdentitiesBalancesRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse__Output>): grpc.ClientUnaryCall; + getIdentitiesBalances(argument: _org_dash_platform_dapi_v0_GetIdentitiesBalancesRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse__Output>): grpc.ClientUnaryCall; + + getIdentitiesContractKeys(argument: _org_dash_platform_dapi_v0_GetIdentitiesContractKeysRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse__Output>): grpc.ClientUnaryCall; + getIdentitiesContractKeys(argument: _org_dash_platform_dapi_v0_GetIdentitiesContractKeysRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse__Output>): grpc.ClientUnaryCall; + getIdentitiesContractKeys(argument: _org_dash_platform_dapi_v0_GetIdentitiesContractKeysRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse__Output>): grpc.ClientUnaryCall; + getIdentitiesContractKeys(argument: _org_dash_platform_dapi_v0_GetIdentitiesContractKeysRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse__Output>): grpc.ClientUnaryCall; + + getIdentitiesTokenBalances(argument: _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse__Output>): grpc.ClientUnaryCall; + getIdentitiesTokenBalances(argument: _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse__Output>): grpc.ClientUnaryCall; + getIdentitiesTokenBalances(argument: _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse__Output>): grpc.ClientUnaryCall; + getIdentitiesTokenBalances(argument: _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse__Output>): grpc.ClientUnaryCall; + + getIdentitiesTokenInfos(argument: _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse__Output>): grpc.ClientUnaryCall; + getIdentitiesTokenInfos(argument: _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse__Output>): grpc.ClientUnaryCall; + getIdentitiesTokenInfos(argument: _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse__Output>): grpc.ClientUnaryCall; + getIdentitiesTokenInfos(argument: _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse__Output>): grpc.ClientUnaryCall; + + getIdentity(argument: _org_dash_platform_dapi_v0_GetIdentityRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityResponse__Output>): grpc.ClientUnaryCall; + getIdentity(argument: _org_dash_platform_dapi_v0_GetIdentityRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityResponse__Output>): grpc.ClientUnaryCall; + getIdentity(argument: _org_dash_platform_dapi_v0_GetIdentityRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityResponse__Output>): grpc.ClientUnaryCall; + getIdentity(argument: _org_dash_platform_dapi_v0_GetIdentityRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityResponse__Output>): grpc.ClientUnaryCall; + + getIdentityBalance(argument: _org_dash_platform_dapi_v0_GetIdentityBalanceRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityBalanceResponse__Output>): grpc.ClientUnaryCall; + getIdentityBalance(argument: _org_dash_platform_dapi_v0_GetIdentityBalanceRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityBalanceResponse__Output>): grpc.ClientUnaryCall; + getIdentityBalance(argument: _org_dash_platform_dapi_v0_GetIdentityBalanceRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityBalanceResponse__Output>): grpc.ClientUnaryCall; + getIdentityBalance(argument: _org_dash_platform_dapi_v0_GetIdentityBalanceRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityBalanceResponse__Output>): grpc.ClientUnaryCall; + + getIdentityBalanceAndRevision(argument: _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse__Output>): grpc.ClientUnaryCall; + getIdentityBalanceAndRevision(argument: _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse__Output>): grpc.ClientUnaryCall; + getIdentityBalanceAndRevision(argument: _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse__Output>): grpc.ClientUnaryCall; + getIdentityBalanceAndRevision(argument: _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse__Output>): grpc.ClientUnaryCall; + + getIdentityByPublicKeyHash(argument: _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashResponse__Output>): grpc.ClientUnaryCall; + getIdentityByPublicKeyHash(argument: _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashResponse__Output>): grpc.ClientUnaryCall; + getIdentityByPublicKeyHash(argument: _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashResponse__Output>): grpc.ClientUnaryCall; + getIdentityByPublicKeyHash(argument: _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashResponse__Output>): grpc.ClientUnaryCall; + + getIdentityContractNonce(argument: _org_dash_platform_dapi_v0_GetIdentityContractNonceRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityContractNonceResponse__Output>): grpc.ClientUnaryCall; + getIdentityContractNonce(argument: _org_dash_platform_dapi_v0_GetIdentityContractNonceRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityContractNonceResponse__Output>): grpc.ClientUnaryCall; + getIdentityContractNonce(argument: _org_dash_platform_dapi_v0_GetIdentityContractNonceRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityContractNonceResponse__Output>): grpc.ClientUnaryCall; + getIdentityContractNonce(argument: _org_dash_platform_dapi_v0_GetIdentityContractNonceRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityContractNonceResponse__Output>): grpc.ClientUnaryCall; + + getIdentityKeys(argument: _org_dash_platform_dapi_v0_GetIdentityKeysRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityKeysResponse__Output>): grpc.ClientUnaryCall; + getIdentityKeys(argument: _org_dash_platform_dapi_v0_GetIdentityKeysRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityKeysResponse__Output>): grpc.ClientUnaryCall; + getIdentityKeys(argument: _org_dash_platform_dapi_v0_GetIdentityKeysRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityKeysResponse__Output>): grpc.ClientUnaryCall; + getIdentityKeys(argument: _org_dash_platform_dapi_v0_GetIdentityKeysRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityKeysResponse__Output>): grpc.ClientUnaryCall; + + getIdentityNonce(argument: _org_dash_platform_dapi_v0_GetIdentityNonceRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityNonceResponse__Output>): grpc.ClientUnaryCall; + getIdentityNonce(argument: _org_dash_platform_dapi_v0_GetIdentityNonceRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityNonceResponse__Output>): grpc.ClientUnaryCall; + getIdentityNonce(argument: _org_dash_platform_dapi_v0_GetIdentityNonceRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityNonceResponse__Output>): grpc.ClientUnaryCall; + getIdentityNonce(argument: _org_dash_platform_dapi_v0_GetIdentityNonceRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityNonceResponse__Output>): grpc.ClientUnaryCall; + + getIdentityTokenBalances(argument: _org_dash_platform_dapi_v0_GetIdentityTokenBalancesRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse__Output>): grpc.ClientUnaryCall; + getIdentityTokenBalances(argument: _org_dash_platform_dapi_v0_GetIdentityTokenBalancesRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse__Output>): grpc.ClientUnaryCall; + getIdentityTokenBalances(argument: _org_dash_platform_dapi_v0_GetIdentityTokenBalancesRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse__Output>): grpc.ClientUnaryCall; + getIdentityTokenBalances(argument: _org_dash_platform_dapi_v0_GetIdentityTokenBalancesRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse__Output>): grpc.ClientUnaryCall; + + getIdentityTokenInfos(argument: _org_dash_platform_dapi_v0_GetIdentityTokenInfosRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse__Output>): grpc.ClientUnaryCall; + getIdentityTokenInfos(argument: _org_dash_platform_dapi_v0_GetIdentityTokenInfosRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse__Output>): grpc.ClientUnaryCall; + getIdentityTokenInfos(argument: _org_dash_platform_dapi_v0_GetIdentityTokenInfosRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse__Output>): grpc.ClientUnaryCall; + getIdentityTokenInfos(argument: _org_dash_platform_dapi_v0_GetIdentityTokenInfosRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse__Output>): grpc.ClientUnaryCall; + + getPathElements(argument: _org_dash_platform_dapi_v0_GetPathElementsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetPathElementsResponse__Output>): grpc.ClientUnaryCall; + getPathElements(argument: _org_dash_platform_dapi_v0_GetPathElementsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetPathElementsResponse__Output>): grpc.ClientUnaryCall; + getPathElements(argument: _org_dash_platform_dapi_v0_GetPathElementsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetPathElementsResponse__Output>): grpc.ClientUnaryCall; + getPathElements(argument: _org_dash_platform_dapi_v0_GetPathElementsRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetPathElementsResponse__Output>): grpc.ClientUnaryCall; + + getPrefundedSpecializedBalance(argument: _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceResponse__Output>): grpc.ClientUnaryCall; + getPrefundedSpecializedBalance(argument: _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceResponse__Output>): grpc.ClientUnaryCall; + getPrefundedSpecializedBalance(argument: _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceResponse__Output>): grpc.ClientUnaryCall; + getPrefundedSpecializedBalance(argument: _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceResponse__Output>): grpc.ClientUnaryCall; + + getProofs(argument: _org_dash_platform_dapi_v0_GetProofsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetProofsResponse__Output>): grpc.ClientUnaryCall; + getProofs(argument: _org_dash_platform_dapi_v0_GetProofsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetProofsResponse__Output>): grpc.ClientUnaryCall; + getProofs(argument: _org_dash_platform_dapi_v0_GetProofsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetProofsResponse__Output>): grpc.ClientUnaryCall; + getProofs(argument: _org_dash_platform_dapi_v0_GetProofsRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetProofsResponse__Output>): grpc.ClientUnaryCall; + + getProtocolVersionUpgradeState(argument: _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse__Output>): grpc.ClientUnaryCall; + getProtocolVersionUpgradeState(argument: _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse__Output>): grpc.ClientUnaryCall; + getProtocolVersionUpgradeState(argument: _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse__Output>): grpc.ClientUnaryCall; + getProtocolVersionUpgradeState(argument: _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse__Output>): grpc.ClientUnaryCall; + + getProtocolVersionUpgradeVoteStatus(argument: _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse__Output>): grpc.ClientUnaryCall; + getProtocolVersionUpgradeVoteStatus(argument: _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse__Output>): grpc.ClientUnaryCall; + getProtocolVersionUpgradeVoteStatus(argument: _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse__Output>): grpc.ClientUnaryCall; + getProtocolVersionUpgradeVoteStatus(argument: _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse__Output>): grpc.ClientUnaryCall; + + getStatus(argument: _org_dash_platform_dapi_v0_GetStatusRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetStatusResponse__Output>): grpc.ClientUnaryCall; + getStatus(argument: _org_dash_platform_dapi_v0_GetStatusRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetStatusResponse__Output>): grpc.ClientUnaryCall; + getStatus(argument: _org_dash_platform_dapi_v0_GetStatusRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetStatusResponse__Output>): grpc.ClientUnaryCall; + getStatus(argument: _org_dash_platform_dapi_v0_GetStatusRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetStatusResponse__Output>): grpc.ClientUnaryCall; + + getTokenPreProgrammedDistributions(argument: _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse__Output>): grpc.ClientUnaryCall; + getTokenPreProgrammedDistributions(argument: _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse__Output>): grpc.ClientUnaryCall; + getTokenPreProgrammedDistributions(argument: _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse__Output>): grpc.ClientUnaryCall; + getTokenPreProgrammedDistributions(argument: _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse__Output>): grpc.ClientUnaryCall; + + getTokenStatuses(argument: _org_dash_platform_dapi_v0_GetTokenStatusesRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTokenStatusesResponse__Output>): grpc.ClientUnaryCall; + getTokenStatuses(argument: _org_dash_platform_dapi_v0_GetTokenStatusesRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTokenStatusesResponse__Output>): grpc.ClientUnaryCall; + getTokenStatuses(argument: _org_dash_platform_dapi_v0_GetTokenStatusesRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTokenStatusesResponse__Output>): grpc.ClientUnaryCall; + getTokenStatuses(argument: _org_dash_platform_dapi_v0_GetTokenStatusesRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTokenStatusesResponse__Output>): grpc.ClientUnaryCall; + + getTokenTotalSupply(argument: _org_dash_platform_dapi_v0_GetTokenTotalSupplyRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse__Output>): grpc.ClientUnaryCall; + getTokenTotalSupply(argument: _org_dash_platform_dapi_v0_GetTokenTotalSupplyRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse__Output>): grpc.ClientUnaryCall; + getTokenTotalSupply(argument: _org_dash_platform_dapi_v0_GetTokenTotalSupplyRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse__Output>): grpc.ClientUnaryCall; + getTokenTotalSupply(argument: _org_dash_platform_dapi_v0_GetTokenTotalSupplyRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse__Output>): grpc.ClientUnaryCall; + + getTotalCreditsInPlatform(argument: _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTotalCreditsInPlatformResponse__Output>): grpc.ClientUnaryCall; + getTotalCreditsInPlatform(argument: _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTotalCreditsInPlatformResponse__Output>): grpc.ClientUnaryCall; + getTotalCreditsInPlatform(argument: _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTotalCreditsInPlatformResponse__Output>): grpc.ClientUnaryCall; + getTotalCreditsInPlatform(argument: _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetTotalCreditsInPlatformResponse__Output>): grpc.ClientUnaryCall; + + getVotePollsByEndDate(argument: _org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse__Output>): grpc.ClientUnaryCall; + getVotePollsByEndDate(argument: _org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse__Output>): grpc.ClientUnaryCall; + getVotePollsByEndDate(argument: _org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse__Output>): grpc.ClientUnaryCall; + getVotePollsByEndDate(argument: _org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse__Output>): grpc.ClientUnaryCall; + + waitForStateTransitionResult(argument: _org_dash_platform_dapi_v0_WaitForStateTransitionResultRequest, metadata: grpc.Metadata, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_WaitForStateTransitionResultResponse__Output>): grpc.ClientUnaryCall; + waitForStateTransitionResult(argument: _org_dash_platform_dapi_v0_WaitForStateTransitionResultRequest, metadata: grpc.Metadata, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_WaitForStateTransitionResultResponse__Output>): grpc.ClientUnaryCall; + waitForStateTransitionResult(argument: _org_dash_platform_dapi_v0_WaitForStateTransitionResultRequest, options: grpc.CallOptions, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_WaitForStateTransitionResultResponse__Output>): grpc.ClientUnaryCall; + waitForStateTransitionResult(argument: _org_dash_platform_dapi_v0_WaitForStateTransitionResultRequest, callback: grpc.requestCallback<_org_dash_platform_dapi_v0_WaitForStateTransitionResultResponse__Output>): grpc.ClientUnaryCall; + +} + +export interface PlatformHandlers extends grpc.UntypedServiceImplementation { + broadcastStateTransition: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_BroadcastStateTransitionRequest__Output, _org_dash_platform_dapi_v0_BroadcastStateTransitionResponse>; + + getConsensusParams: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetConsensusParamsRequest__Output, _org_dash_platform_dapi_v0_GetConsensusParamsResponse>; + + getContestedResourceIdentityVotes: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest__Output, _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse>; + + getContestedResourceVoteState: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest__Output, _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse>; + + getContestedResourceVotersForIdentity: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest__Output, _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse>; + + getContestedResources: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetContestedResourcesRequest__Output, _org_dash_platform_dapi_v0_GetContestedResourcesResponse>; + + getCurrentQuorumsInfo: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetCurrentQuorumsInfoRequest__Output, _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse>; + + getDataContract: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetDataContractRequest__Output, _org_dash_platform_dapi_v0_GetDataContractResponse>; + + getDataContractHistory: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetDataContractHistoryRequest__Output, _org_dash_platform_dapi_v0_GetDataContractHistoryResponse>; + + getDataContracts: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetDataContractsRequest__Output, _org_dash_platform_dapi_v0_GetDataContractsResponse>; + + getDocuments: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetDocumentsRequest__Output, _org_dash_platform_dapi_v0_GetDocumentsResponse>; + + getEpochsInfo: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetEpochsInfoRequest__Output, _org_dash_platform_dapi_v0_GetEpochsInfoResponse>; + + getEvonodesProposedEpochBlocksByIds: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByIdsRequest__Output, _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse>; + + getEvonodesProposedEpochBlocksByRange: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByRangeRequest__Output, _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse>; + + getGroupActionSigners: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetGroupActionSignersRequest__Output, _org_dash_platform_dapi_v0_GetGroupActionSignersResponse>; + + getGroupActions: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetGroupActionsRequest__Output, _org_dash_platform_dapi_v0_GetGroupActionsResponse>; + + getGroupInfo: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetGroupInfoRequest__Output, _org_dash_platform_dapi_v0_GetGroupInfoResponse>; + + getGroupInfos: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetGroupInfosRequest__Output, _org_dash_platform_dapi_v0_GetGroupInfosResponse>; + + getIdentitiesBalances: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetIdentitiesBalancesRequest__Output, _org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse>; + + getIdentitiesContractKeys: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetIdentitiesContractKeysRequest__Output, _org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse>; + + getIdentitiesTokenBalances: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesRequest__Output, _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse>; + + getIdentitiesTokenInfos: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosRequest__Output, _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse>; + + getIdentity: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetIdentityRequest__Output, _org_dash_platform_dapi_v0_GetIdentityResponse>; + + getIdentityBalance: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetIdentityBalanceRequest__Output, _org_dash_platform_dapi_v0_GetIdentityBalanceResponse>; + + getIdentityBalanceAndRevision: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionRequest__Output, _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse>; + + getIdentityByPublicKeyHash: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashRequest__Output, _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashResponse>; + + getIdentityContractNonce: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetIdentityContractNonceRequest__Output, _org_dash_platform_dapi_v0_GetIdentityContractNonceResponse>; + + getIdentityKeys: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetIdentityKeysRequest__Output, _org_dash_platform_dapi_v0_GetIdentityKeysResponse>; + + getIdentityNonce: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetIdentityNonceRequest__Output, _org_dash_platform_dapi_v0_GetIdentityNonceResponse>; + + getIdentityTokenBalances: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetIdentityTokenBalancesRequest__Output, _org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse>; + + getIdentityTokenInfos: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetIdentityTokenInfosRequest__Output, _org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse>; + + getPathElements: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetPathElementsRequest__Output, _org_dash_platform_dapi_v0_GetPathElementsResponse>; + + getPrefundedSpecializedBalance: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceRequest__Output, _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceResponse>; + + getProofs: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetProofsRequest__Output, _org_dash_platform_dapi_v0_GetProofsResponse>; + + getProtocolVersionUpgradeState: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateRequest__Output, _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse>; + + getProtocolVersionUpgradeVoteStatus: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusRequest__Output, _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse>; + + getStatus: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetStatusRequest__Output, _org_dash_platform_dapi_v0_GetStatusResponse>; + + getTokenPreProgrammedDistributions: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest__Output, _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse>; + + getTokenStatuses: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetTokenStatusesRequest__Output, _org_dash_platform_dapi_v0_GetTokenStatusesResponse>; + + getTokenTotalSupply: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetTokenTotalSupplyRequest__Output, _org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse>; + + getTotalCreditsInPlatform: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetTotalCreditsInPlatformRequest__Output, _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformResponse>; + + getVotePollsByEndDate: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest__Output, _org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse>; + + waitForStateTransitionResult: grpc.handleUnaryCall<_org_dash_platform_dapi_v0_WaitForStateTransitionResultRequest__Output, _org_dash_platform_dapi_v0_WaitForStateTransitionResultResponse>; + +} + +export interface PlatformDefinition extends grpc.ServiceDefinition { + broadcastStateTransition: MethodDefinition<_org_dash_platform_dapi_v0_BroadcastStateTransitionRequest, _org_dash_platform_dapi_v0_BroadcastStateTransitionResponse, _org_dash_platform_dapi_v0_BroadcastStateTransitionRequest__Output, _org_dash_platform_dapi_v0_BroadcastStateTransitionResponse__Output> + getConsensusParams: MethodDefinition<_org_dash_platform_dapi_v0_GetConsensusParamsRequest, _org_dash_platform_dapi_v0_GetConsensusParamsResponse, _org_dash_platform_dapi_v0_GetConsensusParamsRequest__Output, _org_dash_platform_dapi_v0_GetConsensusParamsResponse__Output> + getContestedResourceIdentityVotes: MethodDefinition<_org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest, _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse, _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesRequest__Output, _org_dash_platform_dapi_v0_GetContestedResourceIdentityVotesResponse__Output> + getContestedResourceVoteState: MethodDefinition<_org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest, _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse, _org_dash_platform_dapi_v0_GetContestedResourceVoteStateRequest__Output, _org_dash_platform_dapi_v0_GetContestedResourceVoteStateResponse__Output> + getContestedResourceVotersForIdentity: MethodDefinition<_org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest, _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse, _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityRequest__Output, _org_dash_platform_dapi_v0_GetContestedResourceVotersForIdentityResponse__Output> + getContestedResources: MethodDefinition<_org_dash_platform_dapi_v0_GetContestedResourcesRequest, _org_dash_platform_dapi_v0_GetContestedResourcesResponse, _org_dash_platform_dapi_v0_GetContestedResourcesRequest__Output, _org_dash_platform_dapi_v0_GetContestedResourcesResponse__Output> + getCurrentQuorumsInfo: MethodDefinition<_org_dash_platform_dapi_v0_GetCurrentQuorumsInfoRequest, _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse, _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoRequest__Output, _org_dash_platform_dapi_v0_GetCurrentQuorumsInfoResponse__Output> + getDataContract: MethodDefinition<_org_dash_platform_dapi_v0_GetDataContractRequest, _org_dash_platform_dapi_v0_GetDataContractResponse, _org_dash_platform_dapi_v0_GetDataContractRequest__Output, _org_dash_platform_dapi_v0_GetDataContractResponse__Output> + getDataContractHistory: MethodDefinition<_org_dash_platform_dapi_v0_GetDataContractHistoryRequest, _org_dash_platform_dapi_v0_GetDataContractHistoryResponse, _org_dash_platform_dapi_v0_GetDataContractHistoryRequest__Output, _org_dash_platform_dapi_v0_GetDataContractHistoryResponse__Output> + getDataContracts: MethodDefinition<_org_dash_platform_dapi_v0_GetDataContractsRequest, _org_dash_platform_dapi_v0_GetDataContractsResponse, _org_dash_platform_dapi_v0_GetDataContractsRequest__Output, _org_dash_platform_dapi_v0_GetDataContractsResponse__Output> + getDocuments: MethodDefinition<_org_dash_platform_dapi_v0_GetDocumentsRequest, _org_dash_platform_dapi_v0_GetDocumentsResponse, _org_dash_platform_dapi_v0_GetDocumentsRequest__Output, _org_dash_platform_dapi_v0_GetDocumentsResponse__Output> + getEpochsInfo: MethodDefinition<_org_dash_platform_dapi_v0_GetEpochsInfoRequest, _org_dash_platform_dapi_v0_GetEpochsInfoResponse, _org_dash_platform_dapi_v0_GetEpochsInfoRequest__Output, _org_dash_platform_dapi_v0_GetEpochsInfoResponse__Output> + getEvonodesProposedEpochBlocksByIds: MethodDefinition<_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByIdsRequest, _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse, _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByIdsRequest__Output, _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse__Output> + getEvonodesProposedEpochBlocksByRange: MethodDefinition<_org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByRangeRequest, _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse, _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksByRangeRequest__Output, _org_dash_platform_dapi_v0_GetEvonodesProposedEpochBlocksResponse__Output> + getGroupActionSigners: MethodDefinition<_org_dash_platform_dapi_v0_GetGroupActionSignersRequest, _org_dash_platform_dapi_v0_GetGroupActionSignersResponse, _org_dash_platform_dapi_v0_GetGroupActionSignersRequest__Output, _org_dash_platform_dapi_v0_GetGroupActionSignersResponse__Output> + getGroupActions: MethodDefinition<_org_dash_platform_dapi_v0_GetGroupActionsRequest, _org_dash_platform_dapi_v0_GetGroupActionsResponse, _org_dash_platform_dapi_v0_GetGroupActionsRequest__Output, _org_dash_platform_dapi_v0_GetGroupActionsResponse__Output> + getGroupInfo: MethodDefinition<_org_dash_platform_dapi_v0_GetGroupInfoRequest, _org_dash_platform_dapi_v0_GetGroupInfoResponse, _org_dash_platform_dapi_v0_GetGroupInfoRequest__Output, _org_dash_platform_dapi_v0_GetGroupInfoResponse__Output> + getGroupInfos: MethodDefinition<_org_dash_platform_dapi_v0_GetGroupInfosRequest, _org_dash_platform_dapi_v0_GetGroupInfosResponse, _org_dash_platform_dapi_v0_GetGroupInfosRequest__Output, _org_dash_platform_dapi_v0_GetGroupInfosResponse__Output> + getIdentitiesBalances: MethodDefinition<_org_dash_platform_dapi_v0_GetIdentitiesBalancesRequest, _org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse, _org_dash_platform_dapi_v0_GetIdentitiesBalancesRequest__Output, _org_dash_platform_dapi_v0_GetIdentitiesBalancesResponse__Output> + getIdentitiesContractKeys: MethodDefinition<_org_dash_platform_dapi_v0_GetIdentitiesContractKeysRequest, _org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse, _org_dash_platform_dapi_v0_GetIdentitiesContractKeysRequest__Output, _org_dash_platform_dapi_v0_GetIdentitiesContractKeysResponse__Output> + getIdentitiesTokenBalances: MethodDefinition<_org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesRequest, _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse, _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesRequest__Output, _org_dash_platform_dapi_v0_GetIdentitiesTokenBalancesResponse__Output> + getIdentitiesTokenInfos: MethodDefinition<_org_dash_platform_dapi_v0_GetIdentitiesTokenInfosRequest, _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse, _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosRequest__Output, _org_dash_platform_dapi_v0_GetIdentitiesTokenInfosResponse__Output> + getIdentity: MethodDefinition<_org_dash_platform_dapi_v0_GetIdentityRequest, _org_dash_platform_dapi_v0_GetIdentityResponse, _org_dash_platform_dapi_v0_GetIdentityRequest__Output, _org_dash_platform_dapi_v0_GetIdentityResponse__Output> + getIdentityBalance: MethodDefinition<_org_dash_platform_dapi_v0_GetIdentityBalanceRequest, _org_dash_platform_dapi_v0_GetIdentityBalanceResponse, _org_dash_platform_dapi_v0_GetIdentityBalanceRequest__Output, _org_dash_platform_dapi_v0_GetIdentityBalanceResponse__Output> + getIdentityBalanceAndRevision: MethodDefinition<_org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionRequest, _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse, _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionRequest__Output, _org_dash_platform_dapi_v0_GetIdentityBalanceAndRevisionResponse__Output> + getIdentityByPublicKeyHash: MethodDefinition<_org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashRequest, _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashResponse, _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashRequest__Output, _org_dash_platform_dapi_v0_GetIdentityByPublicKeyHashResponse__Output> + getIdentityContractNonce: MethodDefinition<_org_dash_platform_dapi_v0_GetIdentityContractNonceRequest, _org_dash_platform_dapi_v0_GetIdentityContractNonceResponse, _org_dash_platform_dapi_v0_GetIdentityContractNonceRequest__Output, _org_dash_platform_dapi_v0_GetIdentityContractNonceResponse__Output> + getIdentityKeys: MethodDefinition<_org_dash_platform_dapi_v0_GetIdentityKeysRequest, _org_dash_platform_dapi_v0_GetIdentityKeysResponse, _org_dash_platform_dapi_v0_GetIdentityKeysRequest__Output, _org_dash_platform_dapi_v0_GetIdentityKeysResponse__Output> + getIdentityNonce: MethodDefinition<_org_dash_platform_dapi_v0_GetIdentityNonceRequest, _org_dash_platform_dapi_v0_GetIdentityNonceResponse, _org_dash_platform_dapi_v0_GetIdentityNonceRequest__Output, _org_dash_platform_dapi_v0_GetIdentityNonceResponse__Output> + getIdentityTokenBalances: MethodDefinition<_org_dash_platform_dapi_v0_GetIdentityTokenBalancesRequest, _org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse, _org_dash_platform_dapi_v0_GetIdentityTokenBalancesRequest__Output, _org_dash_platform_dapi_v0_GetIdentityTokenBalancesResponse__Output> + getIdentityTokenInfos: MethodDefinition<_org_dash_platform_dapi_v0_GetIdentityTokenInfosRequest, _org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse, _org_dash_platform_dapi_v0_GetIdentityTokenInfosRequest__Output, _org_dash_platform_dapi_v0_GetIdentityTokenInfosResponse__Output> + getPathElements: MethodDefinition<_org_dash_platform_dapi_v0_GetPathElementsRequest, _org_dash_platform_dapi_v0_GetPathElementsResponse, _org_dash_platform_dapi_v0_GetPathElementsRequest__Output, _org_dash_platform_dapi_v0_GetPathElementsResponse__Output> + getPrefundedSpecializedBalance: MethodDefinition<_org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceRequest, _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceResponse, _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceRequest__Output, _org_dash_platform_dapi_v0_GetPrefundedSpecializedBalanceResponse__Output> + getProofs: MethodDefinition<_org_dash_platform_dapi_v0_GetProofsRequest, _org_dash_platform_dapi_v0_GetProofsResponse, _org_dash_platform_dapi_v0_GetProofsRequest__Output, _org_dash_platform_dapi_v0_GetProofsResponse__Output> + getProtocolVersionUpgradeState: MethodDefinition<_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateRequest, _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse, _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateRequest__Output, _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeStateResponse__Output> + getProtocolVersionUpgradeVoteStatus: MethodDefinition<_org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusRequest, _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse, _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusRequest__Output, _org_dash_platform_dapi_v0_GetProtocolVersionUpgradeVoteStatusResponse__Output> + getStatus: MethodDefinition<_org_dash_platform_dapi_v0_GetStatusRequest, _org_dash_platform_dapi_v0_GetStatusResponse, _org_dash_platform_dapi_v0_GetStatusRequest__Output, _org_dash_platform_dapi_v0_GetStatusResponse__Output> + getTokenPreProgrammedDistributions: MethodDefinition<_org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest, _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse, _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsRequest__Output, _org_dash_platform_dapi_v0_GetTokenPreProgrammedDistributionsResponse__Output> + getTokenStatuses: MethodDefinition<_org_dash_platform_dapi_v0_GetTokenStatusesRequest, _org_dash_platform_dapi_v0_GetTokenStatusesResponse, _org_dash_platform_dapi_v0_GetTokenStatusesRequest__Output, _org_dash_platform_dapi_v0_GetTokenStatusesResponse__Output> + getTokenTotalSupply: MethodDefinition<_org_dash_platform_dapi_v0_GetTokenTotalSupplyRequest, _org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse, _org_dash_platform_dapi_v0_GetTokenTotalSupplyRequest__Output, _org_dash_platform_dapi_v0_GetTokenTotalSupplyResponse__Output> + getTotalCreditsInPlatform: MethodDefinition<_org_dash_platform_dapi_v0_GetTotalCreditsInPlatformRequest, _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformResponse, _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformRequest__Output, _org_dash_platform_dapi_v0_GetTotalCreditsInPlatformResponse__Output> + getVotePollsByEndDate: MethodDefinition<_org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest, _org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse, _org_dash_platform_dapi_v0_GetVotePollsByEndDateRequest__Output, _org_dash_platform_dapi_v0_GetVotePollsByEndDateResponse__Output> + waitForStateTransitionResult: MethodDefinition<_org_dash_platform_dapi_v0_WaitForStateTransitionResultRequest, _org_dash_platform_dapi_v0_WaitForStateTransitionResultResponse, _org_dash_platform_dapi_v0_WaitForStateTransitionResultRequest__Output, _org_dash_platform_dapi_v0_WaitForStateTransitionResultResponse__Output> +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/Proof.ts b/experiment/proto/org/dash/platform/dapi/v0/Proof.ts new file mode 100644 index 0000000..360c7d2 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/Proof.ts @@ -0,0 +1,20 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface Proof { + 'grovedbProof'?: (Buffer | Uint8Array | string); + 'quorumHash'?: (Buffer | Uint8Array | string); + 'signature'?: (Buffer | Uint8Array | string); + 'round'?: (number); + 'blockIdHash'?: (Buffer | Uint8Array | string); + 'quorumType'?: (number); +} + +export interface Proof__Output { + 'grovedbProof': (Buffer); + 'quorumHash': (Buffer); + 'signature': (Buffer); + 'round': (number); + 'blockIdHash': (Buffer); + 'quorumType': (number); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/RawTransactions.ts b/experiment/proto/org/dash/platform/dapi/v0/RawTransactions.ts new file mode 100644 index 0000000..ce86a98 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/RawTransactions.ts @@ -0,0 +1,10 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + + +export interface RawTransactions { + 'transactions'?: (Buffer | Uint8Array | string)[]; +} + +export interface RawTransactions__Output { + 'transactions': (Buffer)[]; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/ResponseMetadata.ts b/experiment/proto/org/dash/platform/dapi/v0/ResponseMetadata.ts new file mode 100644 index 0000000..eb95ddb --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/ResponseMetadata.ts @@ -0,0 +1,21 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { Long } from '@grpc/proto-loader'; + +export interface ResponseMetadata { + 'height'?: (number | string | Long); + 'coreChainLockedHeight'?: (number); + 'epoch'?: (number); + 'timeMs'?: (number | string | Long); + 'protocolVersion'?: (number); + 'chainId'?: (string); +} + +export interface ResponseMetadata__Output { + 'height': (string); + 'coreChainLockedHeight': (number); + 'epoch': (number); + 'timeMs': (string); + 'protocolVersion': (number); + 'chainId': (string); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/SearchKey.ts b/experiment/proto/org/dash/platform/dapi/v0/SearchKey.ts new file mode 100644 index 0000000..f78a85d --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/SearchKey.ts @@ -0,0 +1,11 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { SecurityLevelMap as _org_dash_platform_dapi_v0_SecurityLevelMap, SecurityLevelMap__Output as _org_dash_platform_dapi_v0_SecurityLevelMap__Output } from '../../../../../org/dash/platform/dapi/v0/SecurityLevelMap'; + +export interface SearchKey { + 'purposeMap'?: ({[key: number]: _org_dash_platform_dapi_v0_SecurityLevelMap}); +} + +export interface SearchKey__Output { + 'purposeMap': ({[key: number]: _org_dash_platform_dapi_v0_SecurityLevelMap__Output}); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/SecurityLevelMap.ts b/experiment/proto/org/dash/platform/dapi/v0/SecurityLevelMap.ts new file mode 100644 index 0000000..75a5c27 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/SecurityLevelMap.ts @@ -0,0 +1,25 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +export const _org_dash_platform_dapi_v0_SecurityLevelMap_KeyKindRequestType = { + CURRENT_KEY_OF_KIND_REQUEST: 'CURRENT_KEY_OF_KIND_REQUEST', + ALL_KEYS_OF_KIND_REQUEST: 'ALL_KEYS_OF_KIND_REQUEST', +} as const; + +export type _org_dash_platform_dapi_v0_SecurityLevelMap_KeyKindRequestType = + | 'CURRENT_KEY_OF_KIND_REQUEST' + | 0 + | 'ALL_KEYS_OF_KIND_REQUEST' + | 1 + +export type _org_dash_platform_dapi_v0_SecurityLevelMap_KeyKindRequestType__Output = typeof _org_dash_platform_dapi_v0_SecurityLevelMap_KeyKindRequestType[keyof typeof _org_dash_platform_dapi_v0_SecurityLevelMap_KeyKindRequestType] + +export interface SecurityLevelMap { + 'securityLevelMap'?: ({[key: number]: _org_dash_platform_dapi_v0_SecurityLevelMap_KeyKindRequestType}); +} + +export interface SecurityLevelMap__Output { + 'securityLevelMap': ({[key: number]: _org_dash_platform_dapi_v0_SecurityLevelMap_KeyKindRequestType__Output}); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/SpecificKeys.ts b/experiment/proto/org/dash/platform/dapi/v0/SpecificKeys.ts new file mode 100644 index 0000000..411739c --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/SpecificKeys.ts @@ -0,0 +1,10 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface SpecificKeys { + 'keyIds'?: (number)[]; +} + +export interface SpecificKeys__Output { + 'keyIds': (number)[]; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/StateTransitionBroadcastError.ts b/experiment/proto/org/dash/platform/dapi/v0/StateTransitionBroadcastError.ts new file mode 100644 index 0000000..f58daf1 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/StateTransitionBroadcastError.ts @@ -0,0 +1,14 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface StateTransitionBroadcastError { + 'code'?: (number); + 'message'?: (string); + 'data'?: (Buffer | Uint8Array | string); +} + +export interface StateTransitionBroadcastError__Output { + 'code': (number); + 'message': (string); + 'data': (Buffer); +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/TransactionsWithProofsRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/TransactionsWithProofsRequest.ts new file mode 100644 index 0000000..94bda09 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/TransactionsWithProofsRequest.ts @@ -0,0 +1,21 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + +import type { BloomFilter as _org_dash_platform_dapi_v0_BloomFilter, BloomFilter__Output as _org_dash_platform_dapi_v0_BloomFilter__Output } from '../../../../../org/dash/platform/dapi/v0/BloomFilter'; + +export interface TransactionsWithProofsRequest { + 'bloomFilter'?: (_org_dash_platform_dapi_v0_BloomFilter | null); + 'fromBlockHash'?: (Buffer | Uint8Array | string); + 'fromBlockHeight'?: (number); + 'count'?: (number); + 'sendTransactionHashes'?: (boolean); + 'fromBlock'?: "fromBlockHash"|"fromBlockHeight"; +} + +export interface TransactionsWithProofsRequest__Output { + 'bloomFilter': (_org_dash_platform_dapi_v0_BloomFilter__Output | null); + 'fromBlockHash'?: (Buffer); + 'fromBlockHeight'?: (number); + 'count': (number); + 'sendTransactionHashes': (boolean); + 'fromBlock': "fromBlockHash"|"fromBlockHeight"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/TransactionsWithProofsResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/TransactionsWithProofsResponse.ts new file mode 100644 index 0000000..e24e443 --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/TransactionsWithProofsResponse.ts @@ -0,0 +1,18 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/core/v0/core.proto + +import type { RawTransactions as _org_dash_platform_dapi_v0_RawTransactions, RawTransactions__Output as _org_dash_platform_dapi_v0_RawTransactions__Output } from '../../../../../org/dash/platform/dapi/v0/RawTransactions'; +import type { InstantSendLockMessages as _org_dash_platform_dapi_v0_InstantSendLockMessages, InstantSendLockMessages__Output as _org_dash_platform_dapi_v0_InstantSendLockMessages__Output } from '../../../../../org/dash/platform/dapi/v0/InstantSendLockMessages'; + +export interface TransactionsWithProofsResponse { + 'rawTransactions'?: (_org_dash_platform_dapi_v0_RawTransactions | null); + 'instantSendLockMessages'?: (_org_dash_platform_dapi_v0_InstantSendLockMessages | null); + 'rawMerkleBlock'?: (Buffer | Uint8Array | string); + 'responses'?: "rawTransactions"|"instantSendLockMessages"|"rawMerkleBlock"; +} + +export interface TransactionsWithProofsResponse__Output { + 'rawTransactions'?: (_org_dash_platform_dapi_v0_RawTransactions__Output | null); + 'instantSendLockMessages'?: (_org_dash_platform_dapi_v0_InstantSendLockMessages__Output | null); + 'rawMerkleBlock'?: (Buffer); + 'responses': "rawTransactions"|"instantSendLockMessages"|"rawMerkleBlock"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/WaitForStateTransitionResultRequest.ts b/experiment/proto/org/dash/platform/dapi/v0/WaitForStateTransitionResultRequest.ts new file mode 100644 index 0000000..6b8efdf --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/WaitForStateTransitionResultRequest.ts @@ -0,0 +1,22 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + + +export interface _org_dash_platform_dapi_v0_WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0 { + 'stateTransitionHash'?: (Buffer | Uint8Array | string); + 'prove'?: (boolean); +} + +export interface _org_dash_platform_dapi_v0_WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0__Output { + 'stateTransitionHash': (Buffer); + 'prove': (boolean); +} + +export interface WaitForStateTransitionResultRequest { + 'v0'?: (_org_dash_platform_dapi_v0_WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0 | null); + 'version'?: "v0"; +} + +export interface WaitForStateTransitionResultRequest__Output { + 'v0'?: (_org_dash_platform_dapi_v0_WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/org/dash/platform/dapi/v0/WaitForStateTransitionResultResponse.ts b/experiment/proto/org/dash/platform/dapi/v0/WaitForStateTransitionResultResponse.ts new file mode 100644 index 0000000..8f31ecf --- /dev/null +++ b/experiment/proto/org/dash/platform/dapi/v0/WaitForStateTransitionResultResponse.ts @@ -0,0 +1,29 @@ +// Original file: ../../platform/packages/dapi-grpc/protos/platform/v0/platform.proto + +import type { StateTransitionBroadcastError as _org_dash_platform_dapi_v0_StateTransitionBroadcastError, StateTransitionBroadcastError__Output as _org_dash_platform_dapi_v0_StateTransitionBroadcastError__Output } from '../../../../../org/dash/platform/dapi/v0/StateTransitionBroadcastError'; +import type { Proof as _org_dash_platform_dapi_v0_Proof, Proof__Output as _org_dash_platform_dapi_v0_Proof__Output } from '../../../../../org/dash/platform/dapi/v0/Proof'; +import type { ResponseMetadata as _org_dash_platform_dapi_v0_ResponseMetadata, ResponseMetadata__Output as _org_dash_platform_dapi_v0_ResponseMetadata__Output } from '../../../../../org/dash/platform/dapi/v0/ResponseMetadata'; + +export interface _org_dash_platform_dapi_v0_WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0 { + 'error'?: (_org_dash_platform_dapi_v0_StateTransitionBroadcastError | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof | null); + 'metadata'?: (_org_dash_platform_dapi_v0_ResponseMetadata | null); + 'result'?: "error"|"proof"; +} + +export interface _org_dash_platform_dapi_v0_WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0__Output { + 'error'?: (_org_dash_platform_dapi_v0_StateTransitionBroadcastError__Output | null); + 'proof'?: (_org_dash_platform_dapi_v0_Proof__Output | null); + 'metadata': (_org_dash_platform_dapi_v0_ResponseMetadata__Output | null); + 'result': "error"|"proof"; +} + +export interface WaitForStateTransitionResultResponse { + 'v0'?: (_org_dash_platform_dapi_v0_WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0 | null); + 'version'?: "v0"; +} + +export interface WaitForStateTransitionResultResponse__Output { + 'v0'?: (_org_dash_platform_dapi_v0_WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0__Output | null); + 'version': "v0"; +} diff --git a/experiment/proto/platform.ts b/experiment/proto/platform.ts new file mode 100644 index 0000000..bc18932 --- /dev/null +++ b/experiment/proto/platform.ts @@ -0,0 +1,135 @@ +import type * as grpc from '@grpc/grpc-js'; +import type { EnumTypeDefinition, MessageTypeDefinition } from '@grpc/proto-loader'; + +import type { PlatformClient as _org_dash_platform_dapi_v0_PlatformClient, PlatformDefinition as _org_dash_platform_dapi_v0_PlatformDefinition } from './org/dash/platform/dapi/v0/Platform'; + +type SubtypeConstructor any, Subtype> = { + new(...args: ConstructorParameters): Subtype; +}; + +export interface ProtoGrpcType { + google: { + protobuf: { + BoolValue: MessageTypeDefinition + BytesValue: MessageTypeDefinition + DoubleValue: MessageTypeDefinition + FloatValue: MessageTypeDefinition + Int32Value: MessageTypeDefinition + Int64Value: MessageTypeDefinition + ListValue: MessageTypeDefinition + NullValue: EnumTypeDefinition + StringValue: MessageTypeDefinition + Struct: MessageTypeDefinition + Timestamp: MessageTypeDefinition + UInt32Value: MessageTypeDefinition + UInt64Value: MessageTypeDefinition + Value: MessageTypeDefinition + } + } + org: { + dash: { + platform: { + dapi: { + v0: { + AllKeys: MessageTypeDefinition + BroadcastStateTransitionRequest: MessageTypeDefinition + BroadcastStateTransitionResponse: MessageTypeDefinition + GetConsensusParamsRequest: MessageTypeDefinition + GetConsensusParamsResponse: MessageTypeDefinition + GetContestedResourceIdentityVotesRequest: MessageTypeDefinition + GetContestedResourceIdentityVotesResponse: MessageTypeDefinition + GetContestedResourceVoteStateRequest: MessageTypeDefinition + GetContestedResourceVoteStateResponse: MessageTypeDefinition + GetContestedResourceVotersForIdentityRequest: MessageTypeDefinition + GetContestedResourceVotersForIdentityResponse: MessageTypeDefinition + GetContestedResourcesRequest: MessageTypeDefinition + GetContestedResourcesResponse: MessageTypeDefinition + GetCurrentQuorumsInfoRequest: MessageTypeDefinition + GetCurrentQuorumsInfoResponse: MessageTypeDefinition + GetDataContractHistoryRequest: MessageTypeDefinition + GetDataContractHistoryResponse: MessageTypeDefinition + GetDataContractRequest: MessageTypeDefinition + GetDataContractResponse: MessageTypeDefinition + GetDataContractsRequest: MessageTypeDefinition + GetDataContractsResponse: MessageTypeDefinition + GetDocumentsRequest: MessageTypeDefinition + GetDocumentsResponse: MessageTypeDefinition + GetEpochsInfoRequest: MessageTypeDefinition + GetEpochsInfoResponse: MessageTypeDefinition + GetEvonodesProposedEpochBlocksByIdsRequest: MessageTypeDefinition + GetEvonodesProposedEpochBlocksByRangeRequest: MessageTypeDefinition + GetEvonodesProposedEpochBlocksResponse: MessageTypeDefinition + GetGroupActionSignersRequest: MessageTypeDefinition + GetGroupActionSignersResponse: MessageTypeDefinition + GetGroupActionsRequest: MessageTypeDefinition + GetGroupActionsResponse: MessageTypeDefinition + GetGroupInfoRequest: MessageTypeDefinition + GetGroupInfoResponse: MessageTypeDefinition + GetGroupInfosRequest: MessageTypeDefinition + GetGroupInfosResponse: MessageTypeDefinition + GetIdentitiesBalancesRequest: MessageTypeDefinition + GetIdentitiesBalancesResponse: MessageTypeDefinition + GetIdentitiesContractKeysRequest: MessageTypeDefinition + GetIdentitiesContractKeysResponse: MessageTypeDefinition + GetIdentitiesTokenBalancesRequest: MessageTypeDefinition + GetIdentitiesTokenBalancesResponse: MessageTypeDefinition + GetIdentitiesTokenInfosRequest: MessageTypeDefinition + GetIdentitiesTokenInfosResponse: MessageTypeDefinition + GetIdentityBalanceAndRevisionRequest: MessageTypeDefinition + GetIdentityBalanceAndRevisionResponse: MessageTypeDefinition + GetIdentityBalanceRequest: MessageTypeDefinition + GetIdentityBalanceResponse: MessageTypeDefinition + GetIdentityByPublicKeyHashRequest: MessageTypeDefinition + GetIdentityByPublicKeyHashResponse: MessageTypeDefinition + GetIdentityContractNonceRequest: MessageTypeDefinition + GetIdentityContractNonceResponse: MessageTypeDefinition + GetIdentityKeysRequest: MessageTypeDefinition + GetIdentityKeysResponse: MessageTypeDefinition + GetIdentityNonceRequest: MessageTypeDefinition + GetIdentityNonceResponse: MessageTypeDefinition + GetIdentityRequest: MessageTypeDefinition + GetIdentityResponse: MessageTypeDefinition + GetIdentityTokenBalancesRequest: MessageTypeDefinition + GetIdentityTokenBalancesResponse: MessageTypeDefinition + GetIdentityTokenInfosRequest: MessageTypeDefinition + GetIdentityTokenInfosResponse: MessageTypeDefinition + GetPathElementsRequest: MessageTypeDefinition + GetPathElementsResponse: MessageTypeDefinition + GetPrefundedSpecializedBalanceRequest: MessageTypeDefinition + GetPrefundedSpecializedBalanceResponse: MessageTypeDefinition + GetProofsRequest: MessageTypeDefinition + GetProofsResponse: MessageTypeDefinition + GetProtocolVersionUpgradeStateRequest: MessageTypeDefinition + GetProtocolVersionUpgradeStateResponse: MessageTypeDefinition + GetProtocolVersionUpgradeVoteStatusRequest: MessageTypeDefinition + GetProtocolVersionUpgradeVoteStatusResponse: MessageTypeDefinition + GetStatusRequest: MessageTypeDefinition + GetStatusResponse: MessageTypeDefinition + GetTokenPreProgrammedDistributionsRequest: MessageTypeDefinition + GetTokenPreProgrammedDistributionsResponse: MessageTypeDefinition + GetTokenStatusesRequest: MessageTypeDefinition + GetTokenStatusesResponse: MessageTypeDefinition + GetTokenTotalSupplyRequest: MessageTypeDefinition + GetTokenTotalSupplyResponse: MessageTypeDefinition + GetTotalCreditsInPlatformRequest: MessageTypeDefinition + GetTotalCreditsInPlatformResponse: MessageTypeDefinition + GetVotePollsByEndDateRequest: MessageTypeDefinition + GetVotePollsByEndDateResponse: MessageTypeDefinition + KeyPurpose: EnumTypeDefinition + KeyRequestType: MessageTypeDefinition + Platform: SubtypeConstructor & { service: _org_dash_platform_dapi_v0_PlatformDefinition } + Proof: MessageTypeDefinition + ResponseMetadata: MessageTypeDefinition + SearchKey: MessageTypeDefinition + SecurityLevelMap: MessageTypeDefinition + SpecificKeys: MessageTypeDefinition + StateTransitionBroadcastError: MessageTypeDefinition + WaitForStateTransitionResultRequest: MessageTypeDefinition + WaitForStateTransitionResultResponse: MessageTypeDefinition + } + } + } + } + } +} + diff --git a/experiment/ts/grpc-promisify.js b/experiment/ts/grpc-promisify.js new file mode 100644 index 0000000..d08dc2d --- /dev/null +++ b/experiment/ts/grpc-promisify.js @@ -0,0 +1,198 @@ +/** + * Promise-based wrapper around @grpc/grpc-js API. + * + * Original from https://gist.github.com/paskozdilar/196b212a1df66463487fa2b75dde049c + * + * + * USAGE: + * + * let client: grpc.Client; + * + * // unary + * let response: ResponseType = await UnaryCall(client, client.unaryMethod, request) + * + * // client stream + * let response = await ClientStream(client, client.clientStreamMethod, async function*() { + * yield request1; + * yield request2; + * }); + * + * // server stream + * for await (let response of ServerStream(client, client.serverStreamMethod, request)) { + * // ... + * } + * + * // bidirectional stream + * for await (let response of Bidirectional(client, client.bidirectionalMethod, async function*() { + * yield request1; + * yield request2; + * }) { + * // ... + * } + * + * + * NOTE: + * + * Due to TypeScript's type inference limitations, return values must be + * explicitly annotated for type inference/checking to work. + */ +export async function UnaryCall(client, method, request, options) { + return await new Promise((resolve, reject) => { + const call = method.call(client, request, options ?? {}, (error, response) => { + if (error !== null) { + reject(error); + } + else { + resolve(response); + } + }); + if (options?.signal) { + options.signal.addEventListener('abort', () => call.cancel()); + } + }); +} +export async function ClientStream(client, method, requests, signal) { + return await new Promise(async (resolve, reject) => { + const stream = method.call(client, (error, response) => { + if (error !== null) { + reject(error); + } + else { + resolve(response); + } + }); + if (signal !== undefined) { + signal.addEventListener('abort', () => stream.cancel()); + } + try { + for await (const request of requests()) { + await new Promise((resolve, reject) => { + if (!stream.write(request, (error) => { + if (error !== undefined) { + reject(error); + } + })) { + stream.once('drain', resolve); + } + else { + resolve(); + } + }); + } + stream.end(); + } + catch (error) { + reject(error); + } + }); +} +export async function* ServerStream(client, method, request, signal) { + const stream = method.call(client, request); + if (signal !== undefined) { + signal.addEventListener('abort', () => stream.cancel()); + } + let resolve; + let reject; + let promise = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + let buffer = []; + let ready = true; + stream.on('data', (response) => { + // if not ready, push to buffer + if (!ready) { + buffer.push(response); + return; + } + ready = false; + // otherwise + resolve(response); + promise = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + }); + stream.on('end', () => resolve()); + stream.on('error', (error) => reject(error)); + while (true) { + // drain buffer + while (buffer.length > 0) { + yield buffer.shift(); + } + // wait for data + ready = true; + const response = await promise; + if (response === undefined) { + break; + } + yield response; + } +} +export async function* Bidirectional(client, method, requests, signal) { + const stream = method.call(client); + if (signal !== undefined) { + signal.addEventListener('abort', () => stream.cancel()); + } + const sendDataInBackground = async () => { + try { + for await (const request of requests()) { + await new Promise((resolve, reject) => { + const draining = !stream.write(request, (error) => { + if (error !== undefined) { + reject(error); + } + }); + if (draining) { + stream.once('drain', resolve); + } + else { + resolve(); + } + }); + } + } + catch { } + finally { + stream.end(); + } + }; + sendDataInBackground(); + let resolve; + let reject; + let promise = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + let buffer = []; + let ready = true; + stream.on('data', (response) => { + // if not ready, push to buffer + if (!ready) { + buffer.push(response); + return; + } + ready = false; + // otherwise + resolve(response); + promise = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + }); + stream.on('end', () => resolve()); + stream.on('error', (error) => reject(error)); + while (true) { + // drain buffer + while (buffer.length > 0) { + yield buffer.shift(); + } + // wait for data + ready = true; + const response = await promise; + if (response === undefined) { + break; + } + yield response; + } +} diff --git a/experiment/ts/grpc-promisify.ts b/experiment/ts/grpc-promisify.ts new file mode 100644 index 0000000..5aa68fb --- /dev/null +++ b/experiment/ts/grpc-promisify.ts @@ -0,0 +1,256 @@ +/** + * Promise-based wrapper around @grpc/grpc-js API. + * + * Original from https://gist.github.com/paskozdilar/196b212a1df66463487fa2b75dde049c + * + * + * USAGE: + * + * let client: grpc.Client; + * + * // unary + * let response: ResponseType = await UnaryCall(client, client.unaryMethod, request) + * + * // client stream + * let response = await ClientStream(client, client.clientStreamMethod, async function*() { + * yield request1; + * yield request2; + * }); + * + * // server stream + * for await (let response of ServerStream(client, client.serverStreamMethod, request)) { + * // ... + * } + * + * // bidirectional stream + * for await (let response of Bidirectional(client, client.bidirectionalMethod, async function*() { + * yield request1; + * yield request2; + * }) { + * // ... + * } + * + * + * NOTE: + * + * Due to TypeScript's type inference limitations, return values must be + * explicitly annotated for type inference/checking to work. + */ + +import * as grpc from '@grpc/grpc-js'; + + +type UnaryCall = ( + this: ClientType, + request: RequestType, + options: grpc.CallOptions, + callback: (error: grpc.ServiceError | null, response: ResponseType) => void, +) => grpc.ClientUnaryCall; + +type ClientStream = ( + this: ClientType, + callback: (error: grpc.ServiceError | null, response: ResponseType) => void, +) => grpc.ClientWritableStream; + +type ServerStream = ( + this: ClientType, + request: RequestType, + options?: Partial, +) => grpc.ClientReadableStream; + +type Bidirectional = ( + this: ClientType, +) => grpc.ClientDuplexStream; + + +export async function UnaryCall>( + client: M extends UnaryCall? ClientType : never, + method: M, + request: M extends UnaryCall? RequestType : never, + options?: grpc.CallOptions & {signal?: AbortSignal}, +): Promise? ResponseType : never> { + return await new Promise((resolve, reject) => { + const call = method.call(client, request, options ?? {}, (error, response) => { + if (error !== null) { + reject(error); + } else { + resolve(response); + } + }); + if (options?.signal) { + options.signal.addEventListener('abort', () => call.cancel()); + } + }); +} + +export async function ClientStream( + client: ClientType, + method: ClientStream, + requests: () => AsyncGenerator, + signal?: AbortSignal, +): Promise { + return await new Promise(async (resolve, reject) => { + const stream = method.call(client, (error, response) => { + if (error !== null) { + reject(error); + } else { + resolve(response); + } + }); + if (signal !== undefined) { + signal.addEventListener('abort', () => stream.cancel()); + } + try { + for await (const request of requests()) { + await new Promise((resolve, reject) => { + if (!stream.write(request, (error?: Error) => { + if (error !== undefined) { + reject(error); + } + })) { + stream.once('drain', resolve); + } else { + resolve() + } + }); + } + stream.end(); + } catch (error) { + reject(error); + } + }); +} + +export async function* ServerStream( + client: ClientType, + method: ServerStream, + request: RequestType, + signal?: AbortSignal, +): AsyncGenerator { + const stream = method.call(client, request); + + if (signal !== undefined) { + signal.addEventListener('abort', () => stream.cancel()); + } + + let resolve: (response?: ResponseType) => void; + let reject: (error: Error) => void; + let promise = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + + let buffer: ResponseType[] = []; + let ready = true; + + stream.on('data', (response) => { + // if not ready, push to buffer + if (!ready) { + buffer.push(response); + return; + } + ready = false; + + // otherwise + resolve(response); + promise = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + }); + stream.on('end', () => resolve()); + stream.on('error', (error) => reject(error)); + + while (true) { + // drain buffer + while (buffer.length > 0) { + yield buffer.shift()!; + } + + // wait for data + ready = true; + const response = await promise; + if (response === undefined) { + break; + } + yield response; + } +} + +export async function* Bidirectional( + client: ClientType, + method: Bidirectional, + requests: () => AsyncGenerator, + signal?: AbortSignal, +): AsyncGenerator { + const stream = method.call(client); + + if (signal !== undefined) { + signal.addEventListener('abort', () => stream.cancel()); + } + + const sendDataInBackground = async () => { + try { + for await (const request of requests()) { + await new Promise((resolve, reject) => { + const draining = !stream.write(request, (error?: Error) => { + if (error !== undefined) { + reject(error); + } + }); + if (draining) { + stream.once('drain', resolve); + } else { + resolve() + } + }); + } + } catch { } finally { + stream.end(); + } + } + sendDataInBackground(); + + let resolve: (response?: ResponseType) => void; + let reject: (error: Error) => void; + let promise = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + + let buffer: ResponseType[] = []; + let ready = true; + + stream.on('data', (response) => { + // if not ready, push to buffer + if (!ready) { + buffer.push(response); + return; + } + ready = false; + + // otherwise + resolve(response); + promise = new Promise((_resolve, _reject) => { + resolve = _resolve; + reject = _reject; + }); + }); + stream.on('end', () => resolve()); + stream.on('error', (error) => reject(error)); + + while (true) { + // drain buffer + while (buffer.length > 0) { + yield buffer.shift()!; + } + + // wait for data + ready = true; + const response = await promise; + if (response === undefined) { + break; + } + yield response; + } +} \ No newline at end of file diff --git a/identity_create.js b/identity_create.js new file mode 100644 index 0000000..e69de29 diff --git a/index.html b/index.html new file mode 100644 index 0000000..f91614f --- /dev/null +++ b/index.html @@ -0,0 +1,43 @@ + + + + +
+
+ + +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ + + + \ No newline at end of file diff --git a/key-utils.js b/key-utils.js deleted file mode 100644 index 996758d..0000000 --- a/key-utils.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; - -let Secp256k1 = require("@dashincubator/secp256k1"); - -/** @typedef {Required} TxKeyUtils */ -/** - * @typedef KeyUtilsPartial - * @prop {KeySet} set - */ -/** @typedef {TxKeyUtils & KeyUtilsPartial} KeyUtils */ - -/** - * @callback KeySet - * @param {String} id - * @param {KeyInfo} keyInfo - */ - -/** @type {KeyUtils} */ -let KeyUtils = module.exports; - -/** - * @typedef KeyInfo - * @prop {String} address - * @prop {Uint8Array} privateKey - * @prop {Uint8Array} publicKey - * @prop {String} pubKeyHash - */ - -/** @type Object. */ -let keysMap = {}; - -KeyUtils.set = function (id, keyInfo) { - if (!id) { - throw new Error(`key identifier is not defined)`); - } - keysMap[id] = keyInfo; -}; - -KeyUtils.sign = async function (privKeyBytes, hashBytes) { - let sigOpts = { canonical: true, extraEntropy: true }; - let sigBytes = await Secp256k1.sign(hashBytes, privKeyBytes, sigOpts); - return sigBytes; -}; -KeyUtils.getPrivateKey = async function (input) { - if (!input.address) { - //throw new Error('should put the address on the input there buddy...'); - console.warn("missing address:", input.txid, input.outputIndex); - return null; - } - - let keyInfo = keysMap[input.address]; - return keyInfo.privateKey; -}; - -KeyUtils.getPublicKey = async function (txInput, i) { - let privKeyBytes = await KeyUtils.getPrivateKey(txInput, i); - if (!privKeyBytes) { - return null; - } - let pubKeyBytes = await KeyUtils.toPublicKey(privKeyBytes); - - return pubKeyBytes; -}; - -KeyUtils.toPublicKey = async function (privKeyBytes) { - let isCompressed = true; - let pubKeyBytes = Secp256k1.getPublicKey(privKeyBytes, isCompressed); - - return pubKeyBytes; -}; diff --git a/package-lock.json b/package-lock.json index 36e16ea..746c297 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,57 +9,515 @@ "version": "0.1.0", "license": "SEE LICENSE IN LICENSE", "dependencies": { - "@dashevo/dapi-grpc": "^1.1.1", - "@dashevo/wasm-dpp": "^1.1.1", "@dashincubator/secp256k1": "^1.7.1-5", + "@grpc/grpc-js": "^1.13.2", + "@noble/secp256k1": "^2.2.3", + "@protobuf-ts/grpcweb-transport": "^2.9.6", + "@protobuf-ts/runtime-rpc": "^2.9.6", + "base-x": "^5.0.1", + "base64-js": "^1.5.1", + "bloom-filter": "^0.2.0", "cbor-web": "^9.0.2", "dashhd": "^3.3.3", "dashkeys": "^1.1.5", "dashphrase": "^1.4.0", - "dashtx": "^0.20.1" + "dashtx": "^0.20.3", + "dotenv": "^16.4.7", + "eventsource-client": "^1.1.3", + "launchdarkly-eventsource": "^2.0.3", + "qrcode-svg": "^1.1.0", + "ripemd160-js": "^3.0.4" + }, + "devDependencies": { + "@protobuf-ts/plugin": "^2.9.6", + "@types/bloom-filter": "^0.2.4", + "replace-in-files-cli": "^3.0.0", + "tsc-esm-fix": "^3.1.2", + "typescript": "^5.x", + "vite": "^6.2.5", + "vitest": "^3.1.1" } }, - "node_modules/@dashevo/bls": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/@dashevo/bls/-/bls-1.2.9.tgz", - "integrity": "sha512-7+j0tQMi8fPmgcLgxnfvML2GW/A6xYA1cTLDLN2prfvV6V1OpH6EiwVGKTXBquJT0OQX++upClOKYUlIEQ8+0A==", - "dependencies": { - "binascii": "0.0.2" + "node_modules/@dashincubator/secp256k1": { + "version": "1.7.1-5", + "resolved": "https://registry.npmjs.org/@dashincubator/secp256k1/-/secp256k1-1.7.1-5.tgz", + "integrity": "sha512-3iA+RDZrJsRFPpWhlYkp3EdoFAlKjdqkNFiRwajMrzcpA/G/IBX0AnC1pwRLkTrM+tUowcyGrkJfT03U4ETZeg==", + "license": "MIT" + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.2.tgz", + "integrity": "sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@dashevo/dapi-grpc": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@dashevo/dapi-grpc/-/dapi-grpc-1.1.1.tgz", - "integrity": "sha512-edq4Y+WO74V+ojBKXpfNQCgiiSF4xdPQu7g7C2QwMZgCj/IiTFXPZftwIqOIT/jHvHCZnM87lbWZ59wZEpd04A==", + "node_modules/@esbuild/android-arm": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.2.tgz", + "integrity": "sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==", + "cpu": [ + "arm" + ], + "dev": true, "license": "MIT", - "dependencies": { - "@dashevo/grpc-common": "1.1.1", - "@dashevo/protobufjs": "6.10.5", - "@grpc/grpc-js": "1.4.4", - "@improbable-eng/grpc-web": "^0.15.0", - "google-protobuf": "^3.12.2", - "long": "^5.2.0" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" } }, - "node_modules/@dashevo/grpc-common": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@dashevo/grpc-common/-/grpc-common-1.1.1.tgz", - "integrity": "sha512-lobOOitH+RWEkNxxh+Izd6N1bK9V0j0qbWHOreDFqIib4OEVVBuEGMuv19uVftpZ/XiQk1bC541XlE2YeSLDWA==", + "node_modules/@esbuild/android-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.2.tgz", + "integrity": "sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.2.tgz", + "integrity": "sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz", + "integrity": "sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.2.tgz", + "integrity": "sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.2.tgz", + "integrity": "sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.2.tgz", + "integrity": "sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.2.tgz", + "integrity": "sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.2.tgz", + "integrity": "sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.2.tgz", + "integrity": "sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.2.tgz", + "integrity": "sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.2.tgz", + "integrity": "sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.2.tgz", + "integrity": "sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.2.tgz", + "integrity": "sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.2.tgz", + "integrity": "sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.2.tgz", + "integrity": "sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.2.tgz", + "integrity": "sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.2.tgz", + "integrity": "sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.2.tgz", + "integrity": "sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.2.tgz", + "integrity": "sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.2.tgz", + "integrity": "sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.2.tgz", + "integrity": "sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.2.tgz", + "integrity": "sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.2.tgz", + "integrity": "sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@grpc/grpc-js": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.13.2.tgz", + "integrity": "sha512-nnR5nmL6lxF8YBqb6gWvEgLdLh/Fn+kvAdX5hUOnt48sNSb0riz/93ASd2E5gvanPA41X6Yp25bIfGRp1SMb2g==", + "license": "Apache-2.0", + "dependencies": { + "@grpc/proto-loader": "^0.7.13", + "@js-sdsl/ordered-map": "^4.4.2" + }, + "engines": { + "node": ">=12.10.0" + } + }, + "node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader": { + "version": "0.7.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz", + "integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==", + "license": "Apache-2.0", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.5", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@grpc/grpc-js/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "license": "ISC", "dependencies": { - "@dashevo/protobufjs": "6.10.5", - "@grpc/grpc-js": "1.4.4", - "@grpc/proto-loader": "^0.5.2", - "cbor": "^8.0.0", - "lodash": "^4.17.21", - "long": "^5.2.0", - "semver": "^7.5.3" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, - "node_modules/@dashevo/protobufjs": { - "version": "6.10.5", - "resolved": "https://registry.npmjs.org/@dashevo/protobufjs/-/protobufjs-6.10.5.tgz", - "integrity": "sha512-Hb7wymxGshyrbZlJYSTculJ2iAr0CI46v8DnO0fk/TxZbHkpg6DjJNrdQOO+COJmdky4JqL1o9RCmi5e5a8lrQ==", + "node_modules/@grpc/grpc-js/node_modules/protobufjs": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", + "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", "hasInstallScript": true, "license": "BSD-3-Clause", "dependencies": { @@ -73,100 +531,194 @@ "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": "^13.7.0", - "long": "^4.0.0" + "@types/node": ">=13.7.0", + "long": "^5.0.0" }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" + "engines": { + "node": ">=12.0.0" } }, - "node_modules/@dashevo/protobufjs/node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", - "license": "Apache-2.0" - }, - "node_modules/@dashevo/wasm-dpp": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@dashevo/wasm-dpp/-/wasm-dpp-1.1.1.tgz", - "integrity": "sha512-8E4v2p2yt/PyxUqjNrSx7Kvjne6Wb3hz+0tm0f5i6ImfPEXmcksPiNtfLH5qDL/znDJjdIFC52xQoOgK+l+gXw==", + "node_modules/@grpc/grpc-js/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "license": "MIT", "dependencies": { - "@dashevo/bls": "~1.2.9", - "bs58": "^4.0.1", - "lodash": "^4.17.21", - "varint": "^6.0.0" + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" } }, - "node_modules/@dashincubator/secp256k1": { - "version": "1.7.1-5", - "resolved": "https://registry.npmjs.org/@dashincubator/secp256k1/-/secp256k1-1.7.1-5.tgz", - "integrity": "sha512-3iA+RDZrJsRFPpWhlYkp3EdoFAlKjdqkNFiRwajMrzcpA/G/IBX0AnC1pwRLkTrM+tUowcyGrkJfT03U4ETZeg==", + "node_modules/@grpc/grpc-js/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, "license": "MIT" }, - "node_modules/@grpc/grpc-js": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.4.4.tgz", - "integrity": "sha512-a6222b7Dl6fIlMgzVl7e+NiRoLiZFbpcwvBH2Oli56Bn7W4/3Ld+86hK4ffPn5rx2DlDidmIcvIJiOQXyhv9gA==", - "license": "Apache-2.0", + "node_modules/@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, + "node_modules/@noble/secp256k1": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-2.2.3.tgz", + "integrity": "sha512-l7r5oEQym9Us7EAigzg30/PQAvynhMt2uoYtT3t26eGDVm9Yii5mZ5jWSWmZ/oSIR2Et0xfc6DXrG0bZ787V3w==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", "dependencies": { - "@grpc/proto-loader": "^0.6.4", - "@types/node": ">=12.12.47" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, "engines": { - "node": "^8.13.0 || >=10.10.0" + "node": ">= 8" } }, - "node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader": { - "version": "0.6.13", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.13.tgz", - "integrity": "sha512-FjxPYDRTn6Ec3V0arm1FtSpmP6V50wuph2yILpyvTKzjc76oDdoihXqM1DzOW5ubvCC8GivfCnNtfaRE8myJ7g==", + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@protobuf-ts/grpcweb-transport": { + "version": "2.9.6", + "resolved": "https://registry.npmjs.org/@protobuf-ts/grpcweb-transport/-/grpcweb-transport-2.9.6.tgz", + "integrity": "sha512-TDBLxRkPSe/2daIlEpNEGQKDikBPtl4gUqYx7ap+b69YUkCcYH08w/12VuuA+uvnWdEEbS0DSxsJQZQyhptZHA==", "license": "Apache-2.0", "dependencies": { - "@types/long": "^4.0.1", - "lodash.camelcase": "^4.3.0", - "long": "^4.0.0", - "protobufjs": "^6.11.3", - "yargs": "^16.2.0" + "@protobuf-ts/runtime": "^2.9.6", + "@protobuf-ts/runtime-rpc": "^2.9.6" + } + }, + "node_modules/@protobuf-ts/plugin": { + "version": "2.9.6", + "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin/-/plugin-2.9.6.tgz", + "integrity": "sha512-Wpv5rkXeu6E5Y4r0TjWE0bzRGddiTYl/RM+tLgVlS0r8CqOBqNAmlWv+s8ltf/F75rVrahUal0cpyhFwha9GRA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@protobuf-ts/plugin-framework": "^2.9.6", + "@protobuf-ts/protoc": "^2.9.6", + "@protobuf-ts/runtime": "^2.9.6", + "@protobuf-ts/runtime-rpc": "^2.9.6", + "typescript": "^3.9" }, "bin": { - "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + "protoc-gen-dump": "bin/protoc-gen-dump", + "protoc-gen-ts": "bin/protoc-gen-ts" + } + }, + "node_modules/@protobuf-ts/plugin-framework": { + "version": "2.9.6", + "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin-framework/-/plugin-framework-2.9.6.tgz", + "integrity": "sha512-w7A1RXrDCiVzcaRE6YJP7FCARuAFe/Vc4SNQnHAi4CF0V6mEtyjAYEIC5BNYgIRaJEqB26zzsBQjIem3R02SCA==", + "dev": true, + "license": "(Apache-2.0 AND BSD-3-Clause)", + "dependencies": { + "@protobuf-ts/runtime": "^2.9.6", + "typescript": "^3.9" + } + }, + "node_modules/@protobuf-ts/plugin-framework/node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=6" + "node": ">=4.2.0" } }, - "node_modules/@grpc/grpc-js/node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", - "license": "Apache-2.0" - }, - "node_modules/@grpc/proto-loader": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.6.tgz", - "integrity": "sha512-DT14xgw3PSzPxwS13auTEwxhMMOoz33DPUKNtmYK/QYbBSpLXJy78FGGs5yVoxVobEqPm4iW9MOIoz0A3bLTRQ==", + "node_modules/@protobuf-ts/plugin/node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "dev": true, "license": "Apache-2.0", - "dependencies": { - "lodash.camelcase": "^4.3.0", - "protobufjs": "^6.8.6" + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=6" + "node": ">=4.2.0" + } + }, + "node_modules/@protobuf-ts/protoc": { + "version": "2.9.6", + "resolved": "https://registry.npmjs.org/@protobuf-ts/protoc/-/protoc-2.9.6.tgz", + "integrity": "sha512-c0XvAPDIBAovH9HxV8gBv8gzOTreQIqibcusrB1+DxvFiSvy+2V1tjbUmG5gJEbjk3aAOaoj0a3+QuE+P28xUw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "protoc": "protoc.js" } }, - "node_modules/@improbable-eng/grpc-web": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", - "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", + "node_modules/@protobuf-ts/runtime": { + "version": "2.9.6", + "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.9.6.tgz", + "integrity": "sha512-C0CfpKx4n4LBbUrajOdRj2BTbd3qBoK0SiKWLq7RgCoU6xiN4wesBMFHUOBp3fFzKeZwgU8Q2KtzaqzIvPLRXg==", + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, + "node_modules/@protobuf-ts/runtime-rpc": { + "version": "2.9.6", + "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.9.6.tgz", + "integrity": "sha512-0UeqDRzNxgsh08lY5eWzFJNfD3gZ8Xf+WG1HzbIAbVAigzigwjwsYNNhTeas5H3gco1U5owTzCg177aambKOOw==", "license": "Apache-2.0", "dependencies": { - "browser-headers": "^0.4.1" - }, - "peerDependencies": { - "google-protobuf": "^3.14.0" + "@protobuf-ts/runtime": "^2.9.6" } }, "node_modules/@protobufjs/aspromise": { @@ -233,17 +785,420 @@ "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", "license": "BSD-3-Clause" }, - "node_modules/@types/long": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==", - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "13.13.52", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.52.tgz", - "integrity": "sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==", - "license": "MIT" + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.39.0.tgz", + "integrity": "sha512-lGVys55Qb00Wvh8DMAocp5kIcaNzEFTmGhfFd88LfaogYTRKrdxgtlO5H6S49v2Nd8R2C6wLOal0qv6/kCkOwA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.39.0.tgz", + "integrity": "sha512-It9+M1zE31KWfqh/0cJLrrsCPiF72PoJjIChLX+rEcujVRCb4NLQ5QzFkzIZW8Kn8FTbvGQBY5TkKBau3S8cCQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.39.0.tgz", + "integrity": "sha512-lXQnhpFDOKDXiGxsU9/l8UEGGM65comrQuZ+lDcGUx+9YQ9dKpF3rSEGepyeR5AHZ0b5RgiligsBhWZfSSQh8Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.39.0.tgz", + "integrity": "sha512-mKXpNZLvtEbgu6WCkNij7CGycdw9cJi2k9v0noMb++Vab12GZjFgUXD69ilAbBh034Zwn95c2PNSz9xM7KYEAQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.39.0.tgz", + "integrity": "sha512-jivRRlh2Lod/KvDZx2zUR+I4iBfHcu2V/BA2vasUtdtTN2Uk3jfcZczLa81ESHZHPHy4ih3T/W5rPFZ/hX7RtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.39.0.tgz", + "integrity": "sha512-8RXIWvYIRK9nO+bhVz8DwLBepcptw633gv/QT4015CpJ0Ht8punmoHU/DuEd3iw9Hr8UwUV+t+VNNuZIWYeY7Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.39.0.tgz", + "integrity": "sha512-mz5POx5Zu58f2xAG5RaRRhp3IZDK7zXGk5sdEDj4o96HeaXhlUwmLFzNlc4hCQi5sGdR12VDgEUqVSHer0lI9g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.39.0.tgz", + "integrity": "sha512-+YDwhM6gUAyakl0CD+bMFpdmwIoRDzZYaTWV3SDRBGkMU/VpIBYXXEvkEcTagw/7VVkL2vA29zU4UVy1mP0/Yw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.39.0.tgz", + "integrity": "sha512-EKf7iF7aK36eEChvlgxGnk7pdJfzfQbNvGV/+l98iiMwU23MwvmV0Ty3pJ0p5WQfm3JRHOytSIqD9LB7Bq7xdQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.39.0.tgz", + "integrity": "sha512-vYanR6MtqC7Z2SNr8gzVnzUul09Wi1kZqJaek3KcIlI/wq5Xtq4ZPIZ0Mr/st/sv/NnaPwy/D4yXg5x0B3aUUA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.39.0.tgz", + "integrity": "sha512-NMRUT40+h0FBa5fb+cpxtZoGAggRem16ocVKIv5gDB5uLDgBIwrIsXlGqYbLwW8YyO3WVTk1FkFDjMETYlDqiw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.39.0.tgz", + "integrity": "sha512-0pCNnmxgduJ3YRt+D+kJ6Ai/r+TaePu9ZLENl+ZDV/CdVczXl95CbIiwwswu4L+K7uOIGf6tMo2vm8uadRaICQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.39.0.tgz", + "integrity": "sha512-t7j5Zhr7S4bBtksT73bO6c3Qa2AV/HqiGlj9+KB3gNF5upcVkx+HLgxTm8DK4OkzsOYqbdqbLKwvGMhylJCPhQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.39.0.tgz", + "integrity": "sha512-m6cwI86IvQ7M93MQ2RF5SP8tUjD39Y7rjb1qjHgYh28uAPVU8+k/xYWvxRO3/tBN2pZkSMa5RjnPuUIbrwVxeA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.39.0.tgz", + "integrity": "sha512-iRDJd2ebMunnk2rsSBYlsptCyuINvxUfGwOUldjv5M4tpa93K8tFMeYGpNk2+Nxl+OBJnBzy2/JCscGeO507kA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.39.0.tgz", + "integrity": "sha512-t9jqYw27R6Lx0XKfEFe5vUeEJ5pF3SGIM6gTfONSMb7DuG6z6wfj2yjcoZxHg129veTqU7+wOhY6GX8wmf90dA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.39.0.tgz", + "integrity": "sha512-ThFdkrFDP55AIsIZDKSBWEt/JcWlCzydbZHinZ0F/r1h83qbGeenCt/G/wG2O0reuENDD2tawfAj2s8VK7Bugg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.39.0.tgz", + "integrity": "sha512-jDrLm6yUtbOg2TYB3sBF3acUnAwsIksEYjLeHL+TJv9jg+TmTwdyjnDex27jqEMakNKf3RwwPahDIt7QXCSqRQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.39.0.tgz", + "integrity": "sha512-6w9uMuza+LbLCVoNKL5FSLE7yvYkq9laSd09bwS0tMjkwXrmib/4KmoJcrKhLWHvw19mwU+33ndC69T7weNNjQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.39.0.tgz", + "integrity": "sha512-yAkUOkIKZlK5dl7u6dg897doBgLXmUHhIINM2c+sND3DZwnrdQkkSiDh7N75Ll4mM4dxSkYfXqU9fW3lLkMFug==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@topoconfig/extends": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@topoconfig/extends/-/extends-0.16.2.tgz", + "integrity": "sha512-sTF+qpWakr5jf1Hn/kkFSi833xPW15s/loMAiKSYSSVv4vDonxf6hwCGzMXjLq+7HZoaK6BgaV72wXr1eY7FcQ==", + "dev": true, + "license": "MIT", + "bin": { + "xtends": "target/esm/cli.mjs" + } + }, + "node_modules/@types/bloom-filter": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@types/bloom-filter/-/bloom-filter-0.2.4.tgz", + "integrity": "sha512-HEbz5UqQ/WxLkzxgczPzA/Ns77nn+OLvEOr+/wKtsJhkE6tCozHcV//wE/iF1DnXfRLGjB5uUlO8jaM74peRag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.13.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.14.tgz", + "integrity": "sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/@vitest/expect": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.1.1.tgz", + "integrity": "sha512-q/zjrW9lgynctNbwvFtQkGK9+vvHA5UzVi2V8APrp1C6fG6/MuYYkmlx4FubuqLycCeSdHD5aadWfua/Vr0EUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.1.1", + "@vitest/utils": "3.1.1", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/pretty-format": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.1.1.tgz", + "integrity": "sha512-dg0CIzNx+hMMYfNmSqJlLSXEmnNhMswcn3sXO7Tpldr0LiGmg3eXdLLhwkv2ZqgHb/d5xg5F7ezNFRA1fA13yA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.1.1.tgz", + "integrity": "sha512-X/d46qzJuEDO8ueyjtKfxffiXraPRfmYasoC4i5+mlLEJ10UvPb0XH5M9C3gWuxd7BAQhpK42cJgJtq53YnWVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "3.1.1", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.1.1.tgz", + "integrity": "sha512-bByMwaVWe/+1WDf9exFxWWgAixelSdiwo2p33tpqIlM14vW7PRV5ppayVXtfycqze4Qhtwag5sVhX400MLBOOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.1.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.1.1.tgz", + "integrity": "sha512-+EmrUOOXbKzLkTDwlsc/xrwOlPDXyVk3Z6P6K4oiCndxz7YLpp/0R0UsWVOKT0IXWjjBJuSMk6D27qipaupcvQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^3.0.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.1.1.tgz", + "integrity": "sha512-1XIjflyaU2k3HMArJ50bwSh3wKWPD6Q47wz/NUSmRV0zNywPc4w79ARjg/i/aNINHwA+mIALhUVqD9/aUvZNgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.1.1", + "loupe": "^3.1.3", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } }, "node_modules/ansi-regex": { "version": "5.0.1", @@ -269,45 +1224,68 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/base-x": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", - "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, "license": "MIT", - "dependencies": { - "safe-buffer": "^5.0.1" + "engines": { + "node": ">=12" } }, - "node_modules/binascii": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/binascii/-/binascii-0.0.2.tgz", - "integrity": "sha512-rA2CrUl1+6yKrn+XgLs8Hdy18OER1UW146nM+ixzhQXDY+Bd3ySkyIJGwF2a4I45JwbvF1mDL/nWkqBwpOcdBA==" + "node_modules/base-x": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-5.0.1.tgz", + "integrity": "sha512-M7uio8Zt++eg3jPj+rHMfCC+IuygQHHCOU+IYsVtik6FWjuYpVt/+MRKcgsAMHh8mMFAwnB+Bs+mTrFiXjMzKg==", + "license": "MIT" }, - "node_modules/browser-headers": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", - "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==", - "license": "Apache-2.0" + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bloom-filter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bloom-filter/-/bloom-filter-0.2.0.tgz", + "integrity": "sha512-RMG2RpnKczVzRsEYSPaT5rKsyj0w5/wpQRjaW4vOMe1WyUDQpoqxjNc10uROEjdhu63ytRt6aFRPXFePi/Rd7A==" }, - "node_modules/bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, "license": "MIT", "dependencies": { - "base-x": "^3.0.2" + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/cbor": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", - "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, "license": "MIT", - "dependencies": { - "nofilter": "^3.1.0" - }, "engines": { - "node": ">=12.19" + "node": ">=8" } }, "node_modules/cbor-web": { @@ -319,15 +1297,31 @@ "node": ">=16" } }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "license": "ISC", + "node_modules/chai": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.0.tgz", + "integrity": "sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==", + "dev": true, + "license": "MIT", "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" } }, "node_modules/color-convert": { @@ -367,125 +1361,590 @@ "license": "SEE LICENSE IN LICENSE" }, "node_modules/dashtx": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/dashtx/-/dashtx-0.20.1.tgz", - "integrity": "sha512-+Y0vxmkCzZ2+qrWgrHDxYust6io/jeMaNkcaPFI3ZjWcwVQEBnARyqWDTvHvfISUeROkPEUwEJ2GSOXY9Tnprg==", + "version": "0.20.3", + "resolved": "https://registry.npmjs.org/dashtx/-/dashtx-0.20.3.tgz", + "integrity": "sha512-2/coe9Gz8di2EwQvH5pfuuAP+yPVoZXIODpB8vGdNKyxwpGdihceunBBPv8xN1OK7TfQf6WZKlgNpKih9qD2dQ==", "license": "SEE LICENSE IN LICENSE", "bin": { "dashtx-inspect": "bin/inspect.js" } }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/depseek": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/depseek/-/depseek-0.4.1.tgz", + "integrity": "sha512-YYfPPajzH9s2qnEva411VJzCMWtArBTfluI9USiKQ+T6xBWFh3C7yPxhaa1KVgJa17v9aRKc+LcRhgxS5/9mOA==", + "dev": true, + "license": "MIT" + }, + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "license": "MIT" }, + "node_modules/es-module-lexer": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz", + "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz", + "integrity": "sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.2", + "@esbuild/android-arm": "0.25.2", + "@esbuild/android-arm64": "0.25.2", + "@esbuild/android-x64": "0.25.2", + "@esbuild/darwin-arm64": "0.25.2", + "@esbuild/darwin-x64": "0.25.2", + "@esbuild/freebsd-arm64": "0.25.2", + "@esbuild/freebsd-x64": "0.25.2", + "@esbuild/linux-arm": "0.25.2", + "@esbuild/linux-arm64": "0.25.2", + "@esbuild/linux-ia32": "0.25.2", + "@esbuild/linux-loong64": "0.25.2", + "@esbuild/linux-mips64el": "0.25.2", + "@esbuild/linux-ppc64": "0.25.2", + "@esbuild/linux-riscv64": "0.25.2", + "@esbuild/linux-s390x": "0.25.2", + "@esbuild/linux-x64": "0.25.2", + "@esbuild/netbsd-arm64": "0.25.2", + "@esbuild/netbsd-x64": "0.25.2", + "@esbuild/openbsd-arm64": "0.25.2", + "@esbuild/openbsd-x64": "0.25.2", + "@esbuild/sunos-x64": "0.25.2", + "@esbuild/win32-arm64": "0.25.2", + "@esbuild/win32-ia32": "0.25.2", + "@esbuild/win32-x64": "0.25.2" + } + }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "license": "ISC", + "node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true, + "license": "MIT", "engines": { - "node": "6.* || 8.* || >= 10.*" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/google-protobuf": { - "version": "3.21.4", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.4.tgz", - "integrity": "sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==", - "license": "(BSD-3-Clause AND Apache-2.0)" + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/eventsource-client": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/eventsource-client/-/eventsource-client-1.1.3.tgz", + "integrity": "sha512-6GJGePDMxin/6VH1Dex7RqnZRguweO1BVKhXpBYwKcQbVLOZPLfeDr9vYSb9ra88kjs0NpT8FaEDz5rExedDkg==", "license": "MIT", + "dependencies": { + "eventsource-parser": "^3.0.0" + }, "engines": { - "node": ">=8" + "node": ">=18.0.0" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "license": "MIT" - }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", - "license": "MIT" + "node_modules/eventsource-parser": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.2.tgz", + "integrity": "sha512-6RxOBZ/cYgd8usLwsEl+EC09Au/9BcmCKYF2/xbml6DNczf7nv0MQb+7BA2F+li6//I+28VNlQR37XfQtcAJuA==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } }, - "node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", - "license": "Apache-2.0" + "node_modules/expect-type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.0.tgz", + "integrity": "sha512-80F22aiJ3GLyVnS/B3HzgR6RelZVumzj9jkL0Rhz4h0xYbNW9PjlQz5h3J/SShErbXBc295vseR4/MIbVmUbeA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } }, - "node_modules/nofilter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", - "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, "engines": { - "node": ">=12.19" + "node": ">=8.6.0" } }, - "node_modules/protobufjs": { - "version": "6.11.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.4.tgz", - "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==", - "hasInstallScript": true, - "license": "BSD-3-Clause", + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": ">=13.7.0", - "long": "^4.0.0" - }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" + "reusify": "^1.0.4" } }, - "node_modules/protobufjs/node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", - "license": "Apache-2.0" + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "node_modules/fs-extra": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "dev": true, "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=14.14" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", + "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.3", + "ignore": "^7.0.3", + "path-type": "^6.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ignore": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.3.tgz", + "integrity": "sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.ts" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/launchdarkly-eventsource": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/launchdarkly-eventsource/-/launchdarkly-eventsource-2.0.3.tgz", + "integrity": "sha512-VhFjppK7jXlcEKaS7bxdoibB5j01NKyeDR7a8XfssdDGNWCTsbF0/5IExSmPi44eDncPhkoPNxlSZhEZvrbD5w==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "license": "MIT" + }, + "node_modules/long": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", + "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==", + "license": "Apache-2.0" + }, + "node_modules/loupe": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.3.tgz", + "integrity": "sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==", + "dev": true, + "license": "MIT" + }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/meow": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-type": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", + "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathval": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz", + "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", + "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/qrcode-svg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/qrcode-svg/-/qrcode-svg-1.1.0.tgz", + "integrity": "sha512-XyQCIXux1zEIA3NPb0AeR8UMYvXZzWEhgdBgBjH9gO7M48H9uoHzviNz8pXw3UzrAcxRRRn9gxHewAVK7bn9qw==", + "license": "MIT", + "bin": { + "qrcode-svg": "bin/qrcode-svg.js" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, "funding": [ { "type": "github", @@ -502,18 +1961,180 @@ ], "license": "MIT" }, - "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "license": "ISC", + "node_modules/replace-in-files-cli": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/replace-in-files-cli/-/replace-in-files-cli-3.0.0.tgz", + "integrity": "sha512-A2VjOaPF8yjiaRjuIlvX3PB0uRMQ3DpnKG4yg38wjPrqR0OSzD00ubOZqqwAunoT5emKjEZPvdkm6JRVJrBmlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^5.0.0", + "globby": "^14.0.1", + "meow": "^13.2.0", + "normalize-path": "^3.0.0", + "write-file-atomic": "^5.0.1" + }, "bin": { - "semver": "bin/semver.js" + "replace-in-files": "cli.ts" }, "engines": { - "node": ">=10" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/ripemd160-js": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/ripemd160-js/-/ripemd160-js-3.0.4.tgz", + "integrity": "sha512-lhDcLriFFscUr4yoqVCP2f8ZRpBnikW2TLfnGi2Fw+wSzmvrdSi6c13By8ZGLysrS0s8oLxNVbdodGCWhbPTYw==", + "license": "MIT", + "engines": { + "node": ">= 16", + "npm": ">=7.0.0" + } + }, + "node_modules/rollup": { + "version": "4.39.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.39.0.tgz", + "integrity": "sha512-thI8kNc02yNvnmJp8dr3fNWJ9tCONDhp6TV35X6HkKGGs9E6q7YWCHbe5vKiTa7TAiNcFEmXKj3X/pG2b3ci0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.7" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.39.0", + "@rollup/rollup-android-arm64": "4.39.0", + "@rollup/rollup-darwin-arm64": "4.39.0", + "@rollup/rollup-darwin-x64": "4.39.0", + "@rollup/rollup-freebsd-arm64": "4.39.0", + "@rollup/rollup-freebsd-x64": "4.39.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.39.0", + "@rollup/rollup-linux-arm-musleabihf": "4.39.0", + "@rollup/rollup-linux-arm64-gnu": "4.39.0", + "@rollup/rollup-linux-arm64-musl": "4.39.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.39.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.39.0", + "@rollup/rollup-linux-riscv64-gnu": "4.39.0", + "@rollup/rollup-linux-riscv64-musl": "4.39.0", + "@rollup/rollup-linux-s390x-gnu": "4.39.0", + "@rollup/rollup-linux-x64-gnu": "4.39.0", + "@rollup/rollup-linux-x64-musl": "4.39.0", + "@rollup/rollup-win32-arm64-msvc": "4.39.0", + "@rollup/rollup-win32-ia32-msvc": "4.39.0", + "@rollup/rollup-win32-x64-msvc": "4.39.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.1.tgz", + "integrity": "sha512-vj5lIj3Mwf9D79hBkltk5qmkFI+biIKWS2IBxEyEU3AX1tUf7AoL8nSazCOiiqQsGKIq01SClsKEzweu34uwvA==", + "dev": true, + "license": "MIT" + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -540,12 +2161,422 @@ "node": ">=8" } }, - "node_modules/varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, "license": "MIT" }, + "node_modules/tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/tinypool": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", + "integrity": "sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", + "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tsc-esm-fix": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/tsc-esm-fix/-/tsc-esm-fix-3.1.2.tgz", + "integrity": "sha512-1/OpZssMcEp2ae6DyZV+yvDviofuCdDf7dEWEaBvm/ac8vtS04lFyl0LVs8LQE56vjKHytgzVjPIL9udM4QuNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@topoconfig/extends": "^0.16.2", + "depseek": "^0.4.1", + "fast-glob": "^3.3.2", + "fs-extra": "^11.2.0", + "json5": "^2.2.3", + "type-flag": "^3.0.0" + }, + "bin": { + "tsc-esm-fix": "target/esm/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/type-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/type-flag/-/type-flag-3.0.0.tgz", + "integrity": "sha512-3YaYwMseXCAhBB14RXW5cRQfJQlEknS6i4C8fCfeUdS3ihG9EdccdR9kt3vP73ZdeTGmPb4bZtkDn5XMIn1DLA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/type-flag?sponsor=1" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "license": "MIT" + }, + "node_modules/unicorn-magic": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", + "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/vite": { + "version": "6.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", + "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.1.1.tgz", + "integrity": "sha512-V+IxPAE2FvXpTCHXyNem0M+gWm6J7eRyWPR6vYoG/Gl+IscNOjXzztUhimQgTxaAoUoj40Qqimaa0NLIOOAH4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.4.0", + "es-module-lexer": "^1.6.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vite/node_modules/fdir": { + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/vite/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/vitest": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.1.1.tgz", + "integrity": "sha512-kiZc/IYmKICeBAZr9DQ5rT7/6bD9G7uqQEki4fxazi1jdVl2mWGzedtBs5s6llz59yQhVb7FFY2MbHzHCnT79Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "3.1.1", + "@vitest/mocker": "3.1.1", + "@vitest/pretty-format": "^3.1.1", + "@vitest/runner": "3.1.1", + "@vitest/snapshot": "3.1.1", + "@vitest/spy": "3.1.1", + "@vitest/utils": "3.1.1", + "chai": "^5.2.0", + "debug": "^4.4.0", + "expect-type": "^1.2.0", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "std-env": "^3.8.1", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinypool": "^1.0.2", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0", + "vite-node": "3.1.1", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.1.1", + "@vitest/ui": "3.1.1", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/debug": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/@vitest/mocker": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.1.1.tgz", + "integrity": "sha512-bmpJJm7Y7i9BBELlLuuM1J1Q6EQ6K5Ye4wcyOpOMXMcePYKSIYlpcrCm4l/O6ja4VJA5G2aMJiuZkZdnxlC3SA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.1.1", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.ts" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -563,37 +2594,24 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "node_modules/write-file-atomic": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", + "dev": true, "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "license": "MIT", "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" }, "engines": { - "node": ">=10" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "license": "ISC", "engines": { "node": ">=10" diff --git a/package.json b/package.json index 82d3666..f35c9eb 100644 --- a/package.json +++ b/package.json @@ -3,28 +3,52 @@ "version": "0.1.0", "description": "A lightweight library Dash Platform identities, data contracts, and documents", "main": "dashplatform.js", + "type": "module", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", + "gen-proto": "npx protoc --ts_opt optimize_code_size --ts_out src/generated/ --proto_path ../platform/packages/dapi-grpc/protos core/v0/core.proto platform/v0/platform.proto && replace-in-files --regex='import (.*?) from \"((\\.\\.?\\/)+[^.]*?)\";' --replacement='import $1 from \"$2.ts\";' './src/generated/**/*.ts'", + "test": "vitest", "jshint": "npx -p jshint@2.x -- jshint -c ./.jshintrc ./*.js", "lint": "npm run jshint && npm run tsc", "prettier": "npx -p prettier@3.x -- prettier -w '**/*.{js,md}'", "fmt": "npm run prettier", "bump": "npm version -m \"chore(release): bump to v%s\"", "tsc": "npx -p typescript@5.x -- tsc -p ./jsconfig.json", - "reexport-types": "npx -p jswt@1.x -- reexport", + "reexport-types": "npx -p jswt@2.x -- reexport", "prepublish": "npm run reexport-types" }, "keywords": [], - "author": "AJ ONeal (https://therootcompany.com/)", + "authors": [ + "AJ ONeal (https://therootcompany.com/)", + "Matt Peterson " + ], "license": "SEE LICENSE IN LICENSE", "dependencies": { - "@dashevo/dapi-grpc": "^1.1.1", - "@dashevo/wasm-dpp": "^1.1.1", "@dashincubator/secp256k1": "^1.7.1-5", + "@grpc/grpc-js": "^1.13.2", + "@noble/secp256k1": "^2.2.3", + "@protobuf-ts/grpcweb-transport": "^2.9.6", + "@protobuf-ts/runtime-rpc": "^2.9.6", + "base-x": "^5.0.1", + "base64-js": "^1.5.1", + "bloom-filter": "^0.2.0", "cbor-web": "^9.0.2", "dashhd": "^3.3.3", "dashkeys": "^1.1.5", "dashphrase": "^1.4.0", - "dashtx": "^0.20.1" + "dashtx": "^0.20.3", + "dotenv": "^16.4.7", + "eventsource-client": "^1.1.3", + "launchdarkly-eventsource": "^2.0.3", + "qrcode-svg": "^1.1.0", + "ripemd160-js": "^3.0.4" + }, + "devDependencies": { + "@protobuf-ts/plugin": "^2.9.6", + "@types/bloom-filter": "^0.2.4", + "replace-in-files-cli": "^3.0.0", + "tsc-esm-fix": "^3.1.2", + "typescript": "^5.x", + "vite": "^6.2.5", + "vitest": "^3.1.1" } } diff --git a/rust_print_encoded/Cargo.lock b/rust_print_encoded/Cargo.lock new file mode 100644 index 0000000..4d3051a --- /dev/null +++ b/rust_print_encoded/Cargo.lock @@ -0,0 +1,2669 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "serde", + "version_check", + "zerocopy 0.7.35", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" + +[[package]] +name = "anstyle-parse" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +dependencies = [ + "anstyle", + "once_cell", + "windows-sys", +] + +[[package]] +name = "anyhow" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "async-trait" +version = "0.1.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64-compat" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a8d4d2746f89841e49230dd26917df1876050f95abafafbe34f47cb534b88d7" +dependencies = [ + "byteorder", +] + +[[package]] +name = "base64ct" +version = "1.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "bincode" +version = "2.0.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f11ea1a0346b94ef188834a65c068a03aec181c94896d481d7a0a40d85b0ce95" +dependencies = [ + "bincode_derive", + "serde", +] + +[[package]] +name = "bincode_derive" +version = "2.0.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e30759b3b99a1b802a7a3aa21c85c3ded5c28e1c83170d82d70f08bbf7f3e4c" +dependencies = [ + "virtue 0.0.13", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitcoin-io" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" + +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative", +] + +[[package]] +name = "bitflags" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake3" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "675f87afced0413c9bb02843499dbbd3882a237645883f71a2b59644a6d2f753" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array 0.14.7", +] + +[[package]] +name = "blsful" +version = "3.0.0-pre8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384e5e9866cb7f830f06a6633ba998697d5a826e99e8c78376deaadd33cda7be" +dependencies = [ + "anyhow", + "blstrs_plus", + "hex", + "hkdf", + "merlin", + "pairing", + "rand", + "rand_chacha", + "rand_core", + "serde", + "serde_bare", + "sha2", + "sha3", + "subtle", + "thiserror 2.0.12", + "uint-zigzag", + "vsss-rs", + "zeroize", +] + +[[package]] +name = "blst" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62dc83a094a71d43eeadd254b1ec2d24cb6a0bb6cadce00df51f0db594711a32" +dependencies = [ + "cc", + "glob", + "threadpool", + "zeroize", +] + +[[package]] +name = "blstrs_plus" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a16dd4b0d6b4538e1fa0388843acb186363082713a8fc8416d802a04d013818" +dependencies = [ + "arrayref", + "blst", + "elliptic-curve", + "ff", + "group", + "pairing", + "rand_core", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" + +[[package]] +name = "bytecount" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cc" +version = "1.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "colorchoice" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crunchy" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array 0.14.7", + "rand_core", + "serdect", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array 0.14.7", + "typenum", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "dashcore" +version = "0.39.1" +dependencies = [ + "anyhow", + "base64-compat", + "bech32", + "bincode", + "bitflags", + "blake3", + "blsful", + "dashcore-private", + "dashcore_hashes", + "ed25519-dalek", + "hex", + "hex_lit", + "lazy_static", + "rustversion", + "secp256k1", + "serde", + "serde_repr", + "strum", + "thiserror 1.0.69", +] + +[[package]] +name = "dashcore-private" +version = "0.39.1" + +[[package]] +name = "dashcore-rpc" +version = "0.38.0" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.38.0#fcc7c2266df12a8fb4878e60d1e1b6f49990f5ed" +dependencies = [ + "dashcore-rpc-json", + "hex", + "jsonrpc", + "log", + "serde", + "serde_json", +] + +[[package]] +name = "dashcore-rpc-json" +version = "0.38.0" +source = "git+https://github.com/dashpay/rust-dashcore?tag=v0.38.0#fcc7c2266df12a8fb4878e60d1e1b6f49990f5ed" +dependencies = [ + "bincode", + "dashcore", + "hex", + "serde", + "serde_json", + "serde_repr", + "serde_with", +] + +[[package]] +name = "dashcore_hashes" +version = "0.39.1" +dependencies = [ + "bincode", + "dashcore-private", + "secp256k1", + "serde", +] + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dpp" +version = "2.0.0-dev.1" +dependencies = [ + "anyhow", + "async-trait", + "base64 0.22.1", + "bincode", + "bincode_derive", + "bs58", + "byteorder", + "chrono", + "dashcore", + "derive_more", + "env_logger", + "getrandom", + "hex", + "indexmap 2.8.0", + "integer-encoding", + "itertools", + "json-schema-compatibility-validator", + "jsonschema", + "lazy_static", + "nohash-hasher", + "num_enum", + "once_cell", + "platform-serialization", + "platform-serialization-derive", + "platform-value", + "platform-version", + "platform-versioning", + "rand", + "regex", + "serde", + "serde_json", + "serde_repr", + "sha2", + "strum", + "thiserror 1.0.69", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand_core", + "serde", + "sha2", + "subtle", + "zeroize", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array 0.14.7", + "group", + "hkdf", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "tap", + "zeroize", +] + +[[package]] +name = "elliptic-curve-tools" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48843edfbd0a370b3dd14cdbb4e446e9a8855311e6b2b57bf9a1fd1367bc317" +dependencies = [ + "elliptic-curve", + "heapless", + "hex", + "multiexp", + "serde", + "zeroize", +] + +[[package]] +name = "env_filter" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3716d7a920fb4fac5d84e9d4bce8ceb321e9414b4409da61b07b75c1e3d0697" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "jiff", + "log", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "fancy-regex" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" +dependencies = [ + "bit-set", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "bitvec", + "rand_core", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fraction" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f158e3ff0a1b334408dc9fb811cd99b446986f4d8b741bb08f9df1604085ae7" +dependencies = [ + "lazy_static", + "num", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "generic-array" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c8444bc9d71b935156cc0ccab7f622180808af7867b1daae6547d773591703" +dependencies = [ + "serde", + "typenum", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand", + "rand_core", + "rand_xorshift", + "subtle", +] + +[[package]] +name = "grovedb-version" +version = "3.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=f89e03e4e0ac12aa2feea5c94b38c09f4909facc#f89e03e4e0ac12aa2feea5c94b38c09f4909facc" +dependencies = [ + "thiserror 2.0.12", + "versioned-feature-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "half" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7db2ff139bba50379da6aa0766b52fdcb62cb5b263009b09ed58ba604e14bbd1" +dependencies = [ + "cfg-if", + "crunchy", +] + +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" + +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "hex_lit" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3011d1213f159867b13cfd6ac92d2cd5f1345762c63be3554e84092d85a50bbd" + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +dependencies = [ + "equivalent", + "hashbrown 0.15.2", + "serde", +] + +[[package]] +name = "integer-encoding" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d762194228a2f1c11063e46e32e5acb96e66e906382b9eb5441f2e0504bbd5a" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "iso8601" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5c177cff824ab21a6f41079a4c401241c4e8be14f316c4c6b07d5fca351c98d" +dependencies = [ + "nom", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "jiff" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d699bc6dfc879fb1bf9bdff0d4c56f0884fc6f0d0eb0fba397a6d00cd9a6b85e" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde", +] + +[[package]] +name = "jiff-static" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d16e75759ee0aa64c57a56acbf43916987b20c77373cb7e808979e02b93c9f9" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "json-patch" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec9ad60d674508f3ca8f380a928cfe7b096bc729c4e2dbfe3852bc45da3ab30b" +dependencies = [ + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "json-schema-compatibility-validator" +version = "2.0.0-dev.1" +dependencies = [ + "json-patch", + "once_cell", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "jsonrpc" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8128f36b47411cd3f044be8c1f5cc0c9e24d1d1bfdc45f0a57897b32513053f2" +dependencies = [ + "base64 0.13.1", + "serde", + "serde_json", +] + +[[package]] +name = "jsonschema" +version = "0.18.0" +source = "git+https://github.com/dashpay/jsonschema-rs?branch=configure_regexp#7b00a2442ce44772e278b468bc4c2adc5e252226" +dependencies = [ + "ahash", + "anyhow", + "base64 0.22.1", + "bytecount", + "fancy-regex", + "fraction", + "getrandom", + "iso8601", + "itoa", + "memchr", + "num-cmp", + "once_cell", + "parking_lot", + "percent-encoding", + "regex", + "serde", + "serde_json", + "time", + "url", + "uuid", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.171" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" + +[[package]] +name = "litemap" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core", + "zeroize", +] + +[[package]] +name = "multiexp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a383da1ae933078ddb1e4141f1dd617b512b4183779d6977e6451b0e644806" +dependencies = [ + "ff", + "group", + "rustversion", + "std-shims", + "zeroize", +] + +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", + "rand", + "serde", +] + +[[package]] +name = "num-cmp" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63335b2e2c34fae2fb0aa2cecfd9f0832a1e24b3b32ecec612c3426d46dc8aaa" + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", + "rand", + "serde", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", + "serde", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "once_cell" +version = "1.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" + +[[package]] +name = "pairing" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" +dependencies = [ + "group", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "platform-serialization" +version = "2.0.0-dev.1" +dependencies = [ + "bincode", + "platform-version", +] + +[[package]] +name = "platform-serialization-derive" +version = "2.0.0-dev.1" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "virtue 0.0.17", +] + +[[package]] +name = "platform-value" +version = "2.0.0-dev.1" +dependencies = [ + "base64 0.22.1", + "bincode", + "bs58", + "ciborium", + "hex", + "indexmap 2.8.0", + "platform-serialization", + "platform-version", + "rand", + "serde", + "serde_json", + "thiserror 1.0.69", + "treediff", +] + +[[package]] +name = "platform-version" +version = "2.0.0-dev.1" +dependencies = [ + "bincode", + "grovedb-version", + "once_cell", + "thiserror 1.0.69", + "versioned-feature-core 1.0.0 (git+https://github.com/dashpay/versioned-feature-core)", +] + +[[package]] +name = "platform-versioning" +version = "2.0.0-dev.1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "portable-atomic" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy 0.8.23", +] + +[[package]] +name = "proc-macro-crate" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "redox_syscall" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rust_print_encoded" +version = "0.1.0" +dependencies = [ + "dashcore", + "dpp", + "simple-signer", +] + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustversion" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array 0.14.7", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes", + "rand", + "secp256k1-sys", + "serde", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" +dependencies = [ + "cc", +] + +[[package]] +name = "semver" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bare" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51c55386eed0f1ae957b091dc2ca8122f287b60c79c774cbe3d5f2b69fded660" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "indexmap 2.8.0", + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_with" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +dependencies = [ + "base64 0.13.1", + "chrono", + "hex", + "indexmap 1.9.3", + "serde", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest", + "keccak", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "rand_core", +] + +[[package]] +name = "simple-signer" +version = "2.0.0-dev.1" +dependencies = [ + "base64 0.22.1", + "bincode", + "dashcore-rpc", + "dpp", +] + +[[package]] +name = "smallvec" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "std-shims" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90e49360f31b0b75a6a82a5205c6103ea07a79a60808d44f5cc879d303337926" +dependencies = [ + "hashbrown 0.14.5", + "spin", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + +[[package]] +name = "time" +version = "0.3.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d9c75b47bdff86fa3334a3db91356b8d7d86a9b839dab7d0bdc5c3d3a077618" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" + +[[package]] +name = "time-macros" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29aa485584182073ed57fd5004aa09c371f021325014694e432313345865fd04" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" + +[[package]] +name = "toml_edit" +version = "0.22.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +dependencies = [ + "indexmap 2.8.0", + "toml_datetime", + "winnow", +] + +[[package]] +name = "treediff" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2ce481b2b7c2534fe7b5242cccebf37f9084392665c6a3783c414a1bada5432" + +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" + +[[package]] +name = "uint-zigzag" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abbf77aed65cb885a8ba07138c365879be3d9a93dce82bf6cc50feca9138ec15" +dependencies = [ + "core2", +] + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "uuid" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "versioned-feature-core" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "898c0ad500fdb1914df465a2c729fce33646ef65dfbbbd16a6d8050e0d2404df" + +[[package]] +name = "versioned-feature-core" +version = "1.0.0" +source = "git+https://github.com/dashpay/versioned-feature-core#560157096c8405a46ce0f21a2e7e1bd11d6625b4" + +[[package]] +name = "virtue" +version = "0.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dcc60c0624df774c82a0ef104151231d37da4962957d691c011c852b2473314" + +[[package]] +name = "virtue" +version = "0.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7302ac74a033bf17b6e609ceec0f891ca9200d502d31f02dc7908d3d98767c9d" + +[[package]] +name = "vsss-rs" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fec4ebcc5594130c31b49594d55c0583fe80621f252f570b222ca4845cafd3cf" +dependencies = [ + "crypto-bigint", + "elliptic-curve", + "elliptic-curve-tools", + "generic-array 1.2.0", + "hex", + "num", + "rand_core", + "serde", + "sha3", + "subtle", + "zeroize", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-link" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" +dependencies = [ + "memchr", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6" +dependencies = [ + "zerocopy-derive 0.8.23", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/rust_print_encoded/Cargo.toml b/rust_print_encoded/Cargo.toml new file mode 100644 index 0000000..04081c8 --- /dev/null +++ b/rust_print_encoded/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "rust_print_encoded" +version = "0.1.0" +edition = "2024" + +[dependencies] +dpp = { version = "2.0.0-dev.1", path = "../../platform/packages/rs-dpp", features = ["state-transition-value-conversion", "state-transition-json-conversion"] } +simple-signer = { version = "2.0.0-dev.1", path = "../../platform/packages/simple-signer" } +dashcore = { git = "https://github.com/dashpay/rust-dashcore", features = [] } + +[patch.'https://github.com/dashpay/rust-dashcore'] +dashcore = { path = "../../rust-dashcore/dash" } diff --git a/rust_print_encoded/src/main.rs b/rust_print_encoded/src/main.rs new file mode 100644 index 0000000..ac78389 --- /dev/null +++ b/rust_print_encoded/src/main.rs @@ -0,0 +1,540 @@ +use std::{ + collections::{BTreeMap, BTreeSet}, + num::ParseIntError, + str::FromStr, +}; + +use dashcore::{ + PubkeyHash, PublicKey, Script, ScriptBuf, TxIn, TxOut, Witness, + consensus::{Decodable, Encodable}, + transaction::special_transaction::{TransactionPayload, asset_lock::AssetLockPayload}, +}; +use dpp::{ + bincode, + dashcore::{ + BlockHash, InstantLock, OutPoint, Transaction, Txid, + bls_sig_utils::BLSSignature, + hashes::{Hash, hex::FromHex, sha256d}, + }, + data_contract::{ + TokenConfiguration, + associated_token::{ + token_configuration::v0::TokenConfigurationV0, + token_configuration_convention::{ + TokenConfigurationConvention, v0::TokenConfigurationConventionV0, + }, + token_configuration_localization::{ + TokenConfigurationLocalization, v0::TokenConfigurationLocalizationV0, + }, + token_distribution_rules::{TokenDistributionRules, v0::TokenDistributionRulesV0}, + token_keeps_history_rules::{TokenKeepsHistoryRules, v0::TokenKeepsHistoryRulesV0}, + token_perpetual_distribution::{ + TokenPerpetualDistribution, distribution_function::DistributionFunction, + distribution_recipient::TokenDistributionRecipient, + reward_distribution_type::RewardDistributionType, v0::TokenPerpetualDistributionV0, + }, + token_pre_programmed_distribution::{ + TokenPreProgrammedDistribution, v0::TokenPreProgrammedDistributionV0, + }, + }, + change_control_rules::{ + ChangeControlRules, authorized_action_takers::AuthorizedActionTakers, + v0::ChangeControlRulesV0, + }, + config::{DataContractConfig, v0::DataContractConfigV0, v1::DataContractConfigV1}, + document_type::{DocumentType, v1::DocumentTypeV1}, + group::{Group, v0::GroupV0}, + v1::DataContractV1, + }, + identity::{ + KeyID, KeyType, PartialIdentity, Purpose, SecurityLevel, + core_script::CoreScript, + identity_public_key::v0::IdentityPublicKeyV0, + state_transition::asset_lock_proof::{InstantAssetLockProof, chain::ChainAssetLockProof}, + }, + platform_value::{BinaryData, Value, string_encoding::Encoding}, + prelude::{AssetLockProof, DataContract, Identifier, IdentityPublicKey}, + serialization::{PlatformSerializable, PlatformSerializableWithPlatformVersion, Signable}, + state_transition::{ + JsonStateTransitionSerializationOptions, StateTransition, StateTransitionJsonConvert, + StateTransitionValueConvert, + data_contract_create_transition::{ + DataContractCreateTransition, DataContractCreateTransitionV0, + methods::DataContractCreateTransitionMethodsV0, + }, + identity_create_transition::{IdentityCreateTransition, v0::IdentityCreateTransitionV0}, + }, + version::{PlatformVersion, TryIntoPlatformVersioned}, +}; +use simple_signer::signer::SimpleSigner; + +fn main() { + let platform_version = PlatformVersion::get(9).unwrap(); + let config = DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: true, + readonly: false, + keeps_history: true, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }); + + let owner_id = Identifier::new([5; 32]); + + let data_contract_v1 = DataContractV1 { + id: Identifier::new([1; 32]), + version: 2, + owner_id, + document_types: BTreeMap::from([( + "asdf".to_string(), + DocumentType::try_from_schema( + Identifier::new([1; 32]), + "valid_name-a-b-123", + Value::Map(vec![ + ( + Value::Text("type".to_string()), + Value::Text("object".to_string()), + ), + ( + Value::Text("properties".to_string()), + Value::Map(vec![( + Value::Text("test".to_string()), + Value::Map(vec![ + ( + Value::Text("type".to_string()), + Value::Text("string".to_string()), + ), + (Value::Text("position".to_string()), Value::U32(0)), + ]), + )]), + ), + ( + Value::Text("additionalProperties".to_string()), + Value::Bool(false), + ), + ]), + None, + &config, + true, + &mut vec![], + platform_version, + ) + .unwrap(), + )]), + config, + schema_defs: Some(BTreeMap::from([])), + created_at: Some(100000), + updated_at: Some(100001), + created_at_block_height: Some(100002), + updated_at_block_height: Some(100003), + created_at_epoch: Some(10004), + updated_at_epoch: Some(10005), + groups: BTreeMap::from([( + 12, + Group::V0(GroupV0 { + members: BTreeMap::from([(Identifier::new([15; 32]), 1)]), + required_power: 1, + }), + )]), + tokens: BTreeMap::from([( + 0, + TokenConfiguration::V0(TokenConfigurationV0 { + conventions: TokenConfigurationConvention::V0(TokenConfigurationConventionV0 { + localizations: BTreeMap::from([( + "US".to_string(), + TokenConfigurationLocalization::V0(TokenConfigurationLocalizationV0 { + should_capitalize: true, + singular_form: "x".to_string(), + plural_form: "xs".to_string(), + }), + )]), + decimals: 2, + }), + conventions_change_rules: ChangeControlRules::V0(ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::MainGroup, + admin_action_takers: AuthorizedActionTakers::ContractOwner, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: true, + }), + base_supply: 12345678901234567890, + max_supply: Some(18446744073709551615), + keeps_history: TokenKeepsHistoryRules::V0(TokenKeepsHistoryRulesV0 { + keeps_transfer_history: false, + keeps_freezing_history: false, + keeps_minting_history: true, + keeps_burning_history: true, + }), + start_as_paused: false, + max_supply_change_rules: ChangeControlRules::V0(ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::MainGroup, + admin_action_takers: AuthorizedActionTakers::ContractOwner, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: true, + }), + distribution_rules: TokenDistributionRules::V0(TokenDistributionRulesV0 { + perpetual_distribution: Some(TokenPerpetualDistribution::V0( + TokenPerpetualDistributionV0 { + distribution_type: RewardDistributionType::EpochBasedDistribution { + interval: 16, + function: DistributionFunction::InvertedLogarithmic { + a: 1, + d: 2, + m: 3, + n: 4, + o: 5, + start_moment: Some(1235678), + b: 0, + min_value: None, + max_value: Some(112233445566), + }, + }, + distribution_recipient: + TokenDistributionRecipient::EvonodesByParticipation, + }, + )), + perpetual_distribution_rules: ChangeControlRules::V0(ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::MainGroup, + admin_action_takers: AuthorizedActionTakers::ContractOwner, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: true, + }), + pre_programmed_distribution: Some(TokenPreProgrammedDistribution::V0( + TokenPreProgrammedDistributionV0 { + distributions: BTreeMap::from([]), + }, + )), + new_tokens_destination_identity: Some(Identifier::new([18; 32])), + new_tokens_destination_identity_rules: ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::MainGroup, + admin_action_takers: AuthorizedActionTakers::ContractOwner, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: true, + }, + ), + minting_allow_choosing_destination: true, + minting_allow_choosing_destination_rules: ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::MainGroup, + admin_action_takers: AuthorizedActionTakers::ContractOwner, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: true, + }, + ), + }), + manual_minting_rules: ChangeControlRules::V0(ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::MainGroup, + admin_action_takers: AuthorizedActionTakers::ContractOwner, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: true, + }), + manual_burning_rules: ChangeControlRules::V0(ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::MainGroup, + admin_action_takers: AuthorizedActionTakers::ContractOwner, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: true, + }), + freeze_rules: ChangeControlRules::V0(ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::MainGroup, + admin_action_takers: AuthorizedActionTakers::ContractOwner, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: true, + }), + unfreeze_rules: ChangeControlRules::V0(ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::MainGroup, + admin_action_takers: AuthorizedActionTakers::ContractOwner, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: true, + }), + destroy_frozen_funds_rules: ChangeControlRules::V0(ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::MainGroup, + admin_action_takers: AuthorizedActionTakers::ContractOwner, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: true, + }), + emergency_action_rules: ChangeControlRules::V0(ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::MainGroup, + admin_action_takers: AuthorizedActionTakers::ContractOwner, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: true, + }), + main_control_group: Some(2), + main_control_group_can_be_modified: AuthorizedActionTakers::NoOne, + }), + )]), + }; + + let data_contract_create = DataContractCreateTransition::V0(DataContractCreateTransitionV0 { + data_contract: data_contract_v1 + .clone() + .try_into_platform_versioned(&platform_version) + .unwrap(), + identity_nonce: 83838, + user_fee_increase: 0, + signature_public_key_id: 0, + signature: BinaryData::new(vec![42; 32]), + }); + + let data_contract_create_bytes = data_contract_create.serialize_to_bytes().unwrap(); + println!( + "data_contract_create_bytes: {}", + to_hex(&data_contract_create_bytes) + ); + + let data_contract_create_signable_bytes = data_contract_create.signable_bytes().unwrap(); + println!( + "data_contract_create_signable_bytes: {}", + to_hex(&data_contract_create_signable_bytes) + ); + + let value = data_contract_create + .to_json(JsonStateTransitionSerializationOptions { + skip_signature: false, + into_validating_json: true, + }) + .unwrap(); + println!("data_contract_create JSON: {}", value.to_string()); + + let identity_public_key = IdentityPublicKey::V0(IdentityPublicKeyV0 { + id: 0, + purpose: Purpose::AUTHENTICATION, + security_level: SecurityLevel::CRITICAL, + contract_bounds: None, + key_type: KeyType::ECDSA_SECP256K1, + read_only: true, + data: BinaryData::from_string( + "033a9a8b1e4c581a1987724c6697135d31c07ee7ac827e6a59cec022b04d51055f", + Encoding::Hex, + ) + .unwrap(), + disabled_at: None, + }); + + let mut signer = SimpleSigner::default(); + signer.add_key( + identity_public_key.clone(), + BinaryData::from_string( + "6c554775029f960891e3edf2d36b26a30d9a4b10034bb49f3a6c4617f557f7bc", + Encoding::Hex, + ) + .unwrap() + .0 + .try_into() + .unwrap(), + ); + + let identity = PartialIdentity { + id: owner_id, + loaded_public_keys: BTreeMap::from([(0, identity_public_key)]), + balance: None, + revision: None, + not_found_public_keys: BTreeSet::new(), + }; + + let state_transition = DataContractCreateTransition::new_from_data_contract( + DataContract::V1(data_contract_v1), + 83838, + &identity, + 0, + &signer, + platform_version, + None, + ) + .unwrap(); + + let state_transition_bytes = state_transition.serialize_to_bytes().unwrap(); + println!( + "state_transition_bytes bytes: {}", + to_hex(&state_transition_bytes) + ); + + let signable_bytes = state_transition.signable_bytes().unwrap(); + println!( + "state_transition signable_bytes: {}", + to_hex(&signable_bytes) + ); + + let hash_bytes = [ + 1u8, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, + ]; + let txid = Txid::from_raw_hash(sha256d::Hash::from_byte_array(hash_bytes)); + + let op = OutPoint::new(txid, 12345); + println!("OutPoint to_string: {}", op.to_string()); + let op_bytes: Vec = + bincode::serde::encode_to_vec(op, bincode::config::standard().with_big_endian()).unwrap(); //op.try_into().unwrap(); + println!("OutPoint bincode: {}", to_hex(&op_bytes)); + + let idc_chain = IdentityCreateTransition::V0(IdentityCreateTransitionV0 { + public_keys: Vec::new(), + asset_lock_proof: AssetLockProof::Chain(ChainAssetLockProof { + core_chain_locked_height: 1234567, + out_point: op, + }), + user_fee_increase: 0x42, + signature: BinaryData::new(Vec::new()), + identity_id: Identifier::new([0x12; 32]), + }); + + println!( + "IdentityCreate with AssetLockProof.Chain: {}", + to_hex( + &StateTransition::IdentityCreate(idc_chain) + .serialize_to_bytes() + .unwrap() + ) + ); + + let idc_instant = IdentityCreateTransition::V0(IdentityCreateTransitionV0 { + public_keys: Vec::new(), + asset_lock_proof: AssetLockProof::Instant(InstantAssetLockProof { + instant_lock: InstantLock { + version: 0, + inputs: Vec::new(), + txid, + cyclehash: BlockHash::from_raw_hash(sha256d::Hash::from_byte_array([0x12; 32])), + signature: BLSSignature::from_byte_iter([0x48u8; 96].into_iter().map(Ok)).unwrap(), + }, + transaction: Transaction { + version: 2, + lock_time: 0, + input: Vec::new(), + output: Vec::new(), + special_transaction_payload: None, + }, + output_index: 0, + }), + user_fee_increase: 0x42, + signature: BinaryData::new(Vec::new()), + identity_id: Identifier::new([0x12; 32]), + }); + + println!( + "IdentityCreate with AssetLockProof.Instant: {}", + to_hex( + &StateTransition::IdentityCreate(idc_instant) + .serialize_to_bytes() + .unwrap() + ) + ); + + let pubkeyhash = + PublicKey::from_str("02b1f2f08d44538b32938a0ad232c8217f8a328e0df115067ee6e5f48c50286c49") + .unwrap() + .pubkey_hash(); + + let asset_lock_payload = AssetLockPayload { + version: 1, + credit_outputs: vec![TxOut { + value: 100000000, + script_pubkey: ScriptBuf::new_p2pkh(&pubkeyhash), + }], + }; + + let tx = Transaction { + version: 3, + lock_time: 0, + input: vec![TxIn { + previous_output: OutPoint { + txid: Txid::from_hex( + "10dfb70f669d7c067001ffae6f03edb7d6ed04476dbd9b02ff372c698815f4de", + ) + .unwrap(), + vout: 0, + }, + script_sig: ScriptBuf::from_hex("").unwrap(), + sequence: 0, + witness: Witness::default(), + }], + output: vec![TxOut { + value: 100000000, + script_pubkey: ScriptBuf::new_op_return(&[]), + }], + special_transaction_payload: Some(TransactionPayload::AssetLockPayloadType( + asset_lock_payload.clone(), + )), + }; + { + let mut encoded = Vec::new(); + pubkeyhash.consensus_encode(&mut encoded).unwrap(); + println!("encoded pubkeyhash: {}", to_hex(&encoded)); + } + { + let mut encoded = Vec::new(); + tx.input.consensus_encode(&mut encoded).unwrap(); + println!("encoded tx inputs: {}", to_hex(&encoded)); + } + { + let mut encoded = Vec::new(); + tx.output.consensus_encode(&mut encoded).unwrap(); + println!("encoded tx outputs: {}", to_hex(&encoded)); + } + { + let mut encoded = Vec::new(); + tx.special_transaction_payload + .as_ref() + .unwrap() + .consensus_encode(&mut encoded) + .unwrap(); + + let mut encoded_again = Vec::new(); + encoded.consensus_encode(&mut encoded_again).unwrap(); + println!("encoded tx payload: {}", to_hex(&encoded_again)); + } + let mut tx_encoded = Vec::new(); + tx.consensus_encode(&mut tx_encoded).unwrap(); + println!("encoded tx: {}", to_hex(&tx_encoded)); + + /* + encoded pubkeyhash: 82ca6828fa0341ad712ee5fda71daf9ec67e430a + encoded tx inputs: 01def41588692c37ff029bbd6d4704edd6b7ed036faeff0170067c9d660fb7df10000000000000000000 + encoded tx outputs: 0100e1f50500000000026a00 + encoded tx payload: 24010100e1f505000000001976a91482ca6828fa0341ad712ee5fda71daf9ec67e430a88ac + encoded tx: 0300080001def41588692c37ff029bbd6d4704edd6b7ed036faeff0170067c9d660fb7df100000000000000000000100e1f50500000000026a000000000024010100e1f505000000001976a91482ca6828fa0341ad712ee5fda71daf9ec67e430a88ac + */ + + /* + assetInfo.publicKey 02b1f2f08d44538b32938a0ad232c8217f8a328e0df115067ee6e5f48c50286c49 + pubkeyhash 82ca6828fa0341ad712ee5fda71daf9ec67e430a + p2pkh script 76a91482ca6828fa0341ad712ee5fda71daf9ec67e430a88ac + assetLockScript 010100e1f505000000001976a91482ca6828fa0341ad712ee5fda71daf9ec67e430a88ac + assetLockPayloadBytes 0101fc05f5e1001976a91482ca6828fa0341ad712ee5fda71daf9ec67e430a88ac + + Transaction Proof Hex: + 0300080001def41588692c37ff029bbd6d4704edd6b7ed036faeff0170067c9d660fb7df100000000000000000000100e1f50500000000026a0000000000210101fc05f5e1001976a91482ca6828fa0341ad712ee5fda71daf9ec67e430a88ac + */ + + let signed_tx_bytes = from_hex( + "0300080001def41588692c37ff029bbd6d4704edd6b7ed036faeff0170067c9d660fb7df10000000006b483045022100c29115f386139b54a8786c2ca2585841b7c88daebab6898943354de2c3164bc00220447285ba52077cf67f711a4c9f9f27230e943ea71ad004adbba9abe6d35fc4cb8121034b5d935eca4909b986637dc655422b255c803817124b16b5159577cc12474572ffffffff0100e1f50500000000026a00000000002e0101fc05f5e1002676a92102b1f2f08d44538b32938a0ad232c8217f8a328e0df115067ee6e5f48c50286c4988ac" + ).unwrap(); + + let mut cursor = std::io::Cursor::new(&signed_tx_bytes); + let tx = Transaction::consensus_decode(&mut cursor).unwrap(); + + println!("tx: {:#?}", tx); +} + +fn to_hex(bytes: &[u8]) -> String { + bytes.iter().map(|b| format!("{:02x}", b)).collect() +} + +fn from_hex(s: &str) -> Result, ParseIntError> { + (0..s.len()) + .step_by(2) + .map(|i| u8::from_str_radix(&s[i..i + 2], 16)) + .collect() +} diff --git a/src/_qr.js b/src/_qr.js new file mode 100644 index 0000000..981032f --- /dev/null +++ b/src/_qr.js @@ -0,0 +1,156 @@ +"use strict"; + +import QrCode from "qrcode-svg"; + +/** + * @typedef QrOpts + * @property {String} [background] + * @property {String} [color] + * @property {String} [ecl] + * @property {Number} [height] + * @property {Number} [indent] + * @property {Number} [padding] + * @property {"full" | "mini" | "micro"} [size] + * @property {Number} [width] + */ + +/** + * @param {String} data + * @param {QrOpts} opts + */ +function _create(data, opts) { + //@ts-ignore + return new QrCode({ + content: data, + padding: opts?.padding || 4, + width: opts?.width || 256, + height: opts?.height || 256, + color: opts?.color || "#000000", + background: opts?.background || "#ffffff", + ecl: opts?.ecl || "M", + }); +}; + +/** + * @typedef {Object.} BlockMap + */ + +/** + * Encoded as top-left, top-right, bottom-left, bottom-right + * @type {Object.<"mini" | "micro", BlockMap>} + */ +let charMaps = { + micro: { + 0b0000: " ", + 0b0001: "▗", + 0b0010: "▖", + 0b0011: "▄", + 0b0100: "▝", + 0b0101: "▐", + 0b0110: "▞", + 0b0111: "▟", + 0b1000: "▘", + 0b1001: "▚", + 0b1010: "▌", + 0b1011: "▙", + 0b1100: "▀", + 0b1101: "▜", + 0b1110: "▛", + 0b1111: "█", + }, + mini: { + 0b0000: " ", + 0b0001: " ▄", + 0b0010: "▄ ", + 0b0011: "▄▄", + 0b0100: " ▀", + 0b0101: " █", + 0b0110: "▄▀", + 0b0111: "▄█", + 0b1000: "▀ ", + 0b1001: "▀▄", + 0b1010: "█ ", + 0b1011: "█▄", + 0b1100: "▀▀", + 0b1101: "▀█", + 0b1110: "█▀", + 0b1111: "██", + }, +}; + +/** + * @param {String} data + * @param {QrOpts} opts + */ +export function quadAscii(data, opts) { + let charMap = charMaps[opts.size || "mini"]; + let qrcode = _create(data, opts); + let indent = opts?.indent ?? 4; + let modules = qrcode.qrcode.modules; + + let lines = []; + let length = modules.length; + for (let y = 0; y < length; y += 2) { + let line = ``.padStart(indent, " "); + for (let x = 0; x < length; x += 2) { + let count = 0; + // qr codes can be odd numbers + if (x >= length) { + line += charMap[count]; + continue; + } + if (modules[x][y]) { + count += 8; + } + if (modules[x][y + 1]) { + count += 2; + } + + if (x + 1 >= length) { + line += charMap[count]; + continue; + } + if (modules[x + 1][y]) { + count += 4; + } + if (modules[x + 1][y + 1]) { + count += 1; + } + line += charMap[count]; + } + lines.push(line); + } + return lines.join("\n"); +}; + +/** + * @param {String} data + * @param {QrOpts} opts + */ +export function ascii(data, opts) { + if (!opts.size) { + opts.size = "mini"; + } + if (["mini", "micro"].includes(opts.size)) { + return quadAscii(data, opts); + } + + let qrcode = _create(data, opts); + let indent = opts?.indent ?? 4; + let modules = qrcode.qrcode.modules; + + let lines = []; + let length = modules.length; + for (let y = 0; y < length; y += 1) { + let line = ``.padStart(indent, " "); + for (let x = 0; x < length; x += 1) { + let block = " "; + if (modules[x][y]) { + block = "██"; + } + line += block; + } + lines.push(line); + } + return lines.join("\n"); +}; diff --git a/src/asset_lock.ts b/src/asset_lock.ts new file mode 100644 index 0000000..e108cf8 --- /dev/null +++ b/src/asset_lock.ts @@ -0,0 +1,747 @@ +import DashHd from "dashhd" +import type { HDWallet, HDKey, HDToAddressOpts } from "dashhd" +import * as DashHdUtils from "./dashhd-utils.ts" +import * as DashBincode from "../1.8.1/generated_bincode.js" +import DashKeys from "dashkeys" +import type { VERSION_PRIVATE, HexString, VERSION } from "dashkeys" +import * as DashTx from "dashtx" +import * as DashPlatform from "./dashplatform.js" +import * as KeyUtils from "./key-utils.js" +import { L1_VERSION_PLATFORM, RPC_AUTH_URL, TYPE_ASSET_LOCK, VERSION_ASSET_LOCK, VERSIONS_TESTNET, ZMQ_AUTH_URL } from "./constants.ts" +import { promptQr } from "./cli.ts" +import { TRPC } from "./rpc.ts" +import type { AddressDelta, AddressMempoolDelta } from "./rpc.ts" +import { createEventSource } from "eventsource-client" +import { base58 } from "./util/base58.ts" + +export async function deriveAllCreateIdentityKeys( + hdOpts: { version?: VERSION }, + walletKey: HDWallet, + identityIndex: number +) { + const regFundAddressPath = DashHdUtils.makeHDKeyPath( + DashHdUtils.CoinType.Testnet, + DashHdUtils.Feature.Identity, + DashHdUtils.SubFeature.Reg, + identityIndex + ) + const regFundKey = await DashHd.derivePath(walletKey, regFundAddressPath) + + // TODO: Should we be using Topup for the change key? + const changeAddressPath = //`m/9'/${COIN_TYPE}'/5'/2'/0` + DashHdUtils.makeHDKeyPath( + DashHdUtils.CoinType.Testnet, + DashHdUtils.Feature.Identity, + DashHdUtils.SubFeature.Topup, + identityIndex + ) + const changeKey = await DashHd.derivePath( + walletKey, + changeAddressPath, + ) + + const assetKey = await DashHd.deriveChild(regFundKey, 0, DashHd.HARDENED) + // const assetWif = await DashHd.toWif(assetKey.privateKey!, hdOpts) + // const assetInfo = await wifToInfo(assetWif, "testnet") + + const authWallet = await DashHd.derivePath( + walletKey, + DashHdUtils.makeIdentityAuthPath( + DashHdUtils.CoinType.Testnet, + DashHdUtils.KeyType.ECDSA, + identityIndex, + ), + ) + const masterKey = await DashHd.deriveChild(authWallet, 0, true) + const otherKey = await DashHd.deriveChild(authWallet, 1, true) + + return { + regFundKey, + changeKey, + assetKey, + + masterKey, + otherKey, + } +} + +/** + * @param regFundKey Source funds for the asset lock are here + * @param changeKey Any leftover change from the lock transaction will go here + * @param assetInfo This is the asset key that will be "locked" + */ +export async function createPlatformAssetLock( + hdOpts: HDToAddressOpts, + regFundKey: HDKey, + changeKey: HDKey, + assetKey: HDKey, + // node: NodeConnection, + rpc: TRPC, +): Promise<{ + txidHex: string, + identityId: Uint8Array, + assetLockProof: any // DashBincode.AssetLockProof +}> { + const dashTx = DashTx.create(KeyUtils) + + if (!regFundKey.privateKey) { + throw new Error("'regFundKey' is missing 'privateKey'") + } + + const transferSats = 100000000 + const feeSats = 500 // enough for 1 input and 2 outputs + extrapayload + const totalSats = transferSats + feeSats + + const fundingWif = await DashHd.toWif(regFundKey.privateKey, hdOpts) + const fundingInfo = await wifToInfo(fundingWif, "testnet") + const fundingAddr = await DashHd.toAddr(regFundKey.publicKey, { version: 'testnet' }) + { + const [fundingDeltas, memDeltas] = await Promise.all([ + rpc.getAddressDeltas({ addresses: [fundingAddr] }), + rpc.getAddressMempool({ addresses: [fundingAddr] }), + ]); + console.log('deltas', fundingDeltas, memDeltas); + // let totalUses = fundingDeltas.length + memDeltas.length + // if (totalUses >= 2) { + // // TODO: Check for asset lock transactions that don't have an identity from them yet + // // getTransactionJson() + + // throw new Error(`funding key has been used 2+ times`) + // } + + for (const delta of (fundingDeltas as (AddressMempoolDelta | AddressDelta)[]).concat(memDeltas)) { + if (delta.satoshis <= -transferSats) { + // this might be an asset lock transaction + const tx = await rpc.getRawTransaction({ txid: delta.txid, verbose: true }) + console.log('tx', tx) + console.log('tx.vout', tx.vout) + // const guessTxId = await DashTx.doubleSha256(fromHex(tx.hex)); + // console.log('guessTxId?', toHex(guessTxId)) + if (tx.assetLockTx) { + console.log('assetLockTx', tx.assetLockTx) + + const assetLockOutIndex = (tx.vout as any[]).findIndex(o => o?.scriptPubKey?.hex === '6a00') + if (assetLockOutIndex !== -1) { + + const identityId = await createIdentityId(DashTx.utils.reverseHex(delta.txid), assetLockOutIndex); + console.log('identityId', base58.encode(identityId)); + } else { + console.log('assetLockOutIndex', assetLockOutIndex); + } + } + } + } + } + + KeyUtils.set(fundingAddr, { + address: fundingAddr, + privateKey: regFundKey.privateKey, + publicKey: regFundKey.publicKey, + pubKeyHash: fundingInfo.pubKeyHashHex, + }) + + if (!changeKey.privateKey) { + throw new Error("'topupKey' is missing 'privateKey'") + } + let changeWif = await DashHd.toWif(changeKey.privateKey, hdOpts) + let changeInfo = await wifToInfo(changeWif, "testnet") + + let fundingUtxos = await TODOgetUtxos(rpc, [fundingAddr]) + for (let utxo of fundingUtxos) { + utxo.squence = "00000000" // ?? + } + + // TODO list transactions from funding address and check for + // - check the funding address for transactions + const fundingTotal = DashTx.sum(fundingUtxos) + console.log() + console.log(`funding utxos (${fundingTotal})`) + console.log(fundingUtxos) + + const changeSats = fundingTotal - totalSats + + const burnOutput = { memo: "", satoshis: transferSats } + + const outputs: Array = [burnOutput] + if (changeSats >= 10000) { + // If there's enough change left over to bother with... + outputs.push({ + satoshis: changeSats, + pubKeyHash: changeInfo.pubKeyHashHex, + }) + } else if (changeSats < 250) { + // If there's not enough change leftover... + + let needSats = 250 - changeSats + promptQr(fundingInfo.address, needSats) + throw new Error("need funds"); + } + + // Comes from new_p2pkh + // TODO: hash160?! + let pubkeyhash = await KeyUtils.pubkeyHash(assetKey.publicKey) + // let script = Scripts.makeP2PKH(pubkeyhash) + // console.log('assetInfo.publicKey', toHex(assetInfo.publicKey)); + // console.log('pubkeyhash', toHex(pubkeyhash)); + // console.log('p2pkh script', toHex(script)); + // let assetLockPayload = DashBincode.AssetLockPayload({ + // version: VERSION_ASSET_LOCK, + // credit_outputs: [DashBincode.TxOut({ + // value: BigInt(transferSats), + // script_pubkey: DashBincode.ScriptBuf(script), + // })] + // }) + // let assetLockPayloadBytes = Bincode.encode(DashBincode.AssetLockPayload, assetLockPayload); + // let assetLockPayloadHex = DashTx.utils.bytesToHex(new Uint8Array(assetLockPayloadBytes)); + + /** @type {DashTx.TxOutput} */ + let assetExtraOutput: DashTx.TxOutput = { + satoshis: transferSats, + pubKeyHash: DashTx.utils.bytesToHex(pubkeyhash), + } + let assetLockScript = DashPlatform.packAssetLock({ + version: VERSION_ASSET_LOCK, + creditOutputs: [assetExtraOutput], + }) + + let txDraft = { + version: L1_VERSION_PLATFORM, + type: TYPE_ASSET_LOCK, + inputs: fundingUtxos, + outputs: outputs, // burnOutput, changeOutput + extraPayload: assetLockScript, + } + console.log() + console.log(`Transaction Draft:`) + console.log(txDraft) + + // to guarantee order + // txDraft.inputs.sort(DashTx.sortInputs); + // txDraft.outputs.sort(DashTx.sortOutputs); + const vout = txDraft.outputs.indexOf(burnOutput) + + console.log(`DEBUG fundingInfo`, fundingInfo) + + console.log() + const txProof = DashTx.createRaw(txDraft) + // // @ts-expect-error - TxInputRaw is returned, transform to TxInputForSig? + // txProof.inputs[0].script = DashTx.utils.bytesToHex(new Uint8Array([OP.OP_RETURN])); //`76a914${fundingInfo.pubKeyHashHex}88ac`; + txProof.inputs[0].sequence = "00000000" // Non-final DashTx.NON_FINAL = "00000000" + console.log(`Transaction Proof:`) + console.log(txProof) + + // console.log() + // const txProofHex = DashTx.serialize(txProof, null) + + console.log() + const txSigned = await dashTx.hashAndSignAll(txDraft) + console.log(txSigned.transaction) + + console.log() + console.log(`Funding Outpoint Info (BE, internal)`) + const outpoint = await getFundingOutPoint(txSigned.transaction, vout) + console.log(outpoint) + + const expectingTxid = DashTx.utils.reverseHex(outpoint.txid); + console.log("DEBUG expecting txid", expectingTxid) + + const txidHex = await rpc.sendRawTransaction({ + hexstring: txSigned.transaction, + }) + console.log("DEBUG send result (txidHex) (LE, for RPC)", txidHex) + if (!txidHex) { + throw new Error("sendRawTransaction did not return a transaction id"); + } + + let assetLockProof: DashBincode.AssetLockProof + { + // TODO: These are commented out to help debugging the ChainProof version + const assetInstantEvent = startEventSource( + ZMQ_AUTH_URL, + "rawtxlocksig", + createCheckDataIsProof(txSigned), + ) + const assetChainPoll = pollAssetLockChainProof(txidHex) + assetLockProof = await Promise.race([ + assetInstantEvent.promise, + assetChainPoll.promise, + ]) + console.error('assetLockProof', assetLockProof) + assetInstantEvent.source.close() + assetChainPoll.source.close() + } + if (!assetLockProof) { + console.error('failed to acquire asset lock proof') + process.exit(3); + } + + let identityId = await createIdentityId(outpoint.txid, outpoint.vout) + + return { + txidHex, + identityId, + assetLockProof, + } +} + +/** + * @param wif + * @param version + */ +async function wifToInfo( + wif: string, + version: VERSION_PRIVATE +): Promise<{ + wif: string, + privateKey: Uint8Array, + privateKeyHex: string, + publicKey: Uint8Array, + publicKeyHex: string, + pubKeyHash: Uint8Array, + pubKeyHashHex: string, + address: string +}> { + let privateKey = await DashKeys.wifToPrivKey(wif, { version }) + let publicKey = await KeyUtils.toPublicKey(privateKey) + let pubKeyHash = await DashKeys.pubkeyToPkh(publicKey) + let address = await DashKeys.pkhToAddr(pubKeyHash, { + version, + }) + + let privateKeyHex = DashKeys.utils.bytesToHex(privateKey) + let publicKeyHex = DashKeys.utils.bytesToHex(publicKey) + let pubKeyHashHex = DashKeys.utils.bytesToHex(pubKeyHash) + + let info = { + wif, + privateKey, + privateKeyHex, + publicKey, + publicKeyHex, + pubKeyHash, + pubKeyHashHex, + address, + } + // console.log(info); + // process.exit(1); + return info +} + +/** + * @param txSignedHex + * @param outputIndex + */ +async function getFundingOutPoint( + txSignedHex: HexString, + outputIndex: number +): Promise<{ txid: string, vout: number }> { + let txBytes = DashTx.utils.hexToBytes(txSignedHex) + let txidBytes = await DashTx.doubleSha256(txBytes) + let txid = DashTx.utils.bytesToHex(txidBytes) + + return { txid, vout: outputIndex } +} + +/** + * @param fundingOutPointHex + */ +function createIdentityId( + txidHex: HexString, + vout: number, +): Promise { + const fundingOutPointHex = `${txidHex}${DashTx.utils.toUint32LE(vout)}` + console.log(`Funding Outpoint Hex`, fundingOutPointHex) + + let fundingOutPointBytes = DashTx.utils.hexToBytes(fundingOutPointHex) + let identityHashBytes = DashTx.doubleSha256(fundingOutPointBytes) + // let identityId = b58.encode(identityHashBytes); + // return identityId; + return identityHashBytes +} + +function createCheckDataIsProof( + txProofSigned: { transaction: string } +): CheckData<{ raw: string }> { + /** + * @param {unknown} txlocksig + * @returns {txlocksig is {raw: string}} + */ + function checkDataIsProof(txlocksig: unknown): txlocksig is { raw: string } { + // @ts-expect-error + const raw = txlocksig?.raw + console.log("checkDataIsProof", txlocksig, raw, 'startsWith?', txProofSigned.transaction.slice(0, 16)) + if (typeof raw !== 'string') { + console.warn(`unknown data:`, txlocksig) + return false + } + + return raw.startsWith(txProofSigned.transaction) + } + + return checkDataIsProof +} + +function pollAssetLockChainProof( + txidHex: HexString +): { promise: Promise, source: { close: () => void } } { + let isActive = true + /** @type {any} */ + let timeoutToken: any + + function setTimeoutToken(token: any) { + timeoutToken = token + } + + let promise: Promise = new Promise(async function (resolve, reject) { + let timeout = 1000 + for (; ;) { + console.log(`pollAssetLockChainProof: sleeping for ${(timeout / 1000) | 0}s...`) + await sleep(timeout, setTimeoutToken) + timeout = Math.min(15000, timeout * 2) // exponential backoff. + + if (!isActive) { + reject("cancelled") + return + } + let txCore = await getTransactionJson(txidHex) + if (!txCore) continue + + const txInfo = txCore + let vout = txInfo.vout.findIndex(voutInfo => + voutInfo.scriptPubKey?.hex === "6a00" // TODO match the burn + ) + + let assetLockChainProof = DashBincode.ChainAssetLockProof({ + core_chain_locked_height: txInfo.height, + out_point: { + // The hex encoding of a transaction id is reversed for some unknown reason. + txid: DashBincode.Txid(DashTx.utils.hexToBytes(DashTx.utils.reverseHex(txidHex))), + vout: vout, + }, + }) + + console.log("assetLockChainProof", assetLockChainProof) + + // found the proof, but sometimes it rejects the proof because it doesn't have concensus to that height + // yet, so wait a bit (TODO: make this a retry loop later, not here) + await sleep(1000, t => {}); + + const proof = DashBincode.AssetLockProof.Chain(assetLockChainProof) + resolve(proof) + return + } + }) + + let source = { + close: function () { + isActive = false + clearTimeout(timeoutToken) + }, + } + + return { + promise, + source, + } +} + +type TransactionJson = { + /** Whether specified block is in the active chain or not (only present with explicit "blockhash" argument) */ + in_active_chain?: boolean, + /** The serialized, hex-encoded data for 'txid' */ + hex: string, + /** The transaction id (same as provided) */ + txid: string, + /** The transaction hash (differs from txid for witness transactions) */ + hash: string, + /** The serialized transaction size */ + size: number, + /** The virtual transaction size (differs from size for witness transactions) */ + vsize: number, + /** The transaction's weight (between vsize*4-3 and vsize*4) */ + weight: number, + /** The version */ + version: number, + /** The lock time */ + locktime: number, + /** The transaction inputs */ + vin: Array<{ + txid?: string, + vout?: number, + scriptSig?: { asm: string, hex: string }, + sequence: number, + txinwitness?: Array + }>, + /** The transaction outputs */ + vout: Array<{ + /** Output value */ + value: number, + /** Output index */ + n: number, + /** Output scriptPubKey */ + scriptPubKey: { + asm: string, + hex: string, + reqSigs?: number, + type: string, + addresses?: Array + } + }>, + /** If the transaction has been included in a block on the local best block chain, this is the block height where the transaction was mined. Otherwise, this is -1. Not shown for mempool transactions. */ + height?: number, + /** The block hash */ + blockhash?: string, + /** The confirmations */ + confirmations?: number, + /** The block time expressed in UNIX epoch time */ + blocktime?: number, + /** Same as "blocktime" */ + time?: number +} + +type TransactionMetadata = { + height: number +} + +type TransactionJsonMetadata = TransactionJson & TransactionMetadata + +async function getTransactionJson( + txidHex: HexString +): Promise { + const E_NO_TX = -5 + let getJson = true + + console.log('getTransactionJson: Looking for transaction...', txidHex) + /** @type {TransactionJson | null} */ + let txInfo: TransactionJson | null = await DashTx.utils + .rpc(RPC_AUTH_URL, "getrawtransaction", txidHex, getJson) + .catch( + /** @param {Error} err */ + function (err: Error) { + //@ts-expect-error - it may have .code + if (err.code === E_NO_TX) { + return null + } + throw err + }, + ) + // console.log('getTransactionJson: txInfo', txInfo) + if (!txInfo?.vout || txInfo?.blockhash == undefined || txInfo?.height == undefined) { + return null + } + + // console.log('getTransactionJson: Getting block height...') + // /** + // * @type {{ + // * height: number, + // * }} + // */ + // let blockInfo = await DashTx.utils + // .rpc(RPC_AUTH_URL, "getblock", txInfo.blockhash, "1" /* verbosity */) + // .catch( + // /** @param {Error & {code?: number}} err */ + // function (err) { + // // TODO: is this the right error code for getblock? + // console.error("getblock error", err.code, err); + // // if (err.code === E_NO_TX) { + // // return null + // // } + // throw err + // }, + // ) + + // return { + // ...txInfo, + // height: blockInfo.height, + // } + + // @ts-expect-error - we know height is set now + return txInfo +} + +// TODO: This sleep with setTimeoutToken is an obnoxious leaky abstraction. And is unref() really +// the right thing to do? +async function sleep( + ms: number, + setTimeoutToken: (token: NodeJS.Timeout) => void +): Promise { + return await new Promise(function (resolve) { + let token = setTimeout(resolve, ms) + // if (token.unref) { + // token.unref() + // } + if (setTimeoutToken) { + setTimeoutToken(token) + } + }) +} + +type CheckData = (message: unknown) => message is T + +function startEventSource( + url: string, + eventName: string, + checkData: CheckData +): { promise: Promise, source: { close: () => void } } { + const tickerHeartbeatMs = 5 * 1000 + // in case of a network hiccup lasting several seconds + const tickerHeartbeatTimeout = 3 * tickerHeartbeatMs + + const source = createEventSource(url) + + let tickerTimeoutId: NodeJS.Timeout | undefined = undefined + function updateTickerTimeout() { + // clearTimeout(tickerTimeoutId) + // tickerTimeoutId = setTimeout(() => source.close(), tickerHeartbeatTimeout) + } + updateTickerTimeout() + + const promise: Promise = (async () => { + // sometimes it complains that we're not a current client yet? + await sleep(100, t => {}); + + const resp = await fetch(ZMQ_AUTH_URL, { + method: "PUT", + headers: { + Authorization: `Basic ${btoa(`api:null`)}`, + "Content-Type": "application/json", + }, + body: JSON.stringify({ topics: ["debug:ticker", eventName] }), + }) + + const result = await resp.text() + console.log(`[DEBUG] status: ${result}`) + + for await (const {data: rawData, event, id} of source) { + updateTickerTimeout() + + console.log(`DEBUG MessageEvent`, event) + const data = JSON.parse(rawData) + + if (!checkData(data)) { + continue + } + + const txlocksigHex = data.raw + { + const len = txlocksigHex.length / 2 + console.log() + console.log(`Tx Lock Sig Hex (${len}):`) + console.log(txlocksigHex) + } + + let vout = -1 + let instantLockTxHex = "" + let instantLockSigHex = "" + { + let txlocksig = DashTx.parseUnknown(txlocksigHex) + vout = 0 + //vout = txlocksig.extraPayload.outputs.findIndex(function (output) { + // //@ts-expect-error + // return output.script === "6a00"; + //}); + // console.log(txlocksig.extraPayload.outputs); + instantLockSigHex = txlocksig.sigHashTypeHex + let isLen = instantLockSigHex.length / 2 + let len = txlocksigHex.length / 2 + len -= isLen + instantLockTxHex = txlocksigHex.slice(0, len * 2) + console.log() + console.log(`Tx Hex (${len})`) + console.log(instantLockTxHex) + console.log() + console.log(`Tx Lock Sig Instant Lock Hex (${isLen})`) + console.log(txlocksig.sigHashTypeHex) + } + + const assetLockInstantProof = DashBincode.RawInstantLockProof({ + instant_lock: DashBincode.BinaryData(DashTx.utils.hexToBytes(instantLockSigHex)), + transaction: DashBincode.BinaryData(DashTx.utils.hexToBytes(instantLockTxHex)), // TODO this may need the proof, not the signed tx + output_index: vout, + }) + const proof = DashBincode.AssetLockProof.Instant(assetLockInstantProof) + + source.close() + return proof + } + + // throw new Error("event source closed before found") + + console.log("event source closed before found"); + + // if (eventName) { + // console.log(`EventSource: listening for ${eventName}`) + // source.addEventListener(eventName, onMessage) + // } else { + // console.log(`EventSource: listening for all messages`) + // source.addEventListener("message", onMessage) + // } + })(); + + return { + promise: promise, + source: { + close: () => source.close(), + }, + } +} + +/** + * THIS IS PROBABLY WRONG + * We'd actually need to do getaddresstxids, getrawtransaction, getaddressutxos, getaddressmempool to get all of the data to pair the coins properly + */ +export const TODOgetUtxos = async function ( + rpc: TRPC, + addresses: string[] +): Promise { + const [utxos, memDeltas] = await Promise.all([ + rpc.getAddressUtxos({ addresses }), + rpc.getAddressMempool({ addresses }), + ]) + + const oldTotal = DashTx.sum(utxos) + const newTotal = DashTx.sum(memDeltas) + const total = newTotal + oldTotal + if (total === 0) { + return [] + } else if (total < 0) { + throw new Error("sanity fail: double spend detected") + } + + for (const delta of memDeltas) { + if (delta.satoshis < 0) { + throw new Error( + "dev error: reconciling instant-send debits is not yet supported", + ) + } + + // TODO expose decodeUnchecked(), rename 'pubKeyHash' (data) to 'hex' + const pubKeyHashCheck = DashKeys._dash58check.decode(delta.address, { + versions: VERSIONS_TESTNET, + }) + const utxo = { + address: delta.address, + // TODO: needs better abstraction + pubKeyHash: (pubKeyHashCheck as PubKeyHashParts).pubKeyHash!, + txid: delta.txid, + outputIndex: delta.index, + satoshis: delta.satoshis, + // TODO: needs better abstraction + script: `76a914${(pubKeyHashCheck as PubKeyHashParts).pubKeyHash}88ac`, + height: -1, + } + utxos.push(utxo) + } + + return utxos +} + +// /** +// * @param {String} path +// */ +// async function readWif(path) { +// let wif = await Fs.readFile(path, "utf8"); +// wif = wif.trim(); + +// return wif; +// } diff --git a/src/bincode.test.ts b/src/bincode.test.ts new file mode 100644 index 0000000..0e24609 --- /dev/null +++ b/src/bincode.test.ts @@ -0,0 +1,550 @@ +import { it, expect } from "vitest" +import { fromHex, toHex } from "./hex.js" +import { + BinCode, + decode, + encode, + Enum, + Int8, + String, + Struct, +} from "./bincode.ts" +import { BinaryData, DataContractCreateTransition, DataContractInSerializationFormat, StateTransition, IdentityPublicKeyV0, KeyType, Purpose, SecurityLevel, Identifier, IdentifierBytes32, IdentityPublicKey, OutPoint } from "../2.0.0/generated_bincode.js" +import { toJsonCamelCase } from "./dash_bincode.js" + +import * as secp from "@noble/secp256k1" +import * as KeyUtils from "./key-utils.js" +import { doubleSha256 } from "../../DashTx.js/dashtx.js" +import { signTransitionWithRawKey } from "./sign.ts" + +const Enum1 = Enum("Enum1", { + Foo: { F0: String }, + Bar: { F0: Int8 }, +}) + +type Enum1 = typeof Enum1.$$type +namespace Enum1 { + export type Foo = ReturnType +} + +it("should create enums correctly", () => { + + expect(Enum1.Foo).toBeDefined() + expect(Enum1.Bar).toBeDefined() + + const x: Enum1.Foo = Enum1.Foo({ F0: "hello" }) + + const _xenum: Enum1 = x + expect(x.F0).toBe("hello") + expect(x).toBeInstanceOf(Enum1.Foo) + expect(x).toBeInstanceOf(Enum1) + + const y = Enum1.Bar({ F0: 5 }) + expect(y.F0).toBe(5) + expect(y).toBeInstanceOf(Enum1.Bar) + expect(y).toBeInstanceOf(Enum1) + + const x_bytes = encode(Enum1, x) + expect(toHex(x_bytes)).toStrictEqual("000568656c6c6f") +}) + +it("should encode/decode DataContractCreateTransitions", async () => { + /* + const data_contract_create_json = { + "dataContract": { + "$format_version": "1", + "id": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], + "config": { + "$format_version": "0", + "canBeDeleted": true, + "readonly": false, + "keepsHistory": true, + "documentsKeepHistoryContractDefault": false, + "documentsMutableContractDefault": false, + "documentsCanBeDeletedContractDefault": false, + "requiresIdentityEncryptionBoundedKey": null, + "requiresIdentityDecryptionBoundedKey": null + }, "version": 2, + "ownerId": [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], + "schemaDefs": {}, + "documentSchemas": { + "asdf": { "foo": 34 } + }, + "createdAt": 100000, + "updatedAt": 100001, + "createdAtBlockHeight": 100002, + "updatedAtBlockHeight": 100003, + "createdAtEpoch": 10004, + "updatedAtEpoch": 10005, + "groups": { + "12": { + "V0": { + "members": { + "21nS9Wz9sUTQ6MkcYUtnN8aSfPA26xJJP7zqshfzCzqc": 1 + }, + "required_power": 1 + } + } + }, + "tokens": { + "0": { + "$format_version": "0", + "conventions": { + "$format_version": "0", + "localizations": { + "US": { + "$format_version": "0", + "shouldCapitalize": true, + "singularForm": "x", + "pluralForm": "xs" + } + }, "decimals": 2 + }, + "conventionsChangeRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "baseSupply": 12345678901234567890n, + "maxSupply": 18446744073709551615n, + "keepsHistory": { + "$format_version": "0", + "keepsTransferHistory": false, + "keepsFreezingHistory": false, + "keepsMintingHistory": true, + "keepsBurningHistory": true + }, + "startAsPaused": false, + "maxSupplyChangeRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "distributionRules": { + "$format_version": "0", + "perpetualDistribution": { + "$format_version": "0", + "distributionType": { + "EpochBasedDistribution": { + "interval": 16, + "function": { + "InvertedLogarithmic": { "a": 1, "d": 2, "m": 3, "n": 4, "o": 5, "start_moment": 1235678, "b": 0, "min_value": null, "max_value": 112233445566 } + } + } + }, + "distributionRecipient": "EvonodesByParticipation" + }, + "perpetualDistributionRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, "self_changing_admin_action_takers_allowed": true + } + }, + "preProgrammedDistribution": { "$format_version": "0", "distributions": {} }, + "newTokensDestinationIdentity": [18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18], + "newTokensDestinationIdentityRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "mintingAllowChoosingDestination": true, + "mintingAllowChoosingDestinationRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + } + }, + "manualMintingRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "manualBurningRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "freezeRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "unfreezeRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, "destroyFrozenFundsRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "emergencyActionRules": { + "V0": { + "authorized_to_make_change": "MainGroup", + "admin_action_takers": "ContractOwner", + "changing_authorized_action_takers_to_no_one_allowed": false, + "changing_admin_action_takers_to_no_one_allowed": false, + "self_changing_admin_action_takers_allowed": true + } + }, + "mainControlGroup": 2, + "mainControlGroupCanBeModified": "NoOne" + } + } + }, + "identityNonce": 83838, + "userFeeIncrease": 15, + "signaturePublicKeyId": 1, + "signature": [42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42], + "$version": 0 + } + */ + + // From Rust + const data_contract_create_bytes = fromHex("000101010101010101010101010101010101010101010101010101010101010101010001000100000000000205050505050505050505050505050505050505050505050505050505050505050100010461736466160312047479706512066f626a656374120a70726f70657274696573160112047465737416021204747970651206737472696e671208706f736974696f6e040012146164646974696f6e616c50726f70657274696573130001fc000186a001fc000186a101fc000186a201fc000186a301fb271401fb2715010c00010f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f010101000000010255530001017802787302000301000001fdab54a98ceb1f0ad201fdffffffffffffffff000000010100000301000001000100021008020203040a01fc0012dade000001fd0000001a21a278be0200030100000101000001121212121212121212121212121212121212121212121212121212121212121200030100000101000301000001000301000001000301000001000301000001000301000001000301000001000301000001010200fc0001477e0001202a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a") + const data_contract_create_signable_bytes = fromHex("000101010101010101010101010101010101010101010101010101010101010101010001000100000000000205050505050505050505050505050505050505050505050505050505050505050100010461736466160312047479706512066f626a656374120a70726f70657274696573160112047465737416021204747970651206737472696e671208706f736974696f6e040012146164646974696f6e616c50726f70657274696573130001fc000186a001fc000186a101fc000186a201fc000186a301fb271401fb2715010c00010f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f010101000000010255530001017802787302000301000001fdab54a98ceb1f0ad201fdffffffffffffffff000000010100000301000001000100021008020203040a01fc0012dade000001fd0000001a21a278be0200030100000101000001121212121212121212121212121212121212121212121212121212121212121200030100000101000301000001000301000001000301000001000301000001000301000001000301000001000301000001010200fc0001477e00") + + // test that decode then encode returns the same bytes + const data_contract_create = decode(DataContractCreateTransition, data_contract_create_bytes.buffer) + const data_contract_create_bytes2 = encode(DataContractCreateTransition, data_contract_create) + expect(toHex(data_contract_create_bytes2)).toStrictEqual(toHex(data_contract_create_bytes)) + + const data_contract_create_signable_bytes2 = encode(DataContractCreateTransition, data_contract_create, { signable: true }) + expect(toHex(data_contract_create_signable_bytes2)).toStrictEqual(toHex(data_contract_create_signable_bytes)) + + + // Now sign it + + const private_key = fromHex( + "6c554775029f960891e3edf2d36b26a30d9a4b10034bb49f3a6c4617f557f7bc", + ) + const publicKey = await KeyUtils.toPublicKey(private_key) + console.log('publicKey', toHex(publicKey)) + + const identityPubKey = IdentityPublicKey.V0(IdentityPublicKeyV0({ + id: 0, + purpose: Purpose.AUTHENTICATION(), + security_level: SecurityLevel.CRITICAL(), + key_type: KeyType.ECDSA_SECP256K1(), + read_only: true, + data: BinaryData(publicKey), + })) + + const state_transition_signed = StateTransition.DataContractCreate(data_contract_create) + await signTransitionWithRawKey(state_transition_signed, identityPubKey, private_key) + + // We have to check the "signable" bytes AFTER signing because signing also sets the contract_id and other mutations + // that alter the signable bytes. + const state_transition_signable_bytes = fromHex("000001fc399a05bcf7e416f4e57fd9870da2539b333e390ed76c0b0a16c017c11660790001000100000000000205050505050505050505050505050505050505050505050505050505050505050100010461736466160312047479706512066f626a656374120a70726f70657274696573160112047465737416021204747970651206737472696e671208706f736974696f6e040012146164646974696f6e616c50726f70657274696573130001fc000186a001fc000186a101fc000186a201fc000186a301fb271401fb2715010c00010f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f010101000000010255530001017802787302000301000001fdab54a98ceb1f0ad201fdffffffffffffffff000000010100000301000001000100021008020203040a01fc0012dade000001fd0000001a21a278be0200030100000101000001121212121212121212121212121212121212121212121212121212121212121200030100000101000301000001000301000001000301000001000301000001000301000001000301000001000301000001010200fc0001477e00") + const state_transition_signable_bytes2 = encode(StateTransition, state_transition_signed, { signable: true }) + expect(toHex(state_transition_signable_bytes2)).toStrictEqual(toHex(state_transition_signable_bytes)) + + const state_transition_signed_bytes = fromHex("000001fc399a05bcf7e416f4e57fd9870da2539b333e390ed76c0b0a16c017c11660790001000100000000000205050505050505050505050505050505050505050505050505050505050505050100010461736466160312047479706512066f626a656374120a70726f70657274696573160112047465737416021204747970651206737472696e671208706f736974696f6e040012146164646974696f6e616c50726f70657274696573130001fc000186a001fc000186a101fc000186a201fc000186a301fb271401fb2715010c00010f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f010101000000010255530001017802787302000301000001fdab54a98ceb1f0ad201fdffffffffffffffff000000010100000301000001000100021008020203040a01fc0012dade000001fd0000001a21a278be0200030100000101000001121212121212121212121212121212121212121212121212121212121212121200030100000101000301000001000301000001000301000001000301000001000301000001000301000001000301000001010200fc0001477e0000411f3b6ee69cca6e9c7dda79e5a571b7bc9de307c5e27754c652ec62b22f7e6ff91966bd5e5db151484f1c81d766053154ed1a2f58a07303edf9f9a8cffe41891506") + const state_transition_signed_bytes2 = encode(StateTransition, state_transition_signed) + expect(toHex(state_transition_signed_bytes2)).toStrictEqual(toHex(state_transition_signed_bytes)) + +}) + +it("should encode/decode IdentityPublicKey", () => { + const master_key_bytes = fromHex( + "0000000000000021033a9a8b1e4c581a1987724c6697135d31c07ee7ac827e6a59cec022b04d51055f00", + ) + const master_key = decode(IdentityPublicKey, master_key_bytes.buffer) + + // const master_key_json = { + // $version: "0", + // id: 0, + // purpose: 0, + // securityLevel: 0, + // contractBounds: null, + // type: 0, + // readOnly: false, + // data: [ + // 3, 58, 154, 139, 30, 76, 88, 26, 25, 135, 114, 76, 102, 151, 19, 93, 49, + // 192, 126, 231, 172, 130, 126, 106, 89, 206, 192, 34, 176, 77, 81, 5, 95, + // ], + // disabledAt: null, + // }; + // expect(master_key_json).toEqual(JSON.parse(toJsonCamelCase(master_key))); + console.log('master_key data (public_key)', ((master_key as IdentityPublicKey.V0)[0].data[0].buffer)) + expect(master_key_bytes).toStrictEqual( + new Uint8Array(encode(IdentityPublicKey, master_key)), + ) + + const master_private_key = fromHex( + "6c554775029f960891e3edf2d36b26a30d9a4b10034bb49f3a6c4617f557f7bc", + ) + + const other_key_bytes = fromHex( + "000100010000002102014603018dc437642dda16f4c7fc50e482dd23e24680bcb3a5966c3b343848e200", + ) + const other_key = decode(IdentityPublicKey, other_key_bytes.buffer) + + // const other_key_json = { + // $version: "0", + // id: 1, + // purpose: 0, + // securityLevel: 1, + // contractBounds: null, + // type: 0, + // readOnly: false, + // data: [ + // 2, 1, 70, 3, 1, 141, 196, 55, 100, 45, 218, 22, 244, 199, 252, 80, 228, + // 130, 221, 35, 226, 70, 128, 188, 179, 165, 150, 108, 59, 52, 56, 72, 226, + // ], + // disabledAt: null, + // }; + // expect(other_key_json).toEqual(JSON.parse(toJsonCamelCase(other_key))); + + const other_private_key = fromHex( + "426ae4838204206cacdfc7a2e04ac6a2d9e3c2e94df935878581c552f22b0096", + ) +}) + +it("should encode/decode OutPoint", () => { + // WARNING: There are many encodings of OutPoint, this one is the bincode::serde::encode_to_vec + // representation which uses length-prefixed txid and varuint encoding for vout (same as used in IdentityCreateTransitionV0) + const op_hex = '200102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20fb3039' + + const op = decode(OutPoint, fromHex(op_hex).buffer) + const op_bytes = encode(OutPoint, op) + expect(toHex(op_bytes)).toStrictEqual(op_hex) +}) + +it("should encode/decode IdentityCreateTransition", () => { + const ic_chain_hex = '03000001fc0012d687200102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20fb303942001212121212121212121212121212121212121212121212121212121212121212'; + const ic_instant_hex = '03000000a200000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2012121212121212121212121212121212121212121212121212121212121212124848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848480c0200000000010000000000000042001212121212121212121212121212121212121212121212121212121212121212'; + + const ic_chain = decode(StateTransition, fromHex(ic_chain_hex).buffer) + const ic_chain_bytes = encode(StateTransition, ic_chain) + expect(toHex(ic_chain_bytes)).toStrictEqual(ic_chain_hex) + + const ic_instant = decode(StateTransition, fromHex(ic_instant_hex).buffer) + const ic_instant_bytes = encode(StateTransition, ic_instant) + expect(toHex(ic_instant_bytes)).toStrictEqual(ic_instant_hex) +}) + +// it("should encode/decode Identifier", () => { +// const identifier_bytes = fromHex( +// "3dc908599ef8a5a3c510c430a27d4211c805556d99e5c06ffc3ca86a5feb55c3", +// ); +// const identifier = decode(Identifier, identifier_bytes.buffer); + +// // expect(master_key_json).toEqual(JSON.parse(toJsonCamelCase(master_key))) +// expect(identifier_bytes).toEqual( +// new Uint8Array(encode(Identifier, identifier)), +// ); +// }); + +// it("should encode/decode StateTransition", () => { +// // const key_signable_bytes = fromHex('0300020000000000000021033a9a8b1e4c581a1987724c6697135d31c07ee7ac827e6a59cec022b04d51055f000100000100002102014603018dc437642dda16f4c7fc50e482dd23e24680bcb3a5966c3b343848e200c601011dbbda5861b12d7523f20aa5e0d42f52de3dcd2d5c2fe919ba67b59f050d206e0000000058c444dd0957767db2c0adea69fd861792bfa75c7e364d83fe85bebebc2a08b436a56617591a6a89237bada6af1f9b46eba47b5d89a8c4e49ff2d0236182307c8967c46529a967b3822e1ba8a173066296d02593f0f59b3a78a30a7eef9c8a120847729e62e4a32954339286b79fe7590221331cd28d576887a263f45b595d499272f656c3f5176987c976239cac16f972d796ad82931d532102a4f95eec7d809e00000800015884e5db9de218238671572340b207ee85b628074e7e467096c267266baf77a4000000001976a91488d9931ea73d60eaf7e5671efc0552b912911f2a88ac000000000200e1f50500000000026a0088130000000000001976a91488d9931ea73d60eaf7e5671efc0552b912911f2a88ac0000000024000100e1f505000000001976a914271c99481ce1460e4fd62d5a11eecc123d78ee3288ac0000') +// const asset_lock_private_key = fromHex( +// "33a9f0603ba69b97dff83e08b4ee36cebbc987739e9749615e1727754f2bf2d2", +// ); + +// const state_transition_signable_bytes = fromHex( +// "0300020000000000000021033a9a8b1e4c581a1987724c6697135d31c07ee7ac827e6a59cec022b04d51055f000100000100002102014603018dc437642dda16f4c7fc50e482dd23e24680bcb3a5966c3b343848e200c601011dbbda5861b12d7523f20aa5e0d42f52de3dcd2d5c2fe919ba67b59f050d206e0000000058c444dd0957767db2c0adea69fd861792bfa75c7e364d83fe85bebebc2a08b436a56617591a6a89237bada6af1f9b46eba47b5d89a8c4e49ff2d0236182307c8967c46529a967b3822e1ba8a173066296d02593f0f59b3a78a30a7eef9c8a120847729e62e4a32954339286b79fe7590221331cd28d576887a263f45b595d499272f656c3f5176987c976239cac16f972d796ad82931d532102a4f95eec7d809e00000800015884e5db9de218238671572340b207ee85b628074e7e467096c267266baf77a4000000001976a91488d9931ea73d60eaf7e5671efc0552b912911f2a88ac000000000200e1f50500000000026a0088130000000000001976a91488d9931ea73d60eaf7e5671efc0552b912911f2a88ac0000000024000100e1f505000000001976a914271c99481ce1460e4fd62d5a11eecc123d78ee3288ac0000", +// ); +// const state_transition_signable = decode( +// StateTransition, +// state_transition_signable_bytes.buffer, +// { signable: true }, +// ); +// expect(state_transition_signable_bytes).toEqual( +// new Uint8Array( +// encode(StateTransition, state_transition_signable, { signable: true }), +// ), +// ); + +// // asset_lock_proof +// // +// // ```json +// // asset_lock_proof {"instantLock":[1,1,29,187,218,88,97,177,45,117,35,242,10,165,224,212,47,82,222,61,205,45,92,47,233,25,186,103,181,159,5,13,32,110,0,0,0,0,88,196,68,221,9,87,118,125,178,192,173,234,105,253,134,23,146,191,167,92,126,54,77,131,254,133,190,190,188,42,8,180,54,165,102,23,89,26,106,137,35,123,173,166,175,31,155,70,235,164,123,93,137,168,196,228,159,242,208,35,97,130,48,124,137,103,196,101,41,169,103,179,130,46,27,168,161,115,6,98,150,208,37,147,240,245,155,58,120,163,10,126,239,156,138,18,8,71,114,158,98,228,163,41,84,51,146,134,183,159,231,89,2,33,51,28,210,141,87,104,135,162,99,244,91,89,93,73,146,114,246,86,195,245,23,105,135,201,118,35,156,172,22,249,114,215,150,173,130,147,29,83,33,2,164,249,94,236,125,128],"transaction":[0,0,8,0,1,88,132,229,219,157,226,24,35,134,113,87,35,64,178,7,238,133,182,40,7,78,126,70,112,150,194,103,38,107,175,119,164,0,0,0,0,25,118,169,20,136,217,147,30,167,61,96,234,247,229,103,30,252,5,82,185,18,145,31,42,136,172,0,0,0,0,2,0,225,245,5,0,0,0,0,2,106,0,136,19,0,0,0,0,0,0,25,118,169,20,136,217,147,30,167,61,96,234,247,229,103,30,252,5,82,185,18,145,31,42,136,172,0,0,0,0,36,0,1,0,225,245,5,0,0,0,0,25,118,169,20,39,28,153,72,28,225,70,14,79,214,45,90,17,238,204,18,61,120,238,50,136,172],"outputIndex":0} +// // ``` +// // +// const state_transition_bytes = fromHex( +// "0300020000000000000021033a9a8b1e4c581a1987724c6697135d31c07ee7ac827e6a59cec022b04d51055f411f6ca4070bc91c2e21f785113a4669fa32bdf24f9e0e67966b5186254265b5d2fd52ef7a9ca7e6ed03ef9838c56bbeb32bf0722f11a95982bfa14a61f56d7c523e000100000100002102014603018dc437642dda16f4c7fc50e482dd23e24680bcb3a5966c3b343848e2411f6776128925163122c68e4ad230cf59c5a8444e518d6a5592d242e9f48e85498e371b78520812536a57ef4400a5e7a43307283c5da62ba343d8f23574c15a2db700c601011dbbda5861b12d7523f20aa5e0d42f52de3dcd2d5c2fe919ba67b59f050d206e0000000058c444dd0957767db2c0adea69fd861792bfa75c7e364d83fe85bebebc2a08b436a56617591a6a89237bada6af1f9b46eba47b5d89a8c4e49ff2d0236182307c8967c46529a967b3822e1ba8a173066296d02593f0f59b3a78a30a7eef9c8a120847729e62e4a32954339286b79fe7590221331cd28d576887a263f45b595d499272f656c3f5176987c976239cac16f972d796ad82931d532102a4f95eec7d809e00000800015884e5db9de218238671572340b207ee85b628074e7e467096c267266baf77a4000000001976a91488d9931ea73d60eaf7e5671efc0552b912911f2a88ac000000000200e1f50500000000026a0088130000000000001976a91488d9931ea73d60eaf7e5671efc0552b912911f2a88ac0000000024000100e1f505000000001976a914271c99481ce1460e4fd62d5a11eecc123d78ee3288ac0000411fea1c5e3b0c92c8d02fd52c47fe5f215a828d05c317a997a4a3419a17b9260b9717ccee2603bf5ae411bba1ab8e1d0bbc31cbd73d7d6fefcdb4feb34657b2e5093dc908599ef8a5a3c510c430a27d4211c805556d99e5c06ffc3ca86a5feb55c3", +// ); +// const state_transition = decode( +// StateTransition, +// state_transition_bytes.buffer, +// { signable: false }, +// ); +// console.log(state_transition); +// expect(state_transition_bytes).toEqual( +// new Uint8Array( +// encode(StateTransition, state_transition, { signable: false }), +// ), +// ); + +// /* +// IdentityCreate(V0(IdentityCreateTransitionV0 { +// public_keys: [ +// V0(IdentityPublicKeyInCreationV0 { +// id: 0, +// key_type: ECDSA_SECP256K1, +// purpose: AUTHENTICATION, +// security_level: MASTER, +// contract_bounds: None, +// read_only: false, +// data: BinaryData(0x033a9a8b1e4c581a1987724c6697135d31c07ee7ac827e6a59cec022b04d51055f), +// signature: BinaryData(0x1f6ca4070bc91c2e21f785113a4669fa32bdf24f9e0e67966b5186254265b5d2fd52ef7a9ca7e6ed03ef9838c56bbeb32bf0722f11a95982bfa14a61f56d7c523e) +// }), +// V0(IdentityPublicKeyInCreationV0 { +// id: 1, +// key_type: ECDSA_SECP256K1, +// purpose: AUTHENTICATION, +// security_level: CRITICAL, +// contract_bounds: None, +// read_only: false, +// data: BinaryData(0x02014603018dc437642dda16f4c7fc50e482dd23e24680bcb3a5966c3b343848e2), +// signature: BinaryData(0x1f6776128925163122c68e4ad230cf59c5a8444e518d6a5592d242e9f48e85498e371b78520812536a57ef4400a5e7a43307283c5da62ba343d8f23574c15a2db7) +// }) +// ], +// asset_lock_proof: Instant(InstantAssetLockProof { +// instant_lock: InstantLock { +// version: 1, +// inputs: [ +// OutPoint { +// txid: 0x6e200d059fb567ba19e92f5c2dcd3dde522fd4e0a50af223752db16158dabb1d, +// vout: 0 +// } +// ], +// txid: b4082abcbebe85fe834d367e5ca7bf921786fd69eaadc0b27d765709dd44c458, +// cyclehash: 0x7c30826123d0f29fe4c4a8895d7ba4eb469b1fafa6ad7b23896a1a591766a536, +// signature: [137, 103, 196, 101, 41, 169, 103, 179, 130, 46, 27, 168, 161, 115, 6, 98, 150, 208, +// 37, 147, 240, 245, 155, 58, 120, 163, 10, 126, 239, 156, 138, 18, 8, 71, 114, 158, 98, 228, 163, +// 41, 84, 51, 146, 134, 183, 159, 231, 89, 2, 33, 51, 28, 210, 141, 87, 104, 135, 162, 99, 244, 91, +// 89, 93, 73, 146, 114, 246, 86, 195, 245, 23, 105, 135, 201, 118, 35, 156, 172, 22, 249, 114, 215, +// 150, 173, 130, 147, 29, 83, 33, 2, 164, 249, 94, 236, 125, 128] +// }, +// transaction: Transaction { +// version: 0, +// lock_time: 0, +// input: [ +// TxIn { +// previous_output: OutPoint { +// txid: 0xa477af6b2667c29670467e4e0728b685ee07b240235771862318e29ddbe58458, +// vout: 0 +// }, +// script_sig: Script(OP_DUP OP_HASH160 OP_PUSHBYTES_20 88d9931ea73d60eaf7e5671efc0552b912911f2a OP_EQUALVERIFY OP_CHECKSIG), +// sequence: 0, +// witness: Witness { content: [], witness_elements: 0, indices_start: 0 } +// } +// ], +// output: [ +// TxOut { +// value: 100000000, +// script_pubkey: Script(OP_RETURN OP_0) +// }, +// TxOut { +// value: 5000, +// script_pubkey: Script(OP_DUP OP_HASH160 OP_PUSHBYTES_20 88d9931ea73d60eaf7e5671efc0552b912911f2a OP_EQUALVERIFY OP_CHECKSIG) +// } +// ], +// special_transaction_payload: Some(AssetLockPayloadType(AssetLockPayload { +// version: 0, +// credit_outputs: [ +// TxOut { +// value: 100000000, +// script_pubkey: Script(OP_DUP OP_HASH160 OP_PUSHBYTES_20 271c99481ce1460e4fd62d5a11eecc123d78ee32 OP_EQUALVERIFY OP_CHECKSIG) +// } +// ] +// })) +// }, +// output_index: 0 +// }), +// user_fee_increase: 0, +// signature: BinaryData(0x), +// identity_id: Identifier(IdentifierBytes32([61, 201, 8, 89, 158, 248, 165, 163, 197, 16, 196, 48, 162, 125, 66, 17, 200, 5, 85, 109, 153, 229, 192, 111, 252, 60, 168, 106, 95, 235, 85, 195])) +// })) +// */ +// }); + +// it('should encode/decode Identity', () => { +// const identity_json = { +// "$version": "0", +// "id": [61, 201, 8, 89, 158, 248, 165, 163, 197, 16, 196, 48, 162, 125, 66, 17, 200, 5, 85, 109, 153, 229, 192, 111, 252, 60, 168, 106, 95, 235, 85, 195], +// "publicKeys": [ +// { +// "$version": "0", +// "id": 0, +// "purpose": 0, +// "securityLevel": 0, +// "contractBounds": null, +// "type": 0, +// "readOnly": false, +// "data": [3, 58, 154, 139, 30, 76, 88, 26, 25, 135, 114, 76, 102, 151, 19, 93, 49, 192, 126, 231, 172, 130, 126, 106, 89, 206, 192, 34, 176, 77, 81, 5, 95], +// "disabledAt": null +// }, { +// "$version": "0", +// "id": 1, +// "purpose": 0, +// "securityLevel": 1, +// "contractBounds": null, +// "type": 0, +// "readOnly": false, +// "data": [2, 1, 70, 3, 1, 141, 196, 55, 100, 45, 218, 22, 244, 199, 252, 80, 228, 130, 221, 35, 226, 70, 128, 188, 179, 165, 150, 108, 59, 52, 56, 72, 226], +// "disabledAt": null +// } +// ], +// "balance": 1000000000, +// "revision": 0 +// } +// // +// // ``` +// // identity V0(IdentityV0 { id: Identifier(IdentifierBytes32([61, 201, 8, 89, 158, 248, 165, 163, 197, 16, 196, 48, 162, 125, 66, 17, 200, 5, 85, 109, 153, 229, 192, 111, 252, 60, 168, 106, 95, 235, 85, 195])), public_keys: {0: V0(IdentityPublicKeyV0 { id: 0, purpose: AUTHENTICATION, security_level: MASTER, contract_bounds: None, key_type: ECDSA_SECP256K1, read_only: false, data: BinaryData(0x033a9a8b1e4c581a1987724c6697135d31c07ee7ac827e6a59cec022b04d51055f), disabled_at: None }), 1: V0(IdentityPublicKeyV0 { id: 1, purpose: AUTHENTICATION, security_level: CRITICAL, contract_bounds: None, key_type: ECDSA_SECP256K1, read_only: false, data: BinaryData(0x02014603018dc437642dda16f4c7fc50e482dd23e24680bcb3a5966c3b343848e2), disabled_at: None })}, balance: 1000000000, revision: 0 }) +// // ``` +// // +// // ``` +// // identity_create_transition +// // .public_keys +// // .iter_mut() +// // .zip(identity.public_keys().iter()) +// // .try_for_each(|(public_key_with_witness, (_, public_key))| { +// // if public_key.key_type().is_unique_key_type() { +// // let signature = signer.sign(public_key, &key_signable_bytes)?; +// // public_key_with_witness.set_signature(signature); +// // } +// // Ok::<(), ProtocolError>(()) +// // })?; +// // ``` +// }) \ No newline at end of file diff --git a/src/bincode.ts b/src/bincode.ts new file mode 100644 index 0000000..fe8a7f2 --- /dev/null +++ b/src/bincode.ts @@ -0,0 +1,1152 @@ +/** + * This is the core of an implementation of Rust's [Bincode](https://github.com/bincode-org/bincode) in Typescript. + * If you are looking for how to use this module, your entry point is the {@link encode} and {@link decode} functions. + * @module + * + * @example + * ```js + * import * as Bincode from 'dashplatform/bincode' + * + * let input = -42 + * let encoded_bytes = Bincode.encode(Bincode.VarInt, input) + * let decoded_value = Bincode.decode(Bincode.VarInt, encoded_bytes) + * console.assert(input === decoded_value) + * ``` + */ +import { toHex } from "./hex.js"; + +const DEBUG = false; +const LITTLE_ENDIAN = false; + +/** + * The interface an object must conform to in order to be used by Bincode or + * in another BinCode-able type. + */ +export interface BinCodeable { + /** The name of this type, used in error messages. */ + name: string + /** Return true if the given value is valid and can be encoded/decoded by this type. */ + isValid: (value: unknown) => boolean + /** Encode the given value into the BinCode stream. */ + encode: (bc: BinCode, value: T) => void + /** Decode the expected value from the BinCode stream. */ + decode: (bc: BinCode) => T +} + +/** Extra options can be passed to modify encoding/decoding behavior. */ +export interface BinCodeOptions { + signable?: Boolean +} + +/** Encode a BinCodeable value returning an ArrayBuffer of bytes */ +export function encode(_type: BinCodeable, value: T, options: BinCodeOptions = {}) { + let ab = new ArrayBuffer(16); + let dv = new DataView(ab); + const bc = new BinCode(dv, 0, options); + _type.encode(bc, value); + return bc.slice(); +} + +/** Decode the given type from the given buffer. */ +export function decode(_type: BinCodeable, value: ArrayBuffer, options = {}) { + const bc = new BinCode(new DataView(value), 0, options); + return _type.decode(bc); +} + +/** + * BinCode is a wrapper around a DataView to make it easier to use as a stream. + * It is only used inside the encode/decode implementations for a particular type. + * If you are looking to just encode/decode some array of bytes then look at {@link encode} or {@link decode}. + * It also holds the BinCodeOptions passed to encode/decode. + */ +export class BinCode { + dataview: DataView + idx: number + options: BinCodeOptions + + constructor(dataview: DataView, idx: number = 0, options: BinCodeOptions = {}) { + this.dataview = dataview; + this.idx = idx; + this.options = options; + } + + /** + * Returns the slice from 0 to the current index, when done writing. + */ + slice() { + return this.dataview.buffer.slice(0, this.idx); + } + + _idxThenAdd(add: number) { + let idx = this.idx; + this.idx += add; + return idx; + } + + /** + * Returns the current index, before advancing it by `add`. If there are not enough + * bytes in the current dataview, replaces it a new one twice the size. + */ + _idxThenAddExtend(add: number) { + let idx = this.idx; + this.idx += add; + if (this.idx > this.dataview.byteLength) { + // not enough space, extend the dataview + let newlen = Math.max(this.dataview.byteLength * 2, this.idx + add); + newlen = newlen < 16 ? 32 : newlen; + let newab = new ArrayBuffer(newlen); + new Uint8Array(newab).set(new Uint8Array(this.dataview.buffer), 0); + // console.log("Extending BinCode dataview: ", this.idx, add, this.dataview.byteLength, this.dataview.buffer, ' -> ', newab); + this.dataview = new DataView(newab); + } + return idx; + } + + _debug(msg: any) { + console.log( + "DEBUG: " + + msg + + " at " + + this.idx + + ": " + + toHex(this.dataview.buffer.slice(0, this.idx)) + + " " + + toHex(this.dataview.buffer.slice(this.idx)), + ); + } +} + +export function Vec(inner: BinCodeable): BinCodeable { + return { + name: "Vec<" + inner.name + ">", + isValid(value){ + return Array.isArray(value); + }, + encode(bc, val) { + VarUint.encode(bc, val.length); + for (let i = 0; i < val.length; i++) { + inner.encode(bc, val[i]); + } + }, + decode(bc) { + let len = VarUint.decode(bc); + /** @type {any[]} */ + let val: any[] = new Array(len); + for (let i = 0; i < len; i++) { + val[i] = inner.decode(bc); + } + return val; + }, + } +} + +export function Tuple[]>(...inners: T): BinCodeable { + return { + name: "(" + inners.map(t => t.name).join(', ') + ")", + isValid(value){ + return Array.isArray(value); + }, + encode(bc, val) { + for (let i = 0; i < inners.length; i++) { + inners[i].encode(bc, val[i]); + } + }, + decode(bc) { + /** @type {*} */ + let val: any = new Array(inners.length); + for (let i = 0; i < inners.length; i++) { + val[i] = inners[i].decode(bc); + } + return val; + }, + }; +} + +const BincodeMap = function BincodeMap(keyType: BinCodeable, valueType: BinCodeable): BinCodeable> { + return { + name: "Map<" + keyType.name + ", " + valueType.name + ">", + isValid(value){ + return Array.isArray(value); + }, + encode(bc, val) { + VarUint.encode(bc, val.size); + for (const [k, v] of val.entries()) { + keyType.encode(bc, k); + valueType.encode(bc, v); + } + }, + decode(bc) { + let len = VarUint.decode(bc); + const val = new globalThis.Map(); + for (let i = 0; i < len; i++) { + const key = keyType.decode(bc); + const value = valueType.decode(bc); + val.set(key, value); + } + return val; + }, + }; +} + +export { BincodeMap as Map }; + +// Typescript is a bit buggy with conditional, mapped tuple types as rest parameters so this has to be separate +type BinCodeableStructTuple[]> = { + (...data: UnBinCodeable): UnBinCodeable & {readonly $$type: N} + fields: T +} + +function testIt() { + let Test : BinCodeableStructTuple<"Foo", [typeof Uint8, typeof String]> = StructTuple("Foo", Uint8, String); + let Test2 = StructTuple("Foo", Uint8, String); + + let test = Test(1, "hello"); + let test2 = Test2(1, "hello"); +} + +/** + * A BinCodeable type that is a struct with named fields. + */ +type BinCodeableStruct} | BinCodeable[]> = BinCodeable> & + (T extends BinCodeable[] ? BinCodeableStructTuple : + { + (data: UnBinCodeable): UnBinCodeable & {readonly $$type: N} + fields: T + }) + +export function Struct}>(name: N, fields: T): BinCodeableStruct { + /** @type {BinCodeableStruct} */ + // @ts-ignore + const strct: BinCodeableStruct = { + [name]: function(data: T) { + // if (!(this instanceof strct)) { + // return new strct(data); + // } + const instance = Object.create(strct.prototype); + for (const key in fields) { + if (!(key in data) && !fields[key].isValid(undefined)) { + throw new Error("Struct " + name + " missing key: " + key); + } + instance[key] = data[key]; + } + return instance; + } + }[name]; + + strct.prototype = Object.create(Object.prototype, { + constructor: { + enumerable: false, + configurable: true, + writable: true, + value: strct, + }, + "$$type": { + value: name, + writable: false, + enumerable: false, + configurable: false, + }, + }); + + strct.fields = fields; + + strct.isValid = function isValid(value: unknown): boolean{ + if (!value || typeof value !== 'object') return false; + for (const innerKey in fields) { + // @ts-ignore + if (!fields[innerKey].isValid(value[innerKey])) { + return false; + } + } + return true; + } + + strct.encode = {[name+"_encode"]: function(bc: BinCode, val: T) { + for (const innerKey in fields) { + fields[innerKey].encode(bc, val[innerKey]); + } + }}[name+"_encode"] + + strct.decode = function decode(bc: BinCode): T { + /** @type {any} */ + let val: any = {}; + for (const innerKey in fields) { + if (DEBUG) bc._debug(` decoding ${name}.${innerKey} (${fields[innerKey].name})`) + val[innerKey] = fields[innerKey].decode(bc); + if (DEBUG) bc._debug(` decoded ${name}.${innerKey} (${fields[innerKey].name}) to ${val[innerKey]}`) + } + // if (DEBUG) bc._debug(`decoded ${name} to ${JSON.stringify(val)}`) + return strct(val); + } + + return strct; +} + +export function StructTuple[]>(name: N, ...fields: T): BinCodeableStruct { + /** @type {BinCodeableStruct} */ + // @ts-ignore + const strct: BinCodeableStruct = { + [name]: function(this: T, ...data: T) { + if (!(this instanceof strct)) { + return new strct(...data); + } + + // Array.call(this); + + if (data.length !== fields.length) { + throw new Error("Struct " + name + " expected " + fields.length + " fields, got " + data.length); + } + + // const instance = this; + // We have to explicitly set the length property since Array's don't really subclass well + this.length = data.length; + for (const key in fields) { + this[key] = data[key]; + } + // return instance; + } + }[name]; + + strct.prototype = Object.create(Array.prototype, { + constructor: { + enumerable: false, + configurable: true, + writable: true, + value: strct, + }, + "$$type": { + value: name, + writable: false, + enumerable: false, + configurable: false, + }, + }); + + strct.prototype.toJSON = function() { + return Array.from(this) + } + + strct.fields = fields; + + strct.isValid = function isValid(value: unknown): boolean{ + if (!value || typeof value !== 'object') return false; + for (const innerKey in fields) { + // @ts-ignore + if (!fields[innerKey].isValid(value[innerKey])) { + return false; + } + } + return true; + } + + strct.encode = {[name+"_encode"]: function(bc: BinCode, val: T) { + for (let innerKey = 0; innerKey < fields.length; innerKey++) { + fields[innerKey].encode(bc, val[innerKey]); + } + }}[name+"_encode"] + + strct.decode = {[name+"_decode"]: function(bc: BinCode): T { + /** @type {any} */ + let val: any = []; + for (let innerKey = 0; innerKey < fields.length; innerKey++) { + if (DEBUG) bc._debug(` decoding ${name}.${innerKey} (${fields[innerKey].name})`) + val[innerKey] = fields[innerKey].decode(bc); + // if (DEBUG) bc._debug(` decoded ${name}.${innerKey} (${fields[innerKey].name}) to ${JSON.stringify(val[innerKey])}`) + } + // if (DEBUG) bc._debug(`decoded ${name} to ${JSON.stringify(val)}`) + return strct(...val); + }}[name+"_decode"] + + return strct; +} + +/** + * Extract the object type from a Record of BinCodeable types. + */ +type UnBinCodeable} | BinCodeable[]> = { + [k in keyof T]: T[k] extends BinCodeable ? U : never +} + +/** + * Extract the union type from a Record of Variants of Bincodeable types. + */ +type EnumType} | BinCodeable[]}> = { + [k in keyof T]: UnBinCodeable +}[keyof T] + +type EnumVariantStruct}> = { + (data: UnBinCodeable): UnBinCodeable & {[ENUM]: N, [VARIANT]: V, [DISCRIMINANT]: number} + discriminant: number + fields: T +} + +type EnumVariantTuple[]> = { + (...data: UnBinCodeable): UnBinCodeable & {[ENUM]: N, [VARIANT]: V, [DISCRIMINANT]: number} + discriminant: number + fields: T +} + +type EnumVariant[] | {[f: string]: BinCodeable}> = + T extends BinCodeable[]? EnumVariantTuple : + T extends {[f: string]: BinCodeable}? EnumVariantStruct : never; + +type BinCodeableEnum; } | BinCodeable[]; }> = BinCodeable> & { + $$type: {[ENUM]: N}; + variants: T; +} & { [V in keyof T & string]: EnumVariant } + +export const ENUM = Symbol("ENUM") +export const VARIANTS = Symbol("VARIANTS") +export const VARIANT = Symbol("VARIANT") +export const VARIANT_NAME = Symbol("VARIANT_NAME") +export const DISCRIMINANT = Symbol("DISCRIMINANT") + +type MatchFns = {[k in keyof Variants]: (x: Variants[k] extends (data: any) => infer V ? V : never) => R}; +export function match(value: Enum, fns: Enum extends {[VARIANTS]: any} ? MatchFns : never): T { + const anyValue = value as any; + const variantName = anyValue[VARIANT]; + const fn = fns[variantName]; + if (!fn) { + throw new Error("No match for " + variantName); + } + return fn(anyValue) +} + +export function Enum} | BinCodeable[]}>(name: N, definitions: T): BinCodeableEnum { + const enumClass: any = {[name]: function() { + // console.log("DEBUG:", "Enum", name, {this: this}); + }}[name]; + + enumClass.variants = {}; + + Object.defineProperties(enumClass.prototype, { + [ENUM]: { + value: name, + writable: false, + enumerable: false, + configurable: false, + }, + [VARIANTS]: enumClass.variants, + }); + + enumClass.isValid = function isValid(value: unknown): boolean{ + // We need to check that exactly one of the definitions is valid + // if there are multiple valid definitions, the value is ambiguous + let valid = 0; + for (const key in definitions) { + if (enumClass.variants[key].isValid(value)) { + valid += 1; + } + } + return valid == 1; + } + + enumClass.encode = {[name+"_encode"]: function(bc: BinCode, val: EnumType) { + const variant = Object.getPrototypeOf(val).constructor; + const discriminant = variant.discriminant; + VarUint.encode(bc, discriminant); + variant.encode(bc, val); + }}[name+"_encode"] + + enumClass.decode = function decode(bc: BinCode): EnumType { + const discriminant = Number(VarUint.decode(bc)); + const variantName = Object.keys(enumClass.variants)[discriminant]; + if (DEBUG) bc._debug(`decoded ${name} variant: ${discriminant} ${variantName}`) + if (!variantName) + throw new Error( + "Enum " + this.name + " decode failed, bad discriminant: " + discriminant, + ); + + return enumClass.variants[variantName].decode(bc); + } + + let prevDiscriminant = 0; + for (const [variantName, fields] of Object.entries(definitions)) { + const theDiscriminant = (fields as any)[VARIANT_DISCRIMINANT] ?? prevDiscriminant; + prevDiscriminant = theDiscriminant + 1; + + const variantClassName = name + '.' + variantName; + + const fieldsKeys = Object.keys(fields); + const numFields = fieldsKeys.length; + const isTuple = Array.isArray(fields); + + /** @type {*} */ + const variantClass: any = isTuple ? { + [variantClassName]: function(...data: any) { + // console.log("DEBUG:", "EnumVariant", variantName, {this: this}); + if (!(this instanceof variantClass)) { + // @ts-ignore + return new variantClass(...data); + } + + enumClass.call(this); + + if (data.length != numFields) { + throw new Error("Variant " + name + " expected " + numFields + " fields, got " + data.length + ": " + JSON.stringify(data)); + } + + for (let i = 0; i < numFields; i++) { + this[i] = data[i]; + } + + // console.log("DEBUG:", "EnumVariant done", variantName, this); + } + }[variantClassName] + : +{ + [variantClassName]: function(data: any) { + // console.log("DEBUG:", "EnumVariant", variantName, {this: this}); + if (!(this instanceof variantClass)) { + // @ts-ignore + return new variantClass(data); + } + + enumClass.call(this); + + for (const key in fields) { + if (!(key in data)) { + throw new Error("Struct " + name + " missing key: " + key); + } + this[key] = data[key]; + } + + // console.log("DEBUG:", "EnumVariant done", variantName, this); + } + }[variantClassName]; + + // console.log('DEBUG:', variantClass, variantClass.prototype, Object.create(variantClass.prototype)); + + variantClass.prototype = Object.create(enumClass.prototype, { + constructor: { + enumerable: false, + configurable: true, + writable: true, + value: variantClass, + }, + [VARIANT]: { + value: variantName, + writable: false, + enumerable: false, + configurable: false, + }, + [DISCRIMINANT]: { + value: theDiscriminant, + writable: false, + enumerable: false, + configurable: false, + }, + }); + + // Object.defineProperty(variantClass.prototype, 'constructor', { + // enumerable: false, + // configurable: true, + // writable: true, + // value: variantClass, + // }); + // console.log('DEBUG:', variantClass, variantClass.prototype, Object.create(variantClass.prototype)) + + // console.log('DEBUG:', 'vc.p', Object.getOwnPropertyDescriptors(variantClass.prototype)); + // console.log('DEBUG:', 'vc.p.p', Object.getOwnPropertyDescriptors(enumClass.prototype)); + + variantClass.discriminant = theDiscriminant; + + variantClass.prototype.toJSON = function() { + if (numFields == 0) { + return ''+theDiscriminant; + // return variantName; + } + if (isTuple) { + if (numFields == 1) { + // return {[variantName]: this[0]}; + return {$version: ''+theDiscriminant, ...this[0]} + } + return {[variantName]: Array.from(this)} + } + return {$version: ''+theDiscriminant, ...this} + // return {[variantName]: {...this}} + } + + const variantStruct = isTuple ? StructTuple(name + '.' + variantName, ...fields) : Struct(name + '.' + variantName, fields); + + variantClass.isValid = function isValid(val: any) { + return variantStruct.isValid(val); + } + + variantClass.decode = {[name+variantName+"_decode"]: function(bc: BinCode) { + const data = variantStruct.decode(bc); + // if (DEBUG) bc._debug(`decoded ${name}.${variantName} to ${JSON.stringify(data)}`) + if (isTuple) + return variantClass(...data as any); + else + return variantClass(data); + }}[name+variantName+"_decode"] + + variantClass.encode = {[name+variantName+"_encode"]: function(bc: BinCode, val: any) { + return variantStruct.encode(bc, val); + }}[name+variantName+"_encode"] + + enumClass[variantName] = variantClass; + enumClass.variants[variantName] = variantClass; + } + + // console.log("Done constructing Enum", name, enumClass); + + return enumClass; +} + +const VARIANT_DISCRIMINANT = Symbol("VARIANT_DISCRIMINANT") +// Wrap the variant in this to set a custom discriminant +export function VariantDiscriminant(v: T, discriminant: number): T { + (v as any)[VARIANT_DISCRIMINANT] = discriminant; + return v; +} + +export const TODO: BinCodeable = { + name: "TODO", + // @ts-ignore + isValid(value){ + throw new Error("TODO"); + }, + // @ts-ignore + encode(bc, num) { + throw new Error("TODO"); + }, + // @ts-ignore + decode(bc) { + throw new Error("TODO"); + }, +}; + +export const Nothing: BinCodeable = { + name: "Nothing", + isValid(value){ + return value === undefined; + }, + encode(bc, num) {}, + decode(bc) {}, +}; + +export function Option(inner: BinCodeable) { + let name = `Option<${inner.name}>`; + return Object.assign({[name]: function(data: T | undefined) { + return data + }}[name], + { + isValid(data: unknown) { + if (data === null || data === undefined) return true; + return inner.isValid(data); + }, + encode(bc: BinCode, data: T | undefined | null) { + if (data == null) { + Uint8.encode(bc, 0); + } else { + Uint8.encode(bc, 1); + inner.encode(bc, data); + } + }, + decode(bc: BinCode): T | undefined { + const disc = Uint8.decode(bc); + if (disc == 0) { + return; + } else if (disc == 1) { + return inner.decode(bc); + } + throw new Error("Bad discriminant for " + name + ": " + disc); + } + }) +} + +export function Lazy(name: string, makeBincodeable: () => BinCodeable): BinCodeable & { unlazy: () => BinCodeable } { + /** @type {BinCodeable | undefined} */ + let bincodeable: BinCodeable | undefined = undefined; + function unlazy() { + if (!bincodeable) bincodeable = makeBincodeable(); + return bincodeable; + } + return { + name, + unlazy, + isValid(value){ + return unlazy().isValid(value); + }, + encode(bc, val) { + unlazy().encode(bc, val); + }, + decode(bc) { + return unlazy().decode(bc); + }, + }; +} + +Lazy.unlazy = function unlazy(val: BinCodeable): BinCodeable { + // @ts-ignore + if ('unlazy' in val) return val.unlazy(); + return val; +} + +export const Null: BinCodeable = { + name: "Null", + isValid(value){ + return value === null || value === undefined; + }, + encode(bc, num) {}, + decode(bc) { + return null; + }, +}; + +// /** +// * Constant expects to be a single number, but does not encode or decode any bytes. +// * @template T +// * @param {T} value +// * @returns {BinCodeable & {value: T}} +// */ +// export function Constant(value) { +// return { +// name: "Constant<" + value + ">", +// value, +// // @ts-ignore +// isValid(val){ +// return val === value; +// }, +// // @ts-ignore +// encode(bc, num) { +// }, +// // @ts-ignore +// decode(bc) { +// return value; +// }, +// }; +// } + +export const Uint8: BinCodeable = { + name: "Uint8", + isValid(value){ + return typeof value === "number" && value >= 0 && value <= 0xFF && (value | 0) === value; + }, + encode(bc, num) { + const idx = bc._idxThenAddExtend(1) + bc.dataview.setUint8(idx, num); + }, + decode(bc) { + return bc.dataview.getUint8(bc._idxThenAdd(1)); + }, +}; + +export const Uint16: BinCodeable = { + name: "Uint16", + isValid(value){ + return typeof value === "number" && value >= 0 && value <= 0xFFFF && (value | 0) === value; + }, + encode(bc, num) { + bc.dataview.setUint16(bc._idxThenAddExtend(2), num, LITTLE_ENDIAN); + }, + decode(bc) { + return bc.dataview.getUint16(bc._idxThenAdd(2), LITTLE_ENDIAN); + }, +}; + +export const Uint32: BinCodeable = { + name: "Uint32", + isValid(value){ + return typeof value === "number" && value >= 0 && value <= 0xFFFFFFFF && (value | 0) === value; + }, + encode(bc, num) { + bc.dataview.setUint32(bc._idxThenAddExtend(4), num, LITTLE_ENDIAN); + }, + decode(bc) { + return bc.dataview.getUint32(bc._idxThenAdd(4), LITTLE_ENDIAN); + }, +}; + +export const Uint64: BinCodeable = { + name: "Uint64", + isValid(value){ + if (typeof value === "bigint") return value >= 0n && value <= 0xFFFFFFFFFFFFFFFFn; + return typeof value === "number" && value >= 0 && (value | 0) === value; + }, + encode(bc, num) { + const idx = bc._idxThenAddExtend(8); + bc.dataview.setBigUint64(idx, num, LITTLE_ENDIAN); + }, + decode(bc) { + return bc.dataview.getBigUint64(bc._idxThenAdd(8), LITTLE_ENDIAN); + }, +}; + +export const Uint128: BinCodeable = { + name: "Uint128", + isValid(value){ + if (typeof value === "bigint") return value >= 0n && value <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFn; + return typeof value === "number" && value >= 0 && (value | 0) === value; + }, + encode(bc, num) { + let a = BigInt.asUintN(64, num); + let b = BigInt.asUintN(64, num >> 64n); + // TODO: This probably isn't right when switching endian + let idx = bc._idxThenAddExtend(8) + bc.dataview.setBigUint64(idx, a, LITTLE_ENDIAN); + idx = bc._idxThenAddExtend(8) + bc.dataview.setBigUint64(idx, b, LITTLE_ENDIAN); + }, + decode(bc) { + // TODO: This probably isn't right when switching endian + let a = bc.dataview.getBigUint64(bc._idxThenAdd(8), LITTLE_ENDIAN); + let b = bc.dataview.getBigUint64(bc._idxThenAdd(8), LITTLE_ENDIAN); + return BigInt(a.toString() + b.toString()); + }, +}; + +export const Int8: BinCodeable = { + name: "Int8", + isValid(value){ + return typeof value === "number" && value >= -0x8F && value <= 0x8F && (value | 0) === value; + }, + encode(bc, num) { + bc.dataview.setInt8(bc._idxThenAddExtend(1), num); + }, + decode(bc) { + return bc.dataview.getInt8(bc._idxThenAdd(1)); + }, +}; + +/** @type {BinCodeable} */ +export const Int16: BinCodeable = { + name: "Int16", + isValid(value){ + return typeof value === "number" && value >= -0x8FFF && value <= 0x8FFF && (value | 0) === value; + }, + encode(bc, num) { + bc.dataview.setInt16(bc._idxThenAddExtend(2), num, LITTLE_ENDIAN); + }, + decode(bc) { + return bc.dataview.getInt16(bc._idxThenAdd(2), LITTLE_ENDIAN); + }, +}; + +export const Int32: BinCodeable = { + name: "Int32", + isValid(value){ + return typeof value === "number" && value >= -0x8FFFFFFF && value <= 0x8FFFFFFF && (value | 0) === value; + }, + encode(bc, num) { + bc.dataview.setInt32(bc._idxThenAddExtend(4), num, LITTLE_ENDIAN); + }, + decode(bc) { + return bc.dataview.getInt32(bc._idxThenAdd(4), LITTLE_ENDIAN); + }, +}; + +export const Int64: BinCodeable = { + name: "Int64", + isValid(value){ + if (typeof value === "bigint") return value >= -0x8FFFFFFFFFFFFFFFn && value <= 0x8FFFFFFFFFFFFFFFn; + return typeof value === "number" && value >= 0 && (value | 0) === value; + }, + encode(bc, num) { + bc.dataview.setBigInt64(bc._idxThenAddExtend(8), num, LITTLE_ENDIAN); + }, + decode(bc) { + return bc.dataview.getBigInt64(bc._idxThenAdd(8), LITTLE_ENDIAN); + }, +}; + +export const Int128: BinCodeable = { + name: "Int128", + isValid(value){ + if (typeof value === "bigint") return value >= -0x8FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFn && value <= 0x8FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFn; + return typeof value === "number" && value >= 0 && (value | 0) === value; + }, + encode(bc, num) { + let a = BigInt.asIntN(64, num); + let b = BigInt.asIntN(64, num >> 64n); + // TODO: this probably isn't right when switching endian? + bc.dataview.setBigInt64(bc._idxThenAddExtend(8), a, LITTLE_ENDIAN); + bc.dataview.setBigInt64(bc._idxThenAddExtend(8), b, LITTLE_ENDIAN); + }, + decode(bc) { + // TODO: this probably isn't right when switching endian? + let a = bc.dataview.getBigInt64(bc._idxThenAdd(8), LITTLE_ENDIAN); + let b = bc.dataview.getBigInt64(bc._idxThenAdd(8), LITTLE_ENDIAN); + return BigInt(a.toString() + b.toString()); + }, +}; + +export const Float64: BinCodeable = { + name: "Float64", + isValid(value){ + return typeof value === "number"; + }, + encode(bc, num) { + bc.dataview.setFloat64(bc._idxThenAddExtend(8), num, true); + }, + decode(bc) { + return bc.dataview.getFloat64(bc._idxThenAdd(8)); + }, +}; + +function _zigzag(u: bigint) { + if (u == 0n) return 0n; + + // To avoid the edge case of Signed::min_value() + // !n is equal to `-n - 1`, so this is: + // !n * 2 + 1 = 2(-n - 1) + 1 = -2n - 2 + 1 = -2n - 1 + if (u < 0) return (-u - 1n) * 2n - 1n; + if (u > 0) return u * 2n; + throw new Error("_zigzag error: " + u); +} + +function _unzigzag(u: bigint) { + if (u % 2n == 0n) { + // positive number + return u >> 1n; + } else { + // negative number + // !m * 2 + 1 = u + // !m * 2 = u - 1 + // !m = (u - 1) / 2 + // m = !((u - 1) / 2) + // since we have u is odd, we have floor(u / 2) = floor((u - 1) / 2) + return (-u >> 1n) - 1n; + } +} + +function _fitsInNumber(value: bigint) { + return value <= Number.MAX_SAFE_INTEGER && value >= Number.MIN_SAFE_INTEGER; +} + +export const VarUint: BinCodeable = { + name: "VarUint", + isValid(value){ + if (typeof value === "bigint") return value >= 0n && value <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFn; + return typeof value === "number" && value >= 0 && (value | 0) === value; + }, + encode(bc, num) { + if (typeof num === "number" && !Number.isInteger(num)) + throw new Error("VarUint.encode: not an integer:" + num); + if (num < 0) throw new Error("VarUint.encode: negative:" + num); + + // console.log('DEBUG:', 'VarUint.encode', num); + + if (num < 251) Uint8.encode(bc, Number(num)); + else if (251 <= num && num < 2 ** 16) { + Uint8.encode(bc, 251); + Uint16.encode(bc, Number(num)); + } else if (2 ** 16 <= num && num < 2 ** 32) { + Uint8.encode(bc, 252); + Uint32.encode(bc, Number(num)); + } + // TODO: Bignum for the rest of these + else if (2 ** 32 <= num && num < 2 ** 64) { + Uint8.encode(bc, 253); + Uint64.encode(bc, BigInt(num)); + } else if (2 ** 64 <= num && num < 2 ** 128) { + Uint8.encode(bc, 254); + Uint128.encode(bc, BigInt(num)); + } else { + throw new Error("VarUint.encode error: " + num); + } + }, + + decode(bc) { + let u = BigInt(Uint8.decode(bc)); + if (u < 251) { + } else if (u == 251n) u = BigInt(Uint16.decode(bc)); + else if (u == 252n) u = BigInt(Uint32.decode(bc)); + // TODO: Bignum for the rest of these + else if (u == 253n) u = Uint64.decode(bc); + else if (u == 254n) u = Uint128.decode(bc); + else throw new Error("VarUint.decode error: " + u); + + if (_fitsInNumber(u)) return Number(u); + return u; + }, +}; + +export const VarInt: BinCodeable = { + name: "VarInt", + isValid(value){ + if (typeof value === "bigint") return value >= -0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFn && value <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFn; + return typeof value === "number" && (value | 0) === value; + }, + encode(bc, num) { + if (typeof num === "number" && (num | 0) !== num) + throw new Error("VarInt.encode: not an integer:" + num); + + let bnum = BigInt(num); + bnum = _zigzag(bnum); + if (bnum < 251) Uint8.encode(bc, Number(bnum)); + else if (251 <= bnum && bnum < 2 ** 16) { + Uint8.encode(bc, 251); + Uint16.encode(bc, Number(bnum)); + } else if (2 ** 16 <= bnum && bnum < 2 ** 32) { + Uint8.encode(bc, 252); + Uint32.encode(bc, Number(bnum)); + } + // TODO: Bignum for the rest of these + else if (2 ** 32 <= bnum && bnum < 2 ** 64) { + Uint8.encode(bc, 253); + Uint64.encode(bc, bnum); + } else if (2 ** 64 <= bnum && bnum < 2 ** 128) { + Uint8.encode(bc, 254); + Uint128.encode(bc, bnum); + } else { + throw new Error("VarInt.encode error: " + bnum); + } + }, + + decode(bc) { + let u = BigInt(Uint8.decode(bc)); + if (u < 251) { + } else if (u == 251n) u = BigInt(Uint16.decode(bc)); + else if (u == 252n) u = BigInt(Uint32.decode(bc)); + // TODO: Bignum for the rest of these + else if (u == 253n) u = Uint64.decode(bc); + else if (u == 254n) u = Uint128.decode(bc); + else throw new Error("VarInt.decode error: " + u); + + u = _unzigzag(u); + if (_fitsInNumber(u)) return Number(u); + return u; + }, +}; + +export const Bool: BinCodeable = { + name: "Bool", + isValid(value){ + return typeof value === "boolean"; + }, + encode(bc, val) { + return Uint8.encode(bc, val ? 1 : 0); + }, + decode(bc) { + const val = Uint8.decode(bc); + if (val !== 0 && val !== 1) throw new Error("Bool decode error: " + val); + return !!val; + }, +}; + +export const Bytes: BinCodeable = { + name: "Bytes", + isValid(value){ + return value instanceof Uint8Array; + }, + encode(bc, val) { + VarUint.encode(bc, val.length); + let idx = bc._idxThenAddExtend(val.length); + new Uint8Array(bc.dataview.buffer).set(val, idx) + }, + decode(bc) { + let length = Number(VarUint.decode(bc)); + let idx = bc._idxThenAdd(length); + return new Uint8Array(bc.dataview.buffer, idx, length); + }, +}; + +export const String: BinCodeable = { + name: "String", + isValid(value){ + return typeof value === "string"; + }, + encode(bc, val) { + const bytes = new TextEncoder().encode(val); + Bytes.encode(bc, bytes); + }, + decode(bc) { + const bytes = Bytes.decode(bc); + return new TextDecoder().decode(bytes); + }, +}; + +export function FixedBytes(length: number): BinCodeable { + return { + name: "FixedBytes<" + length + ">", + isValid(value){ + return value instanceof Uint8Array; + }, + encode(bc, val) { + if (val.length !== length) { + throw new Error(`Expected exactly ${length} bytes, got ${val.length}`) + } + let idx = bc._idxThenAddExtend(length); + let bytes = new Uint8Array(bc.dataview.buffer); + // console.log(`DEBUG val, idx`, val, idx); + bytes.set(val, idx); + }, + decode(bc) { + let idx = bc._idxThenAdd(length); + return new Uint8Array(bc.dataview.buffer, idx, length); + }, + }; +} + + + +/** + * @template T + * @param {BinCodeable} inner + * @returns {BinCodeable} + */ +export function NotSignable(inner: BinCodeable): BinCodeable { + return { + name: "NotSignable<" + inner.name + ">", + isValid(value) { + // TODO: Need options.signable to be passed in + return inner.isValid(value) + }, + encode(bc, value) { + // console.log(`DEBUG NotSignable<${inner.name}>`, bc, value) + if (!bc.options.signable) { + if (value === undefined) { + throw new Error("NotSignable.encode: undefined value") + } + inner.encode(bc, value) + } + }, + decode(bc) { + if (!bc.options.signable) { + return inner.decode(bc) + } + }, + } +} + +/** + * @template T + * @param {BinCodeable} inner + */ +export function Range(inner: BinCodeable) { + return Tuple(inner, inner) +} + +export const Ipv4Addr = Struct("Ipv4Addr", { + octets: FixedBytes(4), +}) + +export const SocketAddrV4 = Struct("SocketAddrV4", { + ip: Ipv4Addr, + port: Uint16, +}) + +export const Ipv6Addr = Struct("Ipv6Addr", { + octets: FixedBytes(16), +}) + +export const SocketAddrV6 = Struct("SocketAddrV6", { + ip: Ipv6Addr, + port: Uint16, + flowinfo: Uint32, + scope_id: Uint32, +}) + +export const SocketAddr = Enum("SocketAddr", { + /** An IPv4 socket address. */ + V4: [SocketAddrV4], + /** An IPv6 socket address. */ + V6: [SocketAddrV6], +}) + +export function typedArrayToBuffer(array: Uint8Array): ArrayBuffer { + return (array.buffer as ArrayBuffer).slice(array.byteOffset, array.byteLength + array.byteOffset) +} diff --git a/src/bincode_types.ts b/src/bincode_types.ts new file mode 100644 index 0000000..e280b7c --- /dev/null +++ b/src/bincode_types.ts @@ -0,0 +1,37 @@ +// import DashTx from 'dashtx' +import * as Bincode from './bincode.ts' + + +export type Option = T | null | undefined; + +/** + * FixedBytes is essentially a Uint8Array but when encoded it throws an error + * if the length doesn't match, and is not length prefixed. + * Equivalent to `[u8; N]` in Rust. + */ +export type FixedBytes = Uint8Array; + +export type Hash = Uint8Array; //FixedBytes<32>; + +export type SocketAddr = typeof Bincode.SocketAddr extends Bincode.BinCodeable ? T : never; + +export const EncodeOnlyRawBytes = Object.assign( + function EncodeOnlyRawBytes(data: Uint8Array) { + return data + }, + { + // name: 'EncodeOnlyRawBytes', + isValid(x: unknown) { + return x instanceof Uint8Array + }, + encode(bc: Bincode.BinCode, x: Uint8Array) { + new Uint8Array(bc.dataview.buffer).set(x, bc._idxThenAddExtend(x.byteLength)) + }, + decode(bc: Bincode.BinCode) { + throw new Error("Unable to decode an EncodeOnlyRawBytes (how many bytes to decode?)"); + } + }, +) + +export const Transaction = EncodeOnlyRawBytes; +export type Transaction = Uint8Array; diff --git a/src/cli.ts b/src/cli.ts new file mode 100644 index 0000000..bf9f2e1 --- /dev/null +++ b/src/cli.ts @@ -0,0 +1,85 @@ +// import Dotenv from "dotenv"; +import DashPhrase from "dashphrase"; +import DashHd from "dashhd"; +import type { HDWallet } from "dashhd"; +import * as QRCode from "./_qr.js"; +import * as DashTx from "dashtx"; + +if (typeof process === 'object') { + import("dotenv").then(dotenv => dotenv.default.config({ path: ".env" })); +} + +export async function loadWallet(walletPhrase: string, walletSalt: string): Promise { + let coinType = 5; + let testnet = true; // TODO + if (testnet) { + coinType = 1; + } + + if (!walletPhrase) { + console.error(""); + console.error("ERROR"); + console.error(" 'DASH_WALLET_PHRASE' is not set"); + console.error(""); + console.error("SOLUTION"); + let newPhrase = await DashPhrase.generate(); + console.error(` echo 'DASH_WALLET_PHRASE="${newPhrase}"' >> .env`); + console.error(` echo 'DASH_WALLET_SALT=""' >> .env`); + console.error(""); + process.exit(1); + } + + let seed = await DashPhrase.toSeed(walletPhrase, walletSalt); + let walletKey = await DashHd.fromSeed(seed); + + return walletKey; +} + +export function promptQr(fundingAddress: string, needSats: number) { + let dashAmount = DashTx.toDash(needSats); + let content = `dash:${fundingAddress}?amount=${dashAmount}`; + let ascii = QRCode.ascii(content, { + indent: 3, + padding: 4, + width: 256, + height: 256, + color: "#000000", + background: "#ffffff", + ecl: "M", + }); + console.error(); + console.error(`ERROR`); + console.error( + ` not enough DASH at funding address (including instant send)`, + ); + console.error(); + console.error(`SOLUTION`); + console.error(` send ${dashAmount} to ${fundingAddress}`); + console.error(``); + console.error('\n'+ascii); + console.error(); +} + +// /** +// * Reads a hex file as text, stripping comments (anything including and after a non-hex character), removing whitespace, and joining as a single string +// */ +// export async function readHex(path: string) { +// let text = await Fs.readFile(path, "utf8"); +// let lines = text.split("\n"); +// let hexes = []; +// for (let line of lines) { +// line = line.replace(/\s/g, ""); +// line = line.replace(/[^0-9a-f].*/i, ""); +// hexes.push(line); +// } + +// let hex = hexes.join(""); +// return hex; +// } + +// export async function readWif(path: string) { +// let wif = await Fs.readFile(path, "utf8"); +// wif = wif.trim(); + +// return wif; +// } diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 0000000..6b3909b --- /dev/null +++ b/src/constants.ts @@ -0,0 +1,32 @@ + +export const RPC_AUTH_URL = "https://api:null@trpc.digitalcash.dev"; +const zmqUuid = crypto.randomUUID(); +export const ZMQ_AUTH_URL = `https://tzmq.digitalcash.dev/api/zmq/eventsource/${zmqUuid}`; +export const NODE_ADDRESS = "https://seed-2.testnet.networks.dash.org:1443" + +export const L1_VERSION_PLATFORM = 3; +// const L1_VERSION_PLATFORM = 0; +export const TYPE_ASSET_LOCK = 8; +export const VERSION_ASSET_LOCK = 1; +// const L2_VERSION_PLATFORM = 1; // actually constant "0" ?? +// const ST_CREATE_IDENTITY = 2; + +export const VERSIONS_TESTNET = ["8c", "ef"] as const; + +export const KEY_TYPES = { + 0: "ECDSA_SECP256K1", + ECDSA_SECP256K1: 0, +}; + +export const NETWORK = "testnet"; +export const COIN_TYPE = NETWORK == "testnet" ? 1 : 5; + +// const IDENTITY_ECDSA_PATH = (() => { +// // m/purpose'/coin_type'/feature'/subfeature'/keytype'/identityindex'/keyindex' +// // ex: m/9'/5'/5'/0'/0'// +// const PURPOSE_DIP13 = 9; +// const FEATURE_ID = 5; +// const SUBFEATURE_KEY = 0; +// const KEY_TYPE = KEY_TYPES.ECDSA_SECP256K1; +// return `m/${PURPOSE_DIP13}'/${COIN_TYPE}'/${FEATURE_ID}'/${SUBFEATURE_KEY}'/${KEY_TYPE}'`; +// })(); diff --git a/src/dash_bincode.js b/src/dash_bincode.js new file mode 100644 index 0000000..4bb917b --- /dev/null +++ b/src/dash_bincode.js @@ -0,0 +1,212 @@ +import { Bool, Bytes, Enum, FixedBytes, Lazy, Struct, Uint16, Uint32, Uint64, Uint8, VarUint, Vec, Option, String, NotSignable } from "./src/bincode" +/** @import {BinCodeable} from './src/bincode' */ + +// export const IdentityCreateTransitionV0 = Lazy(() => +// Struct("IdentityCreateTransitionV0", { +// // $version: Constant("0"), +// // // When signing, we don't sign the signatures for keys +// // #[platform_signable(into = "Vec")] +// public_keys: Vec(IdentityPublicKeyInCreation), +// asset_lock_proof: RawAssetLockProof, +// user_fee_increase: UserFeeIncrease, +// // #[platform_signable(exclude_from_sig_hash)] +// signature: NotSignable(BinaryData), +// // #[cfg_attr(feature = "state-transition-serde-conversion", serde(skip))] +// // #[platform_signable(exclude_from_sig_hash)] +// identity_id: NotSignable(Identifier), +// }) +// ) + +// export const IdentityCreateTransition = Enum("IdentityCreateTransition", { +// 0: IdentityCreateTransitionV0, +// }) + +// export const KeyID = VarUint +// export const Identifier = FixedBytes(32) +// export const BinaryData = Bytes +// export const UserFeeIncrease = VarUint //Uint16; +// export const TimestampMillis = VarUint //Uint64; + +// export const KeyType = VarUint // enum +// export const KeyType_values = [ +// "ECDSA_SECP256K1", +// "BLS12_381", +// "ECDSA_HASH160", +// "BIP13_SCRIPT_HASH", +// "EDDSA_25519_HASH160", +// ] + +// export const Purpose = VarUint // enum +// export const Purpose_values = [ +// "AUTHENTICATION", +// "ENCRYPTION", +// "DECRYPTION", +// "TRANSFER", +// "SYSTEM", +// "VOTING", +// ] + +// export const SecurityLevel = VarUint // enum +// export const SecurityLevel_values = ["MASTER", "CRITICAL", "HIGH", "MEDIUM"] + +// export const ContractBounds0 = Struct("ContractBounds0", { +// id: Identifier, +// }) + +// export const ContractBounds1 = Struct("ContractBounds1", { +// id: Identifier, +// document_type_name: String, +// }) + +// export const ContractBounds = Enum("ContractBounds", { +// 0: ContractBounds0, +// 1: ContractBounds1, +// }) + +// export const IdentityPublicKeyInCreationV0 = Struct("IdentityPublicKeyInCreationV0", { +// id: KeyID, +// type: KeyType, +// purpose: Purpose, +// security_level: SecurityLevel, +// contract_bounds: Option(ContractBounds), +// read_only: Bool, +// data: BinaryData, +// // /// The signature is needed for ECDSA_SECP256K1 Key type and BLS12_381 Key type +// // #[platform_signable(exclude_from_sig_hash)] +// signature: NotSignable(BinaryData), +// }) + +// export const IdentityPublicKeyInCreation = Enum("IdentityPublicKeyInCreation", { +// 0: IdentityPublicKeyInCreationV0, +// }) + +// export const Txid = FixedBytes(32) +// export const CycleHash = FixedBytes(32) +// export const BLSSignature = FixedBytes(96) +// export const ScriptBuf = Bytes + +// export const OutPoint = Struct("OutPoint", { +// txid: Txid, +// vout: Uint32, +// }) + +// export const InstantLock = Struct("InstantLock", { +// version: Uint8, +// inputs: Vec(OutPoint), +// txid: Txid, +// cyclehash: CycleHash, +// signature: BLSSignature, +// }) + +// export const Witness = Struct("Witness", { +// content: Bytes, +// witness_elements: Uint64, +// indices_start: Uint64, +// }) + +// export const TxIn = Struct("TxIn", { +// previous_output: OutPoint, +// script_sig: ScriptBuf, +// sequence: Uint32, +// witness: Witness, +// }) + +// export const TxOut = Struct("TxOut", { +// value: Uint64, +// script_pubkey: ScriptBuf, +// }) + +// export const TransactionPayload = Enum("TransactionPayload", { +// // TODO - we have the normal layer 1 payload already +// }) + +// export const Transaction = Struct("Transaction", { +// version: Uint16, +// lock_time: Uint32, +// input: Vec(TxIn), +// output: Vec(TxOut), +// special_transaction_payload: Option(TransactionPayload), +// }) + +// export const InstantAssetLockProof = Struct("InstantAssetLockProof", { +// instant_lock: InstantLock, +// transaction: Transaction, +// output_index: Uint32, +// }) + +// export const RawInstantLockProof = Struct("RawInstantLockProof", { +// instant_lock: BinaryData, +// transaction: BinaryData, +// output_index: VarUint, //Uint32, +// }) + +// export const ChainAssetLockProof = Struct("ChainAssetLockProof", { +// core_chain_locked_height: Uint32, +// out_point: OutPoint, +// }) + +// export const AssetLockProof = Enum("AssetLockProof", { +// 0: InstantAssetLockProof, +// 1: ChainAssetLockProof, +// }) + +// export const RawAssetLockProof = Enum("RawAssetLockProof", { +// 0: RawInstantLockProof, +// 1: ChainAssetLockProof, +// }) + +// export const IdentityPublicKeyV0 = Struct("IdentityPublicKeyV0", { +// id: KeyID, +// purpose: Purpose, +// security_level: SecurityLevel, +// contract_bounds: Option(ContractBounds), +// type: KeyType, +// read_only: Bool, +// data: BinaryData, +// disabled_at: Option(TimestampMillis), +// }) + +// export const IdentityPublicKey = Enum("IdentityPublicKey", { +// 0: IdentityPublicKeyV0, +// }) + +/** + * This is a JSON.stringify replacer that converts keys to camelCase + * and Uint8Array to regular Array to match what to_json* does. + * @param {string} key + * @param {any} value + */ +function jsonCamelCaseReplacer(key, value) { + if (value instanceof Uint8Array) { + return Array.from(value) + } + if (value && typeof value === "object") { + /** @type {any} */ + let replacement = {} + for (let k of Object.keys(value)) { + let newkey = k.replace(/_[a-z]/g, (val) => val[1].toUpperCase()) + replacement[newkey] = value[k] + } + return replacement + } + return value +} +/** + * @param {any} value + */ +export function toJsonCamelCase(value) { + return JSON.stringify(value, jsonCamelCaseReplacer) +} + +// // TODO: Implement all the other transitions +// export const StateTransition = Enum("StateTransition", { +// 0: DataContractCreateTransition, //DataContractCreate(DataContractCreateTransition), +// // 1: DataContractUpdateTransition, //DataContractUpdate(DataContractUpdateTransition), +// // 2: DocumentsBatchTransition, //DocumentsBatch(DocumentsBatchTransition), +// 3: IdentityCreateTransition, //IdentityCreate(IdentityCreateTransition), +// // 4: IdentityTopUpTransition, //IdentityTopUp(IdentityTopUpTransition), +// // 5: IdentityCreditWithdrawalTransition, //IdentityCreditWithdrawal(IdentityCreditWithdrawalTransition), +// // 6: IdentityUpdateTransition, //IdentityUpdate(IdentityUpdateTransition), +// // 7: IdentityCreditTransferTransition, //IdentityCreditTransfer(IdentityCreditTransferTransition), +// // 8: MasternodeVoteTransition, //MasternodeVote(MasternodeVoteTransition), +// }) \ No newline at end of file diff --git a/src/dashhd-utils.ts b/src/dashhd-utils.ts new file mode 100644 index 0000000..7ebc2c4 --- /dev/null +++ b/src/dashhd-utils.ts @@ -0,0 +1,231 @@ +// import DashHd from "dashhd"; +// import type { HDKey } from "dashhd"; + +// // https://github.com/dashpay/dips/blob/master/dip-0009.md +// const PURPOSE_FEATURE_PATHS = "9'"; // DIP9 +// // https://github.com/dashpay/dips/blob/master/dip-0013.md +// const FEATURE_IDENTITY = "5'"; // DIP13 +// // https://github.com/satoshilabs/slips/blob/master/slip-0044.md +// const COIN_TYPE_DASH = "5'"; // SLIP44 +// const COIN_TYPE_TESTNET = "1'"; // SLIP44 +// const SUB_FEATURE_AUTH = "0'"; // DIP13 +// const KEY_TYPE_ECDSA = "0'"; // DIP13 +// const KEY_TYPE_BLS = "1'"; // DIP13 +// const SUB_FEATURE_REG = "1'"; // DIP13 +// const SUB_FEATURE_TOPUP = "2'"; // DIP13 + +export type HDPathSegment = number | `${number}` | `${number}'`; + +export enum Purpose { + FeaturePaths = "9'", +} + +export enum CoinType { + Mainnet = "5'", + Testnet = "1'", +} + +export enum Feature { + Identity = "5'", +} + +export enum SubFeature { + Auth = "0'", + Reg = "1'", + Topup = "2'", +} + +export enum KeyType { + ECDSA = "0'", + BLS = "1'", +} + + + +// 0=m/1=purpose'/2=coin-type'/3=feature'/4=sub-feature'/5=identity-index +export function makeHDKeyPath(coinType: CoinType, feature: Feature, subfeature: SubFeature, identityIndex: number, subkey?: HDPathSegment) { + let path = `m/${Purpose.FeaturePaths}/${coinType}/${feature}/${subfeature}/${identityIndex}` + if (subkey != undefined) { + path += `/${subkey}` + } + return path +} + + // `an identity wallet identity auth path must be in the form \`m/9'//5'/0'//' where coin-type is 5' (DASH mainnet) or 1' (testnet), key-type is 0' (ECDSA) or 1' (BLS), and identity index must have a trailing apostrophe`, +export function makeIdentityAuthPath(coinType: CoinType, keyType: KeyType, identityIndex: number): string { + let path = `m/${Purpose.FeaturePaths}/${coinType}/${Feature.Identity}/${SubFeature.Auth}/${keyType}/${identityIndex}'` + // if (subkey != undefined) { + // path += `/${subkey}` + // } + return path +} + +// m/9'//5'/ +// const PREFIX_IDENT = `m/${PURPOSE_FEATURE_PATHS}/${COIN_TYPE_DASH}/${FEATURE_IDENTITY}`; +// const PREFIX_IDENT_TESTNET = `m/${PURPOSE_FEATURE_PATHS}/${COIN_TYPE_TESTNET}/${FEATURE_IDENTITY}`; +// const PREFIX_AUTH = `${PREFIX_IDENT}/${SUB_FEATURE_AUTH}/${KEY_TYPE_ECDSA}`; +// const PREFIX_AUTH_TESTNET = `${PREFIX_IDENT_TESTNET}/${SUB_FEATURE_AUTH}/${KEY_TYPE_ECDSA}`; +// const PREFIX_REG = `${PREFIX_IDENT}/${SUB_FEATURE_REG}`; +// const PREFIX_REG_TESTNET = `${PREFIX_IDENT_TESTNET}/${SUB_FEATURE_REG}`; +// const PREFIX_TOPUP = `${PREFIX_IDENT}/${SUB_FEATURE_TOPUP}`; +// const PREFIX_TOPUP_TESTNET = `${PREFIX_IDENT_TESTNET}/${SUB_FEATURE_TOPUP}`; + +// /** +// * Returns the Identity Auth Wallet, which can be used to derive Identity Auth Keys +// */ +// export async function deriveIdentAuthWalletPath(walletKey: HDKey, path: string) { +// let hdpath = _parseIdentityWallet(path); +// let identAuthKey = await _deriveIdentAuthPath(walletKey, hdpath); + +// return identAuthKey; +// }; + +// /** +// * Returns a fully-derived Identity Auth Key +// */ +// export async function deriveIdentAuthKeyPath(walletKey: HDKey, path: string) { +// const INDEX_AUTH_IDENTITY_KEY = 7; + +// let hdpath = _parseIdentityWallet(path); +// let hasAuthKey = +// hdpath.paths.length > INDEX_AUTH_IDENTITY_KEY && +// hdpath.paths[INDEX_AUTH_IDENTITY_KEY].endsWith("'"); +// if (!hasAuthKey) { +// throw new Error( +// `an auth wallet key path must be in the form \`m/9'//5'/0'///'\` where the key index must have a trailing apostrophe`, +// ); +// } + +// let authWalletKey = await _deriveIdentAuthPath(walletKey, hdpath); +// let authKey = await authWalletKey.deriveAuthKey(hdpath); + +// return authKey; +// }; + +// /** +// * @typedef HDPathPlatform +// * @prop {String} path +// * @prop {Array} paths +// * @prop {"m"|"m'"} m +// * @prop {"9'"} purpose +// * @prop {"5'"|"1'"} coinType +// * @prop {"5'"} feature +// * @prop {"0'"|"1'"|"2'"} subFeature +// * @prop {"0'"|"1'"} [keyType] +// * @prop {String} [identityIndex] +// * @prop {String} [keyIndex] +// * @prop {String} [topupIndex] +// * @prop {String} [fundRegIndex] +// */ + +// async function _deriveIdentAuthPath(walletKey: HDKey, hdpath: {paths: string[], coinType: string}) { +// const INDEX_KEY_TYPE = 5; +// const INDEX_AUTH_IDENTITY = 6; + +// let keyType = hdpath.paths[INDEX_KEY_TYPE]; +// let isValidKeyType = keyType === KEY_TYPE_ECDSA || keyType === KEY_TYPE_BLS; +// let hasIdentity = +// hdpath.paths.length > INDEX_AUTH_IDENTITY && +// hdpath.paths[INDEX_AUTH_IDENTITY].endsWith("'"); +// let isIdentity = isValidKeyType && hasIdentity; +// if (!isIdentity) { +// throw new Error( +// `an identity wallet identity auth path must be in the form \`m/9'//5'/0'//' where coin-type is 5' (DASH mainnet) or 1' (testnet), key-type is 0' (ECDSA) or 1' (BLS), and identity index must have a trailing apostrophe`, +// ); +// } + +// // 0=m/1=purpose'/2=coin-type'/3=feature'/4=sub-feature'/5=key-type'/6=identity-index' +// let authWalletPath = `m/9'/${hdpath.coinType}/5'/0'/${keyType}/${hdpath.paths[INDEX_AUTH_IDENTITY]}`; +// let _authWalletKey = await DashHd.derivePath(walletKey, authWalletPath); + +// let authWalletKey = Object.assign(_authWalletKey, { +// deriveAuthKey: async function (authKeyIndex: number) { +// let authKey = await DashHd.deriveChild( +// _authWalletKey, +// authKeyIndex, +// DashHd.HARDENED, +// ); +// return authKey; +// }, +// }); + +// return authWalletKey; +// } + +// /** +// * Returns a fully-derived Identity Registration Funding Key +// * @param {import('dashhd').HDWallet} walletKey +// * @param {String} path +// */ +// export async function deriveIdentRegFundKeyPath(walletKey: HDKey, path: string) { +// const INDEX_REG_FUND_KEY = 5; + +// let hdpath = _parseIdentityWallet(path); +// let hasIdentity = +// hdpath.paths.length > INDEX_REG_FUND_KEY && +// !hdpath.paths[INDEX_REG_FUND_KEY].endsWith("'"); +// if (!hasIdentity) { +// throw new Error( +// `an identity wallet identity reg path must be in the form \`m/9'//5'/1'/\` where the identity index MUST NOT have a trailing apostrophe`, +// ); +// } + +// // 0=m/1=purpose'/2=coin-type'/3=feature'/4=sub-feature'/5=identity-index +// let identRegFundPath = `m/9'/${hdpath.coinType}/5'/1'/${hdpath.paths[INDEX_REG_FUND_KEY]}`; +// let identRegFundKey = await DashHd.derivePath(walletKey, identRegFundPath); + +// return identRegFundKey; +// }; + +// async function deriveIdentTopupWallet(walletKey, path) { +// } + +// /** +// * Returns a fully-derived Topup Funding Key +// * @param {import('dashhd').HDWallet} walletKey +// * @param {String} path +// */ +// export async function deriveIdentTopupKeyPath(walletKey, path) { +// const INDEX_TOPUP_KEY = 5; + +// let hdpath = _parseIdentityWallet(path); +// let hasIdentity = +// hdpath.paths.length > INDEX_TOPUP_KEY && +// !hdpath.paths[INDEX_TOPUP_KEY].endsWith("'"); +// if (!hasIdentity) { +// throw new Error( +// `an identity wallet identity reg path must be in the form \`m/9'//5'/2'/\` where the topup index MUST NOT have a trailing apostrophe`, +// ); +// } + +// // 0=m/1=purpose'/2=coin-type'/3=feature'/4=sub-feature'/5=topup-index +// let identTopupPath = `m/9'/${hdpath.coinType}/5'/2'/${hdpath.paths[INDEX_TOPUP_KEY]}`; +// let identTopupKey = await DashHd.derivePath(walletKey, identTopupPath); + +// return identTopupKey; +// }; + +// function _parseIdentityWallet(path: string) { +// let paths = path.split("/"); +// let [m, purpose, coinType, feature, subFeature] = paths; +// let hasMaster = m === "m" || m === "m'"; +// let hasPurpose = purpose === PURPOSE_FEATURE_PATHS; +// let hasCoinType = +// coinType === COIN_TYPE_DASH || coinType === COIN_TYPE_TESTNET; +// let hasFeature = feature === FEATURE_IDENTITY; +// let hasSubFeature = [ +// SUB_FEATURE_AUTH, +// SUB_FEATURE_REG, +// SUB_FEATURE_TOPUP, +// ].includes(subFeature); + +// let hasValidPrefix = +// hasMaster && hasPurpose && hasCoinType && hasFeature && hasSubFeature; +// if (!hasValidPrefix) { +// throw new Error( +// `identity wallet paths must be in the form \`m/9'//5'/' where coin-type is 5' (DASH mainnet) or 1' (testnet) and sub-feature is 0' (auth), 1' (registration), or 2' (topup)`, +// ); +// } + +// return { path, paths, m, purpose, coinType, feature, subFeature }; +// } diff --git a/src/dashplatform.js b/src/dashplatform.js new file mode 100644 index 0000000..e99a0b1 --- /dev/null +++ b/src/dashplatform.js @@ -0,0 +1,33 @@ +import * as DashTx from 'dashtx' + +/** + * ex: 01 01 40420f00 00000000 19 76a914cdfca4ae1cf2333056659a2c 8dc656f36d228402 + * @param {Object} opts + * @param {Uint8} [opts.version] + * @param {Array} opts.creditOutputs + */ +export function packAssetLock({ version = 1, creditOutputs }) { + let versionHex = DashTx.utils.toUint32LE(version); + versionHex = versionHex.slice(0, 2); + + let lenHex = DashTx.utils.toUint32LE(creditOutputs.length); + lenHex = lenHex.slice(0, 2); + + let hexes = [`${versionHex}${lenHex}`]; + for (let creditOutput of creditOutputs) { + //@ts-ignore - TODO check type of TxOutput + let script = creditOutput.script; + if (!script) { + let satsHexLE = DashTx.utils.toUint64LE(creditOutput.satoshis); + script = `${satsHexLE}1976a914${creditOutput.pubKeyHash}88ac`; + } + let assetLock = `${script}`; + hexes.push(assetLock); + } + + return hexes.join(""); + }; + +/** @typedef {Number} Uint32 */ +/** @typedef {Number} Uint8 */ +/** @typedef {String} Hex */ diff --git a/src/generated/core/v0/core.client.ts b/src/generated/core/v0/core.client.ts new file mode 100644 index 0000000..f786776 --- /dev/null +++ b/src/generated/core/v0/core.client.ts @@ -0,0 +1,155 @@ +// @generated by protobuf-ts 2.9.6 with parameter optimize_code_size +// @generated from protobuf file "core/v0/core.proto" (package "org.dash.platform.dapi.v0", syntax proto3) +// tslint:disable +import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; +import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; +import { Core } from "./core.ts"; +import type { MasternodeListResponse } from "./core.ts"; +import type { MasternodeListRequest } from "./core.ts"; +import type { TransactionsWithProofsResponse } from "./core.ts"; +import type { TransactionsWithProofsRequest } from "./core.ts"; +import type { BlockHeadersWithChainLocksResponse } from "./core.ts"; +import type { BlockHeadersWithChainLocksRequest } from "./core.ts"; +import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc"; +import type { GetEstimatedTransactionFeeResponse } from "./core.ts"; +import type { GetEstimatedTransactionFeeRequest } from "./core.ts"; +import type { GetTransactionResponse } from "./core.ts"; +import type { GetTransactionRequest } from "./core.ts"; +import type { BroadcastTransactionResponse } from "./core.ts"; +import type { BroadcastTransactionRequest } from "./core.ts"; +import type { GetBestBlockHeightResponse } from "./core.ts"; +import type { GetBestBlockHeightRequest } from "./core.ts"; +import type { GetBlockResponse } from "./core.ts"; +import type { GetBlockRequest } from "./core.ts"; +import type { GetMasternodeStatusResponse } from "./core.ts"; +import type { GetMasternodeStatusRequest } from "./core.ts"; +import { stackIntercept } from "@protobuf-ts/runtime-rpc"; +import type { GetBlockchainStatusResponse } from "./core.ts"; +import type { GetBlockchainStatusRequest } from "./core.ts"; +import type { UnaryCall } from "@protobuf-ts/runtime-rpc"; +import type { RpcOptions } from "@protobuf-ts/runtime-rpc"; +/** + * @generated from protobuf service org.dash.platform.dapi.v0.Core + */ +export interface ICoreClient { + /** + * @generated from protobuf rpc: getBlockchainStatus(org.dash.platform.dapi.v0.GetBlockchainStatusRequest) returns (org.dash.platform.dapi.v0.GetBlockchainStatusResponse); + */ + getBlockchainStatus(input: GetBlockchainStatusRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getMasternodeStatus(org.dash.platform.dapi.v0.GetMasternodeStatusRequest) returns (org.dash.platform.dapi.v0.GetMasternodeStatusResponse); + */ + getMasternodeStatus(input: GetMasternodeStatusRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getBlock(org.dash.platform.dapi.v0.GetBlockRequest) returns (org.dash.platform.dapi.v0.GetBlockResponse); + */ + getBlock(input: GetBlockRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getBestBlockHeight(org.dash.platform.dapi.v0.GetBestBlockHeightRequest) returns (org.dash.platform.dapi.v0.GetBestBlockHeightResponse); + */ + getBestBlockHeight(input: GetBestBlockHeightRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: broadcastTransaction(org.dash.platform.dapi.v0.BroadcastTransactionRequest) returns (org.dash.platform.dapi.v0.BroadcastTransactionResponse); + */ + broadcastTransaction(input: BroadcastTransactionRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTransaction(org.dash.platform.dapi.v0.GetTransactionRequest) returns (org.dash.platform.dapi.v0.GetTransactionResponse); + */ + getTransaction(input: GetTransactionRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getEstimatedTransactionFee(org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest) returns (org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse); + */ + getEstimatedTransactionFee(input: GetEstimatedTransactionFeeRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: subscribeToBlockHeadersWithChainLocks(org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest) returns (stream org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse); + */ + subscribeToBlockHeadersWithChainLocks(input: BlockHeadersWithChainLocksRequest, options?: RpcOptions): ServerStreamingCall; + /** + * @generated from protobuf rpc: subscribeToTransactionsWithProofs(org.dash.platform.dapi.v0.TransactionsWithProofsRequest) returns (stream org.dash.platform.dapi.v0.TransactionsWithProofsResponse); + */ + subscribeToTransactionsWithProofs(input: TransactionsWithProofsRequest, options?: RpcOptions): ServerStreamingCall; + /** + * @generated from protobuf rpc: subscribeToMasternodeList(org.dash.platform.dapi.v0.MasternodeListRequest) returns (stream org.dash.platform.dapi.v0.MasternodeListResponse); + */ + subscribeToMasternodeList(input: MasternodeListRequest, options?: RpcOptions): ServerStreamingCall; +} +/** + * @generated from protobuf service org.dash.platform.dapi.v0.Core + */ +export class CoreClient implements ICoreClient, ServiceInfo { + typeName = Core.typeName; + methods = Core.methods; + options = Core.options; + constructor(private readonly _transport: RpcTransport) { + } + /** + * @generated from protobuf rpc: getBlockchainStatus(org.dash.platform.dapi.v0.GetBlockchainStatusRequest) returns (org.dash.platform.dapi.v0.GetBlockchainStatusResponse); + */ + getBlockchainStatus(input: GetBlockchainStatusRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[0], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getMasternodeStatus(org.dash.platform.dapi.v0.GetMasternodeStatusRequest) returns (org.dash.platform.dapi.v0.GetMasternodeStatusResponse); + */ + getMasternodeStatus(input: GetMasternodeStatusRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[1], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getBlock(org.dash.platform.dapi.v0.GetBlockRequest) returns (org.dash.platform.dapi.v0.GetBlockResponse); + */ + getBlock(input: GetBlockRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[2], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getBestBlockHeight(org.dash.platform.dapi.v0.GetBestBlockHeightRequest) returns (org.dash.platform.dapi.v0.GetBestBlockHeightResponse); + */ + getBestBlockHeight(input: GetBestBlockHeightRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[3], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: broadcastTransaction(org.dash.platform.dapi.v0.BroadcastTransactionRequest) returns (org.dash.platform.dapi.v0.BroadcastTransactionResponse); + */ + broadcastTransaction(input: BroadcastTransactionRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[4], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getTransaction(org.dash.platform.dapi.v0.GetTransactionRequest) returns (org.dash.platform.dapi.v0.GetTransactionResponse); + */ + getTransaction(input: GetTransactionRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[5], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getEstimatedTransactionFee(org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest) returns (org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse); + */ + getEstimatedTransactionFee(input: GetEstimatedTransactionFeeRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[6], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: subscribeToBlockHeadersWithChainLocks(org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest) returns (stream org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse); + */ + subscribeToBlockHeadersWithChainLocks(input: BlockHeadersWithChainLocksRequest, options?: RpcOptions): ServerStreamingCall { + const method = this.methods[7], opt = this._transport.mergeOptions(options); + return stackIntercept("serverStreaming", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: subscribeToTransactionsWithProofs(org.dash.platform.dapi.v0.TransactionsWithProofsRequest) returns (stream org.dash.platform.dapi.v0.TransactionsWithProofsResponse); + */ + subscribeToTransactionsWithProofs(input: TransactionsWithProofsRequest, options?: RpcOptions): ServerStreamingCall { + const method = this.methods[8], opt = this._transport.mergeOptions(options); + return stackIntercept("serverStreaming", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: subscribeToMasternodeList(org.dash.platform.dapi.v0.MasternodeListRequest) returns (stream org.dash.platform.dapi.v0.MasternodeListResponse); + */ + subscribeToMasternodeList(input: MasternodeListRequest, options?: RpcOptions): ServerStreamingCall { + const method = this.methods[9], opt = this._transport.mergeOptions(options); + return stackIntercept("serverStreaming", this._transport, method, opt, input); + } +} diff --git a/src/generated/core/v0/core.ts b/src/generated/core/v0/core.ts new file mode 100644 index 0000000..7e02429 --- /dev/null +++ b/src/generated/core/v0/core.ts @@ -0,0 +1,925 @@ +// @generated by protobuf-ts 2.9.6 with parameter optimize_code_size +// @generated from protobuf file "core/v0/core.proto" (package "org.dash.platform.dapi.v0", syntax proto3) +// tslint:disable +import { ServiceType } from "@protobuf-ts/runtime-rpc"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusRequest + */ +export interface GetBlockchainStatusRequest { +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse + */ +export interface GetBlockchainStatusResponse { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version version = 1; + */ + version?: GetBlockchainStatusResponse_Version; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time time = 2; + */ + time?: GetBlockchainStatusResponse_Time; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Status status = 3; + */ + status: GetBlockchainStatusResponse_Status; + /** + * @generated from protobuf field: double sync_progress = 4; + */ + syncProgress: number; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain chain = 5; + */ + chain?: GetBlockchainStatusResponse_Chain; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network network = 7; + */ + network?: GetBlockchainStatusResponse_Network; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version + */ +export interface GetBlockchainStatusResponse_Version { + /** + * @generated from protobuf field: uint32 protocol = 1; + */ + protocol: number; + /** + * @generated from protobuf field: uint32 software = 2; + */ + software: number; + /** + * @generated from protobuf field: string agent = 3; + */ + agent: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time + */ +export interface GetBlockchainStatusResponse_Time { + /** + * @generated from protobuf field: uint32 now = 1; + */ + now: number; + /** + * @generated from protobuf field: int32 offset = 2; + */ + offset: number; + /** + * @generated from protobuf field: uint32 median = 3; + */ + median: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain + */ +export interface GetBlockchainStatusResponse_Chain { + /** + * @generated from protobuf field: string name = 1; + */ + name: string; + /** + * @generated from protobuf field: uint32 headers_count = 2; + */ + headersCount: number; + /** + * @generated from protobuf field: uint32 blocks_count = 3; + */ + blocksCount: number; + /** + * @generated from protobuf field: bytes best_block_hash = 4; + */ + bestBlockHash: Uint8Array; + /** + * @generated from protobuf field: double difficulty = 5; + */ + difficulty: number; + /** + * @generated from protobuf field: bytes chain_work = 6; + */ + chainWork: Uint8Array; + /** + * @generated from protobuf field: bool is_synced = 7; + */ + isSynced: boolean; + /** + * @generated from protobuf field: double sync_progress = 8; + */ + syncProgress: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee + */ +export interface GetBlockchainStatusResponse_NetworkFee { + /** + * @generated from protobuf field: double relay = 1; + */ + relay: number; + /** + * @generated from protobuf field: double incremental = 2; + */ + incremental: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network + */ +export interface GetBlockchainStatusResponse_Network { + /** + * @generated from protobuf field: uint32 peers_count = 1; + */ + peersCount: number; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee fee = 2; + */ + fee?: GetBlockchainStatusResponse_NetworkFee; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Status + */ +export enum GetBlockchainStatusResponse_Status { + /** + * @generated from protobuf enum value: NOT_STARTED = 0; + */ + NOT_STARTED = 0, + /** + * @generated from protobuf enum value: SYNCING = 1; + */ + SYNCING = 1, + /** + * @generated from protobuf enum value: READY = 2; + */ + READY = 2, + /** + * @generated from protobuf enum value: ERROR = 3; + */ + ERROR = 3 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetMasternodeStatusRequest + */ +export interface GetMasternodeStatusRequest { +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetMasternodeStatusResponse + */ +export interface GetMasternodeStatusResponse { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetMasternodeStatusResponse.Status status = 1; + */ + status: GetMasternodeStatusResponse_Status; + /** + * @generated from protobuf field: bytes pro_tx_hash = 2; + */ + proTxHash: Uint8Array; + /** + * @generated from protobuf field: uint32 pose_penalty = 3; + */ + posePenalty: number; + /** + * @generated from protobuf field: bool is_synced = 4; + */ + isSynced: boolean; + /** + * @generated from protobuf field: double sync_progress = 5; + */ + syncProgress: number; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetMasternodeStatusResponse.Status + */ +export enum GetMasternodeStatusResponse_Status { + /** + * @generated from protobuf enum value: UNKNOWN = 0; + */ + UNKNOWN = 0, + /** + * @generated from protobuf enum value: WAITING_FOR_PROTX = 1; + */ + WAITING_FOR_PROTX = 1, + /** + * @generated from protobuf enum value: POSE_BANNED = 2; + */ + POSE_BANNED = 2, + /** + * @generated from protobuf enum value: REMOVED = 3; + */ + REMOVED = 3, + /** + * @generated from protobuf enum value: OPERATOR_KEY_CHANGED = 4; + */ + OPERATOR_KEY_CHANGED = 4, + /** + * @generated from protobuf enum value: PROTX_IP_CHANGED = 5; + */ + PROTX_IP_CHANGED = 5, + /** + * @generated from protobuf enum value: READY = 6; + */ + READY = 6, + /** + * @generated from protobuf enum value: ERROR = 7; + */ + ERROR = 7 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockRequest + */ +export interface GetBlockRequest { + /** + * @generated from protobuf oneof: block + */ + block: { + oneofKind: "height"; + /** + * @generated from protobuf field: uint32 height = 1; + */ + height: number; + } | { + oneofKind: "hash"; + /** + * @generated from protobuf field: string hash = 2; + */ + hash: string; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBlockResponse + */ +export interface GetBlockResponse { + /** + * @generated from protobuf field: bytes block = 1; + */ + block: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBestBlockHeightRequest + */ +export interface GetBestBlockHeightRequest { +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetBestBlockHeightResponse + */ +export interface GetBestBlockHeightResponse { + /** + * @generated from protobuf field: uint32 height = 1; + */ + height: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BroadcastTransactionRequest + */ +export interface BroadcastTransactionRequest { + /** + * @generated from protobuf field: bytes transaction = 1; + */ + transaction: Uint8Array; + /** + * @generated from protobuf field: bool allow_high_fees = 2; + */ + allowHighFees: boolean; + /** + * @generated from protobuf field: bool bypass_limits = 3; + */ + bypassLimits: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BroadcastTransactionResponse + */ +export interface BroadcastTransactionResponse { + /** + * @generated from protobuf field: string transaction_id = 1; + */ + transactionId: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTransactionRequest + */ +export interface GetTransactionRequest { + /** + * @generated from protobuf field: string id = 1; + */ + id: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTransactionResponse + */ +export interface GetTransactionResponse { + /** + * @generated from protobuf field: bytes transaction = 1; + */ + transaction: Uint8Array; + /** + * @generated from protobuf field: bytes block_hash = 2; + */ + blockHash: Uint8Array; + /** + * @generated from protobuf field: uint32 height = 3; + */ + height: number; + /** + * @generated from protobuf field: uint32 confirmations = 4; + */ + confirmations: number; + /** + * @generated from protobuf field: bool is_instant_locked = 5; + */ + isInstantLocked: boolean; + /** + * @generated from protobuf field: bool is_chain_locked = 6; + */ + isChainLocked: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest + */ +export interface BlockHeadersWithChainLocksRequest { + /** + * @generated from protobuf oneof: from_block + */ + fromBlock: { + oneofKind: "fromBlockHash"; + /** + * @generated from protobuf field: bytes from_block_hash = 1; + */ + fromBlockHash: Uint8Array; + } | { + oneofKind: "fromBlockHeight"; + /** + * @generated from protobuf field: uint32 from_block_height = 2; + */ + fromBlockHeight: number; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: uint32 count = 3; + */ + count: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse + */ +export interface BlockHeadersWithChainLocksResponse { + /** + * @generated from protobuf oneof: responses + */ + responses: { + oneofKind: "blockHeaders"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.BlockHeaders block_headers = 1; + */ + blockHeaders: BlockHeaders; + } | { + oneofKind: "chainLock"; + /** + * @generated from protobuf field: bytes chain_lock = 2; + */ + chainLock: Uint8Array; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BlockHeaders + */ +export interface BlockHeaders { + /** + * @generated from protobuf field: repeated bytes headers = 1; + */ + headers: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest + */ +export interface GetEstimatedTransactionFeeRequest { + /** + * @generated from protobuf field: uint32 blocks = 1; + */ + blocks: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse + */ +export interface GetEstimatedTransactionFeeResponse { + /** + * @generated from protobuf field: double fee = 1; + */ + fee: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.TransactionsWithProofsRequest + */ +export interface TransactionsWithProofsRequest { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.BloomFilter bloom_filter = 1; + */ + bloomFilter?: BloomFilter; + /** + * @generated from protobuf oneof: from_block + */ + fromBlock: { + oneofKind: "fromBlockHash"; + /** + * @generated from protobuf field: bytes from_block_hash = 2; + */ + fromBlockHash: Uint8Array; + } | { + oneofKind: "fromBlockHeight"; + /** + * @generated from protobuf field: uint32 from_block_height = 3; + */ + fromBlockHeight: number; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: uint32 count = 4; + */ + count: number; + /** + * @generated from protobuf field: bool send_transaction_hashes = 5; + */ + sendTransactionHashes: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BloomFilter + */ +export interface BloomFilter { + /** + * @generated from protobuf field: bytes v_data = 1; + */ + vData: Uint8Array; + /** + * @generated from protobuf field: uint32 n_hash_funcs = 2; + */ + nHashFuncs: number; + /** + * @generated from protobuf field: uint32 n_tweak = 3; + */ + nTweak: number; + /** + * @generated from protobuf field: uint32 n_flags = 4; + */ + nFlags: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.TransactionsWithProofsResponse + */ +export interface TransactionsWithProofsResponse { + /** + * @generated from protobuf oneof: responses + */ + responses: { + oneofKind: "rawTransactions"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.RawTransactions raw_transactions = 1; + */ + rawTransactions: RawTransactions; + } | { + oneofKind: "instantSendLockMessages"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.InstantSendLockMessages instant_send_lock_messages = 2; + */ + instantSendLockMessages: InstantSendLockMessages; + } | { + oneofKind: "rawMerkleBlock"; + /** + * @generated from protobuf field: bytes raw_merkle_block = 3; + */ + rawMerkleBlock: Uint8Array; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.RawTransactions + */ +export interface RawTransactions { + /** + * @generated from protobuf field: repeated bytes transactions = 1; + */ + transactions: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.InstantSendLockMessages + */ +export interface InstantSendLockMessages { + /** + * @generated from protobuf field: repeated bytes messages = 1; + */ + messages: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.MasternodeListRequest + */ +export interface MasternodeListRequest { +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.MasternodeListResponse + */ +export interface MasternodeListResponse { + /** + * @generated from protobuf field: bytes masternode_list_diff = 1; + */ + masternodeListDiff: Uint8Array; +} +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockchainStatusRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockchainStatusRequest", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusRequest + */ +export const GetBlockchainStatusRequest = new GetBlockchainStatusRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockchainStatusResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockchainStatusResponse", [ + { no: 1, name: "version", kind: "message", T: () => GetBlockchainStatusResponse_Version }, + { no: 2, name: "time", kind: "message", T: () => GetBlockchainStatusResponse_Time }, + { no: 3, name: "status", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Status", GetBlockchainStatusResponse_Status] }, + { no: 4, name: "sync_progress", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, + { no: 5, name: "chain", kind: "message", T: () => GetBlockchainStatusResponse_Chain }, + { no: 7, name: "network", kind: "message", T: () => GetBlockchainStatusResponse_Network } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse + */ +export const GetBlockchainStatusResponse = new GetBlockchainStatusResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockchainStatusResponse_Version$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version", [ + { no: 1, name: "protocol", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "software", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "agent", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Version + */ +export const GetBlockchainStatusResponse_Version = new GetBlockchainStatusResponse_Version$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockchainStatusResponse_Time$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time", [ + { no: 1, name: "now", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "offset", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 3, name: "median", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Time + */ +export const GetBlockchainStatusResponse_Time = new GetBlockchainStatusResponse_Time$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockchainStatusResponse_Chain$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain", [ + { no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "headers_count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "blocks_count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "best_block_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "difficulty", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, + { no: 6, name: "chain_work", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 7, name: "is_synced", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 8, name: "sync_progress", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Chain + */ +export const GetBlockchainStatusResponse_Chain = new GetBlockchainStatusResponse_Chain$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockchainStatusResponse_NetworkFee$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee", [ + { no: 1, name: "relay", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, + { no: 2, name: "incremental", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.NetworkFee + */ +export const GetBlockchainStatusResponse_NetworkFee = new GetBlockchainStatusResponse_NetworkFee$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockchainStatusResponse_Network$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network", [ + { no: 1, name: "peers_count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "fee", kind: "message", T: () => GetBlockchainStatusResponse_NetworkFee } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockchainStatusResponse.Network + */ +export const GetBlockchainStatusResponse_Network = new GetBlockchainStatusResponse_Network$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetMasternodeStatusRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetMasternodeStatusRequest", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetMasternodeStatusRequest + */ +export const GetMasternodeStatusRequest = new GetMasternodeStatusRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetMasternodeStatusResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetMasternodeStatusResponse", [ + { no: 1, name: "status", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetMasternodeStatusResponse.Status", GetMasternodeStatusResponse_Status] }, + { no: 2, name: "pro_tx_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "pose_penalty", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "is_synced", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 5, name: "sync_progress", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetMasternodeStatusResponse + */ +export const GetMasternodeStatusResponse = new GetMasternodeStatusResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockRequest", [ + { no: 1, name: "height", kind: "scalar", oneof: "block", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "hash", kind: "scalar", oneof: "block", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockRequest + */ +export const GetBlockRequest = new GetBlockRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBlockResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBlockResponse", [ + { no: 1, name: "block", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBlockResponse + */ +export const GetBlockResponse = new GetBlockResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBestBlockHeightRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBestBlockHeightRequest", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBestBlockHeightRequest + */ +export const GetBestBlockHeightRequest = new GetBestBlockHeightRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetBestBlockHeightResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetBestBlockHeightResponse", [ + { no: 1, name: "height", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetBestBlockHeightResponse + */ +export const GetBestBlockHeightResponse = new GetBestBlockHeightResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BroadcastTransactionRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BroadcastTransactionRequest", [ + { no: 1, name: "transaction", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "allow_high_fees", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 3, name: "bypass_limits", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BroadcastTransactionRequest + */ +export const BroadcastTransactionRequest = new BroadcastTransactionRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BroadcastTransactionResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BroadcastTransactionResponse", [ + { no: 1, name: "transaction_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BroadcastTransactionResponse + */ +export const BroadcastTransactionResponse = new BroadcastTransactionResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTransactionRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTransactionRequest", [ + { no: 1, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTransactionRequest + */ +export const GetTransactionRequest = new GetTransactionRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTransactionResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTransactionResponse", [ + { no: 1, name: "transaction", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "block_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "height", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "confirmations", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 5, name: "is_instant_locked", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "is_chain_locked", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTransactionResponse + */ +export const GetTransactionResponse = new GetTransactionResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BlockHeadersWithChainLocksRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest", [ + { no: 1, name: "from_block_hash", kind: "scalar", oneof: "fromBlock", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "from_block_height", kind: "scalar", oneof: "fromBlock", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BlockHeadersWithChainLocksRequest + */ +export const BlockHeadersWithChainLocksRequest = new BlockHeadersWithChainLocksRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BlockHeadersWithChainLocksResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse", [ + { no: 1, name: "block_headers", kind: "message", oneof: "responses", T: () => BlockHeaders }, + { no: 2, name: "chain_lock", kind: "scalar", oneof: "responses", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BlockHeadersWithChainLocksResponse + */ +export const BlockHeadersWithChainLocksResponse = new BlockHeadersWithChainLocksResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BlockHeaders$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BlockHeaders", [ + { no: 1, name: "headers", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BlockHeaders + */ +export const BlockHeaders = new BlockHeaders$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEstimatedTransactionFeeRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest", [ + { no: 1, name: "blocks", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEstimatedTransactionFeeRequest + */ +export const GetEstimatedTransactionFeeRequest = new GetEstimatedTransactionFeeRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEstimatedTransactionFeeResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse", [ + { no: 1, name: "fee", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEstimatedTransactionFeeResponse + */ +export const GetEstimatedTransactionFeeResponse = new GetEstimatedTransactionFeeResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class TransactionsWithProofsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.TransactionsWithProofsRequest", [ + { no: 1, name: "bloom_filter", kind: "message", T: () => BloomFilter }, + { no: 2, name: "from_block_hash", kind: "scalar", oneof: "fromBlock", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "from_block_height", kind: "scalar", oneof: "fromBlock", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 5, name: "send_transaction_hashes", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.TransactionsWithProofsRequest + */ +export const TransactionsWithProofsRequest = new TransactionsWithProofsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BloomFilter$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BloomFilter", [ + { no: 1, name: "v_data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "n_hash_funcs", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "n_tweak", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "n_flags", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BloomFilter + */ +export const BloomFilter = new BloomFilter$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class TransactionsWithProofsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.TransactionsWithProofsResponse", [ + { no: 1, name: "raw_transactions", kind: "message", oneof: "responses", T: () => RawTransactions }, + { no: 2, name: "instant_send_lock_messages", kind: "message", oneof: "responses", T: () => InstantSendLockMessages }, + { no: 3, name: "raw_merkle_block", kind: "scalar", oneof: "responses", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.TransactionsWithProofsResponse + */ +export const TransactionsWithProofsResponse = new TransactionsWithProofsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class RawTransactions$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.RawTransactions", [ + { no: 1, name: "transactions", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.RawTransactions + */ +export const RawTransactions = new RawTransactions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class InstantSendLockMessages$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.InstantSendLockMessages", [ + { no: 1, name: "messages", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.InstantSendLockMessages + */ +export const InstantSendLockMessages = new InstantSendLockMessages$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MasternodeListRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.MasternodeListRequest", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.MasternodeListRequest + */ +export const MasternodeListRequest = new MasternodeListRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class MasternodeListResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.MasternodeListResponse", [ + { no: 1, name: "masternode_list_diff", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.MasternodeListResponse + */ +export const MasternodeListResponse = new MasternodeListResponse$Type(); +/** + * @generated ServiceType for protobuf service org.dash.platform.dapi.v0.Core + */ +export const Core = new ServiceType("org.dash.platform.dapi.v0.Core", [ + { name: "getBlockchainStatus", options: {}, I: GetBlockchainStatusRequest, O: GetBlockchainStatusResponse }, + { name: "getMasternodeStatus", options: {}, I: GetMasternodeStatusRequest, O: GetMasternodeStatusResponse }, + { name: "getBlock", options: {}, I: GetBlockRequest, O: GetBlockResponse }, + { name: "getBestBlockHeight", options: {}, I: GetBestBlockHeightRequest, O: GetBestBlockHeightResponse }, + { name: "broadcastTransaction", options: {}, I: BroadcastTransactionRequest, O: BroadcastTransactionResponse }, + { name: "getTransaction", options: {}, I: GetTransactionRequest, O: GetTransactionResponse }, + { name: "getEstimatedTransactionFee", options: {}, I: GetEstimatedTransactionFeeRequest, O: GetEstimatedTransactionFeeResponse }, + { name: "subscribeToBlockHeadersWithChainLocks", serverStreaming: true, options: {}, I: BlockHeadersWithChainLocksRequest, O: BlockHeadersWithChainLocksResponse }, + { name: "subscribeToTransactionsWithProofs", serverStreaming: true, options: {}, I: TransactionsWithProofsRequest, O: TransactionsWithProofsResponse }, + { name: "subscribeToMasternodeList", serverStreaming: true, options: {}, I: MasternodeListRequest, O: MasternodeListResponse } +]); diff --git a/src/generated/google/protobuf/struct.ts b/src/generated/google/protobuf/struct.ts new file mode 100644 index 0000000..e3c9199 --- /dev/null +++ b/src/generated/google/protobuf/struct.ts @@ -0,0 +1,301 @@ +// @generated by protobuf-ts 2.9.6 with parameter optimize_code_size +// @generated from protobuf file "google/protobuf/struct.proto" (package "google.protobuf", syntax proto3) +// tslint:disable +// +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +import { isJsonObject } from "@protobuf-ts/runtime"; +import { typeofJsonValue } from "@protobuf-ts/runtime"; +import type { JsonValue } from "@protobuf-ts/runtime"; +import type { JsonReadOptions } from "@protobuf-ts/runtime"; +import type { JsonWriteOptions } from "@protobuf-ts/runtime"; +import type { JsonObject } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * `Struct` represents a structured data value, consisting of fields + * which map to dynamically typed values. In some languages, `Struct` + * might be supported by a native representation. For example, in + * scripting languages like JS a struct is represented as an + * object. The details of that representation are described together + * with the proto support for the language. + * + * The JSON representation for `Struct` is JSON object. + * + * @generated from protobuf message google.protobuf.Struct + */ +export interface Struct { + /** + * Unordered map of dynamically typed values. + * + * @generated from protobuf field: map fields = 1; + */ + fields: { + [key: string]: Value; + }; +} +/** + * `Value` represents a dynamically typed value which can be either + * null, a number, a string, a boolean, a recursive struct value, or a + * list of values. A producer of value is expected to set one of these + * variants. Absence of any variant indicates an error. + * + * The JSON representation for `Value` is JSON value. + * + * @generated from protobuf message google.protobuf.Value + */ +export interface Value { + /** + * @generated from protobuf oneof: kind + */ + kind: { + oneofKind: "nullValue"; + /** + * Represents a null value. + * + * @generated from protobuf field: google.protobuf.NullValue null_value = 1; + */ + nullValue: NullValue; + } | { + oneofKind: "numberValue"; + /** + * Represents a double value. + * + * @generated from protobuf field: double number_value = 2; + */ + numberValue: number; + } | { + oneofKind: "stringValue"; + /** + * Represents a string value. + * + * @generated from protobuf field: string string_value = 3; + */ + stringValue: string; + } | { + oneofKind: "boolValue"; + /** + * Represents a boolean value. + * + * @generated from protobuf field: bool bool_value = 4; + */ + boolValue: boolean; + } | { + oneofKind: "structValue"; + /** + * Represents a structured value. + * + * @generated from protobuf field: google.protobuf.Struct struct_value = 5; + */ + structValue: Struct; + } | { + oneofKind: "listValue"; + /** + * Represents a repeated `Value`. + * + * @generated from protobuf field: google.protobuf.ListValue list_value = 6; + */ + listValue: ListValue; + } | { + oneofKind: undefined; + }; +} +/** + * `ListValue` is a wrapper around a repeated field of values. + * + * The JSON representation for `ListValue` is JSON array. + * + * @generated from protobuf message google.protobuf.ListValue + */ +export interface ListValue { + /** + * Repeated field of dynamically typed values. + * + * @generated from protobuf field: repeated google.protobuf.Value values = 1; + */ + values: Value[]; +} +/** + * `NullValue` is a singleton enumeration to represent the null value for the + * `Value` type union. + * + * The JSON representation for `NullValue` is JSON `null`. + * + * @generated from protobuf enum google.protobuf.NullValue + */ +export enum NullValue { + /** + * Null value. + * + * @generated from protobuf enum value: NULL_VALUE = 0; + */ + NULL_VALUE = 0 +} +// @generated message type with reflection information, may provide speed optimized methods +class Struct$Type extends MessageType { + constructor() { + super("google.protobuf.Struct", [ + { no: 1, name: "fields", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "message", T: () => Value } } + ]); + } + /** + * Encode `Struct` to JSON object. + */ + internalJsonWrite(message: Struct, options: JsonWriteOptions): JsonValue { + let json: JsonObject = {}; + for (let [k, v] of Object.entries(message.fields)) { + json[k] = Value.toJson(v); + } + return json; + } + /** + * Decode `Struct` from JSON object. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Struct): Struct { + if (!isJsonObject(json)) + throw new globalThis.Error("Unable to parse message " + this.typeName + " from JSON " + typeofJsonValue(json) + "."); + if (!target) + target = this.create(); + for (let [k, v] of globalThis.Object.entries(json)) { + target.fields[k] = Value.fromJson(v); + } + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.Struct + */ +export const Struct = new Struct$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Value$Type extends MessageType { + constructor() { + super("google.protobuf.Value", [ + { no: 1, name: "null_value", kind: "enum", oneof: "kind", T: () => ["google.protobuf.NullValue", NullValue] }, + { no: 2, name: "number_value", kind: "scalar", oneof: "kind", T: 1 /*ScalarType.DOUBLE*/ }, + { no: 3, name: "string_value", kind: "scalar", oneof: "kind", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "bool_value", kind: "scalar", oneof: "kind", T: 8 /*ScalarType.BOOL*/ }, + { no: 5, name: "struct_value", kind: "message", oneof: "kind", T: () => Struct }, + { no: 6, name: "list_value", kind: "message", oneof: "kind", T: () => ListValue } + ]); + } + /** + * Encode `Value` to JSON value. + */ + internalJsonWrite(message: Value, options: JsonWriteOptions): JsonValue { + if (message.kind.oneofKind === undefined) + throw new globalThis.Error(); + switch (message.kind.oneofKind) { + case undefined: throw new globalThis.Error(); + case "boolValue": return message.kind.boolValue; + case "nullValue": return null; + case "numberValue": + let numberValue = message.kind.numberValue; + if (typeof numberValue == "number" && !Number.isFinite(numberValue)) + throw new globalThis.Error(); + return numberValue; + case "stringValue": return message.kind.stringValue; + case "listValue": + let listValueField = this.fields.find(f => f.no === 6); + if (listValueField?.kind !== "message") + throw new globalThis.Error(); + return listValueField.T().toJson(message.kind.listValue); + case "structValue": + let structValueField = this.fields.find(f => f.no === 5); + if (structValueField?.kind !== "message") + throw new globalThis.Error(); + return structValueField.T().toJson(message.kind.structValue); + } + } + /** + * Decode `Value` from JSON value. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Value): Value { + if (!target) + target = this.create(); + switch (typeof json) { + case "number": + target.kind = { oneofKind: "numberValue", numberValue: json }; + break; + case "string": + target.kind = { oneofKind: "stringValue", stringValue: json }; + break; + case "boolean": + target.kind = { oneofKind: "boolValue", boolValue: json }; + break; + case "object": + if (json === null) { + target.kind = { oneofKind: "nullValue", nullValue: NullValue.NULL_VALUE }; + } + else if (globalThis.Array.isArray(json)) { + target.kind = { oneofKind: "listValue", listValue: ListValue.fromJson(json) }; + } + else { + target.kind = { oneofKind: "structValue", structValue: Struct.fromJson(json) }; + } + break; + default: throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json)); + } + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.Value + */ +export const Value = new Value$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ListValue$Type extends MessageType { + constructor() { + super("google.protobuf.ListValue", [ + { no: 1, name: "values", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Value } + ]); + } + /** + * Encode `ListValue` to JSON array. + */ + internalJsonWrite(message: ListValue, options: JsonWriteOptions): JsonValue { + return message.values.map(v => Value.toJson(v)); + } + /** + * Decode `ListValue` from JSON array. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: ListValue): ListValue { + if (!globalThis.Array.isArray(json)) + throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json)); + if (!target) + target = this.create(); + let values = json.map(v => Value.fromJson(v)); + target.values.push(...values); + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.ListValue + */ +export const ListValue = new ListValue$Type(); diff --git a/src/generated/google/protobuf/wrappers.ts b/src/generated/google/protobuf/wrappers.ts new file mode 100644 index 0000000..07d6b8c --- /dev/null +++ b/src/generated/google/protobuf/wrappers.ts @@ -0,0 +1,428 @@ +// @generated by protobuf-ts 2.9.6 with parameter optimize_code_size +// @generated from protobuf file "google/protobuf/wrappers.proto" (package "google.protobuf", syntax proto3) +// tslint:disable +// +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Wrappers for primitive (non-message) types. These types are useful +// for embedding primitives in the `google.protobuf.Any` type and for places +// where we need to distinguish between the absence of a primitive +// typed field and its default value. +// +// These wrappers have no meaningful use within repeated fields as they lack +// the ability to detect presence on individual elements. +// These wrappers have no meaningful use within a map or a oneof since +// individual entries of a map or fields of a oneof can already detect presence. +// +import { ScalarType } from "@protobuf-ts/runtime"; +import { LongType } from "@protobuf-ts/runtime"; +import type { JsonValue } from "@protobuf-ts/runtime"; +import type { JsonReadOptions } from "@protobuf-ts/runtime"; +import type { JsonWriteOptions } from "@protobuf-ts/runtime"; +import { MessageType } from "@protobuf-ts/runtime"; +/** + * Wrapper message for `double`. + * + * The JSON representation for `DoubleValue` is JSON number. + * + * @generated from protobuf message google.protobuf.DoubleValue + */ +export interface DoubleValue { + /** + * The double value. + * + * @generated from protobuf field: double value = 1; + */ + value: number; +} +/** + * Wrapper message for `float`. + * + * The JSON representation for `FloatValue` is JSON number. + * + * @generated from protobuf message google.protobuf.FloatValue + */ +export interface FloatValue { + /** + * The float value. + * + * @generated from protobuf field: float value = 1; + */ + value: number; +} +/** + * Wrapper message for `int64`. + * + * The JSON representation for `Int64Value` is JSON string. + * + * @generated from protobuf message google.protobuf.Int64Value + */ +export interface Int64Value { + /** + * The int64 value. + * + * @generated from protobuf field: int64 value = 1; + */ + value: bigint; +} +/** + * Wrapper message for `uint64`. + * + * The JSON representation for `UInt64Value` is JSON string. + * + * @generated from protobuf message google.protobuf.UInt64Value + */ +export interface UInt64Value { + /** + * The uint64 value. + * + * @generated from protobuf field: uint64 value = 1; + */ + value: bigint; +} +/** + * Wrapper message for `int32`. + * + * The JSON representation for `Int32Value` is JSON number. + * + * @generated from protobuf message google.protobuf.Int32Value + */ +export interface Int32Value { + /** + * The int32 value. + * + * @generated from protobuf field: int32 value = 1; + */ + value: number; +} +/** + * Wrapper message for `uint32`. + * + * The JSON representation for `UInt32Value` is JSON number. + * + * @generated from protobuf message google.protobuf.UInt32Value + */ +export interface UInt32Value { + /** + * The uint32 value. + * + * @generated from protobuf field: uint32 value = 1; + */ + value: number; +} +/** + * Wrapper message for `bool`. + * + * The JSON representation for `BoolValue` is JSON `true` and `false`. + * + * @generated from protobuf message google.protobuf.BoolValue + */ +export interface BoolValue { + /** + * The bool value. + * + * @generated from protobuf field: bool value = 1; + */ + value: boolean; +} +/** + * Wrapper message for `string`. + * + * The JSON representation for `StringValue` is JSON string. + * + * @generated from protobuf message google.protobuf.StringValue + */ +export interface StringValue { + /** + * The string value. + * + * @generated from protobuf field: string value = 1; + */ + value: string; +} +/** + * Wrapper message for `bytes`. + * + * The JSON representation for `BytesValue` is JSON string. + * + * @generated from protobuf message google.protobuf.BytesValue + */ +export interface BytesValue { + /** + * The bytes value. + * + * @generated from protobuf field: bytes value = 1; + */ + value: Uint8Array; +} +// @generated message type with reflection information, may provide speed optimized methods +class DoubleValue$Type extends MessageType { + constructor() { + super("google.protobuf.DoubleValue", [ + { no: 1, name: "value", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ } + ]); + } + /** + * Encode `DoubleValue` to JSON number. + */ + internalJsonWrite(message: DoubleValue, options: JsonWriteOptions): JsonValue { + return this.refJsonWriter.scalar(2, message.value, "value", false, true); + } + /** + * Decode `DoubleValue` from JSON number. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: DoubleValue): DoubleValue { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 1, undefined, "value") as number; + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.DoubleValue + */ +export const DoubleValue = new DoubleValue$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class FloatValue$Type extends MessageType { + constructor() { + super("google.protobuf.FloatValue", [ + { no: 1, name: "value", kind: "scalar", T: 2 /*ScalarType.FLOAT*/ } + ]); + } + /** + * Encode `FloatValue` to JSON number. + */ + internalJsonWrite(message: FloatValue, options: JsonWriteOptions): JsonValue { + return this.refJsonWriter.scalar(1, message.value, "value", false, true); + } + /** + * Decode `FloatValue` from JSON number. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: FloatValue): FloatValue { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 1, undefined, "value") as number; + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.FloatValue + */ +export const FloatValue = new FloatValue$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Int64Value$Type extends MessageType { + constructor() { + super("google.protobuf.Int64Value", [ + { no: 1, name: "value", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } + /** + * Encode `Int64Value` to JSON string. + */ + internalJsonWrite(message: Int64Value, options: JsonWriteOptions): JsonValue { + return this.refJsonWriter.scalar(ScalarType.INT64, message.value, "value", false, true); + } + /** + * Decode `Int64Value` from JSON string. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Int64Value): Int64Value { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, ScalarType.INT64, LongType.BIGINT, "value") as any; + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.Int64Value + */ +export const Int64Value = new Int64Value$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UInt64Value$Type extends MessageType { + constructor() { + super("google.protobuf.UInt64Value", [ + { no: 1, name: "value", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } + /** + * Encode `UInt64Value` to JSON string. + */ + internalJsonWrite(message: UInt64Value, options: JsonWriteOptions): JsonValue { + return this.refJsonWriter.scalar(ScalarType.UINT64, message.value, "value", false, true); + } + /** + * Decode `UInt64Value` from JSON string. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: UInt64Value): UInt64Value { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, ScalarType.UINT64, LongType.BIGINT, "value") as any; + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.UInt64Value + */ +export const UInt64Value = new UInt64Value$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class Int32Value$Type extends MessageType { + constructor() { + super("google.protobuf.Int32Value", [ + { no: 1, name: "value", kind: "scalar", T: 5 /*ScalarType.INT32*/ } + ]); + } + /** + * Encode `Int32Value` to JSON string. + */ + internalJsonWrite(message: Int32Value, options: JsonWriteOptions): JsonValue { + return this.refJsonWriter.scalar(5, message.value, "value", false, true); + } + /** + * Decode `Int32Value` from JSON string. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Int32Value): Int32Value { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 5, undefined, "value") as number; + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.Int32Value + */ +export const Int32Value = new Int32Value$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class UInt32Value$Type extends MessageType { + constructor() { + super("google.protobuf.UInt32Value", [ + { no: 1, name: "value", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } + /** + * Encode `UInt32Value` to JSON string. + */ + internalJsonWrite(message: UInt32Value, options: JsonWriteOptions): JsonValue { + return this.refJsonWriter.scalar(13, message.value, "value", false, true); + } + /** + * Decode `UInt32Value` from JSON string. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: UInt32Value): UInt32Value { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 13, undefined, "value") as number; + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.UInt32Value + */ +export const UInt32Value = new UInt32Value$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BoolValue$Type extends MessageType { + constructor() { + super("google.protobuf.BoolValue", [ + { no: 1, name: "value", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } + /** + * Encode `BoolValue` to JSON bool. + */ + internalJsonWrite(message: BoolValue, options: JsonWriteOptions): JsonValue { + return message.value; + } + /** + * Decode `BoolValue` from JSON bool. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: BoolValue): BoolValue { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 8, undefined, "value") as boolean; + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.BoolValue + */ +export const BoolValue = new BoolValue$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class StringValue$Type extends MessageType { + constructor() { + super("google.protobuf.StringValue", [ + { no: 1, name: "value", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + /** + * Encode `StringValue` to JSON string. + */ + internalJsonWrite(message: StringValue, options: JsonWriteOptions): JsonValue { + return message.value; + } + /** + * Decode `StringValue` from JSON string. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: StringValue): StringValue { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 9, undefined, "value") as string; + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.StringValue + */ +export const StringValue = new StringValue$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BytesValue$Type extends MessageType { + constructor() { + super("google.protobuf.BytesValue", [ + { no: 1, name: "value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } + /** + * Encode `BytesValue` to JSON string. + */ + internalJsonWrite(message: BytesValue, options: JsonWriteOptions): JsonValue { + return this.refJsonWriter.scalar(12, message.value, "value", false, true); + } + /** + * Decode `BytesValue` from JSON string. + */ + internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: BytesValue): BytesValue { + if (!target) + target = this.create(); + target.value = this.refJsonReader.scalar(json, 12, undefined, "value") as Uint8Array; + return target; + } +} +/** + * @generated MessageType for protobuf message google.protobuf.BytesValue + */ +export const BytesValue = new BytesValue$Type(); diff --git a/src/generated/platform/v0/platform.client.ts b/src/generated/platform/v0/platform.client.ts new file mode 100644 index 0000000..42f5e6b --- /dev/null +++ b/src/generated/platform/v0/platform.client.ts @@ -0,0 +1,602 @@ +// @generated by protobuf-ts 2.9.6 with parameter optimize_code_size +// @generated from protobuf file "platform/v0/platform.proto" (package "org.dash.platform.dapi.v0", syntax proto3) +// tslint:disable +import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; +import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; +import { Platform } from "./platform.ts"; +import type { GetGroupActionSignersResponse } from "./platform.ts"; +import type { GetGroupActionSignersRequest } from "./platform.ts"; +import type { GetGroupActionsResponse } from "./platform.ts"; +import type { GetGroupActionsRequest } from "./platform.ts"; +import type { GetGroupInfosResponse } from "./platform.ts"; +import type { GetGroupInfosRequest } from "./platform.ts"; +import type { GetGroupInfoResponse } from "./platform.ts"; +import type { GetGroupInfoRequest } from "./platform.ts"; +import type { GetTokenTotalSupplyResponse } from "./platform.ts"; +import type { GetTokenTotalSupplyRequest } from "./platform.ts"; +import type { GetTokenPreProgrammedDistributionsResponse } from "./platform.ts"; +import type { GetTokenPreProgrammedDistributionsRequest } from "./platform.ts"; +import type { GetTokenStatusesResponse } from "./platform.ts"; +import type { GetTokenStatusesRequest } from "./platform.ts"; +import type { GetIdentitiesTokenInfosResponse } from "./platform.ts"; +import type { GetIdentitiesTokenInfosRequest } from "./platform.ts"; +import type { GetIdentityTokenInfosResponse } from "./platform.ts"; +import type { GetIdentityTokenInfosRequest } from "./platform.ts"; +import type { GetIdentitiesTokenBalancesResponse } from "./platform.ts"; +import type { GetIdentitiesTokenBalancesRequest } from "./platform.ts"; +import type { GetIdentityTokenBalancesResponse } from "./platform.ts"; +import type { GetIdentityTokenBalancesRequest } from "./platform.ts"; +import type { GetCurrentQuorumsInfoResponse } from "./platform.ts"; +import type { GetCurrentQuorumsInfoRequest } from "./platform.ts"; +import type { GetStatusResponse } from "./platform.ts"; +import type { GetStatusRequest } from "./platform.ts"; +import type { GetPathElementsResponse } from "./platform.ts"; +import type { GetPathElementsRequest } from "./platform.ts"; +import type { GetTotalCreditsInPlatformResponse } from "./platform.ts"; +import type { GetTotalCreditsInPlatformRequest } from "./platform.ts"; +import type { GetPrefundedSpecializedBalanceResponse } from "./platform.ts"; +import type { GetPrefundedSpecializedBalanceRequest } from "./platform.ts"; +import type { GetVotePollsByEndDateResponse } from "./platform.ts"; +import type { GetVotePollsByEndDateRequest } from "./platform.ts"; +import type { GetContestedResourceIdentityVotesResponse } from "./platform.ts"; +import type { GetContestedResourceIdentityVotesRequest } from "./platform.ts"; +import type { GetContestedResourceVotersForIdentityResponse } from "./platform.ts"; +import type { GetContestedResourceVotersForIdentityRequest } from "./platform.ts"; +import type { GetContestedResourceVoteStateResponse } from "./platform.ts"; +import type { GetContestedResourceVoteStateRequest } from "./platform.ts"; +import type { GetContestedResourcesResponse } from "./platform.ts"; +import type { GetContestedResourcesRequest } from "./platform.ts"; +import type { GetEpochsInfoResponse } from "./platform.ts"; +import type { GetEpochsInfoRequest } from "./platform.ts"; +import type { GetProtocolVersionUpgradeVoteStatusResponse } from "./platform.ts"; +import type { GetProtocolVersionUpgradeVoteStatusRequest } from "./platform.ts"; +import type { GetProtocolVersionUpgradeStateResponse } from "./platform.ts"; +import type { GetProtocolVersionUpgradeStateRequest } from "./platform.ts"; +import type { GetConsensusParamsResponse } from "./platform.ts"; +import type { GetConsensusParamsRequest } from "./platform.ts"; +import type { WaitForStateTransitionResultResponse } from "./platform.ts"; +import type { WaitForStateTransitionResultRequest } from "./platform.ts"; +import type { GetIdentityByPublicKeyHashResponse } from "./platform.ts"; +import type { GetIdentityByPublicKeyHashRequest } from "./platform.ts"; +import type { GetDocumentsResponse } from "./platform.ts"; +import type { GetDocumentsRequest } from "./platform.ts"; +import type { GetDataContractsResponse } from "./platform.ts"; +import type { GetDataContractsRequest } from "./platform.ts"; +import type { GetDataContractHistoryResponse } from "./platform.ts"; +import type { GetDataContractHistoryRequest } from "./platform.ts"; +import type { GetDataContractResponse } from "./platform.ts"; +import type { GetDataContractRequest } from "./platform.ts"; +import type { GetProofsResponse } from "./platform.ts"; +import type { GetProofsRequest } from "./platform.ts"; +import type { GetEvonodesProposedEpochBlocksByRangeRequest } from "./platform.ts"; +import type { GetEvonodesProposedEpochBlocksResponse } from "./platform.ts"; +import type { GetEvonodesProposedEpochBlocksByIdsRequest } from "./platform.ts"; +import type { GetIdentityBalanceAndRevisionResponse } from "./platform.ts"; +import type { GetIdentityBalanceAndRevisionRequest } from "./platform.ts"; +import type { GetIdentitiesBalancesResponse } from "./platform.ts"; +import type { GetIdentitiesBalancesRequest } from "./platform.ts"; +import type { GetIdentityBalanceResponse } from "./platform.ts"; +import type { GetIdentityBalanceRequest } from "./platform.ts"; +import type { GetIdentityContractNonceResponse } from "./platform.ts"; +import type { GetIdentityContractNonceRequest } from "./platform.ts"; +import type { GetIdentityNonceResponse } from "./platform.ts"; +import type { GetIdentityNonceRequest } from "./platform.ts"; +import type { GetIdentitiesContractKeysResponse } from "./platform.ts"; +import type { GetIdentitiesContractKeysRequest } from "./platform.ts"; +import type { GetIdentityKeysResponse } from "./platform.ts"; +import type { GetIdentityKeysRequest } from "./platform.ts"; +import type { GetIdentityResponse } from "./platform.ts"; +import type { GetIdentityRequest } from "./platform.ts"; +import { stackIntercept } from "@protobuf-ts/runtime-rpc"; +import type { BroadcastStateTransitionResponse } from "./platform.ts"; +import type { BroadcastStateTransitionRequest } from "./platform.ts"; +import type { UnaryCall } from "@protobuf-ts/runtime-rpc"; +import type { RpcOptions } from "@protobuf-ts/runtime-rpc"; +/** + * @generated from protobuf service org.dash.platform.dapi.v0.Platform + */ +export interface IPlatformClient { + /** + * @generated from protobuf rpc: broadcastStateTransition(org.dash.platform.dapi.v0.BroadcastStateTransitionRequest) returns (org.dash.platform.dapi.v0.BroadcastStateTransitionResponse); + */ + broadcastStateTransition(input: BroadcastStateTransitionRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentity(org.dash.platform.dapi.v0.GetIdentityRequest) returns (org.dash.platform.dapi.v0.GetIdentityResponse); + */ + getIdentity(input: GetIdentityRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityKeys(org.dash.platform.dapi.v0.GetIdentityKeysRequest) returns (org.dash.platform.dapi.v0.GetIdentityKeysResponse); + */ + getIdentityKeys(input: GetIdentityKeysRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentitiesContractKeys(org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse); + */ + getIdentitiesContractKeys(input: GetIdentitiesContractKeysRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityNonce(org.dash.platform.dapi.v0.GetIdentityNonceRequest) returns (org.dash.platform.dapi.v0.GetIdentityNonceResponse); + */ + getIdentityNonce(input: GetIdentityNonceRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityContractNonce(org.dash.platform.dapi.v0.GetIdentityContractNonceRequest) returns (org.dash.platform.dapi.v0.GetIdentityContractNonceResponse); + */ + getIdentityContractNonce(input: GetIdentityContractNonceRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityBalance(org.dash.platform.dapi.v0.GetIdentityBalanceRequest) returns (org.dash.platform.dapi.v0.GetIdentityBalanceResponse); + */ + getIdentityBalance(input: GetIdentityBalanceRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentitiesBalances(org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse); + */ + getIdentitiesBalances(input: GetIdentitiesBalancesRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityBalanceAndRevision(org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest) returns (org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse); + */ + getIdentityBalanceAndRevision(input: GetIdentityBalanceAndRevisionRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getEvonodesProposedEpochBlocksByIds(org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest) returns (org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse); + */ + getEvonodesProposedEpochBlocksByIds(input: GetEvonodesProposedEpochBlocksByIdsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getEvonodesProposedEpochBlocksByRange(org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest) returns (org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse); + */ + getEvonodesProposedEpochBlocksByRange(input: GetEvonodesProposedEpochBlocksByRangeRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getProofs(org.dash.platform.dapi.v0.GetProofsRequest) returns (org.dash.platform.dapi.v0.GetProofsResponse); + */ + getProofs(input: GetProofsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getDataContract(org.dash.platform.dapi.v0.GetDataContractRequest) returns (org.dash.platform.dapi.v0.GetDataContractResponse); + */ + getDataContract(input: GetDataContractRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getDataContractHistory(org.dash.platform.dapi.v0.GetDataContractHistoryRequest) returns (org.dash.platform.dapi.v0.GetDataContractHistoryResponse); + */ + getDataContractHistory(input: GetDataContractHistoryRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getDataContracts(org.dash.platform.dapi.v0.GetDataContractsRequest) returns (org.dash.platform.dapi.v0.GetDataContractsResponse); + */ + getDataContracts(input: GetDataContractsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getDocuments(org.dash.platform.dapi.v0.GetDocumentsRequest) returns (org.dash.platform.dapi.v0.GetDocumentsResponse); + */ + getDocuments(input: GetDocumentsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityByPublicKeyHash(org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest) returns (org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse); + */ + getIdentityByPublicKeyHash(input: GetIdentityByPublicKeyHashRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: waitForStateTransitionResult(org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest) returns (org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse); + */ + waitForStateTransitionResult(input: WaitForStateTransitionResultRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getConsensusParams(org.dash.platform.dapi.v0.GetConsensusParamsRequest) returns (org.dash.platform.dapi.v0.GetConsensusParamsResponse); + */ + getConsensusParams(input: GetConsensusParamsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getProtocolVersionUpgradeState(org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest) returns (org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse); + */ + getProtocolVersionUpgradeState(input: GetProtocolVersionUpgradeStateRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getProtocolVersionUpgradeVoteStatus(org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest) returns (org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse); + */ + getProtocolVersionUpgradeVoteStatus(input: GetProtocolVersionUpgradeVoteStatusRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getEpochsInfo(org.dash.platform.dapi.v0.GetEpochsInfoRequest) returns (org.dash.platform.dapi.v0.GetEpochsInfoResponse); + */ + getEpochsInfo(input: GetEpochsInfoRequest, options?: RpcOptions): UnaryCall; + /** + * What votes are currently happening for a specific contested index + * + * @generated from protobuf rpc: getContestedResources(org.dash.platform.dapi.v0.GetContestedResourcesRequest) returns (org.dash.platform.dapi.v0.GetContestedResourcesResponse); + */ + getContestedResources(input: GetContestedResourcesRequest, options?: RpcOptions): UnaryCall; + /** + * What's the state of a contested resource vote? (ie who is winning?) + * + * @generated from protobuf rpc: getContestedResourceVoteState(org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse); + */ + getContestedResourceVoteState(input: GetContestedResourceVoteStateRequest, options?: RpcOptions): UnaryCall; + /** + * Who voted for a contested resource to go to a specific identity? + * + * @generated from protobuf rpc: getContestedResourceVotersForIdentity(org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse); + */ + getContestedResourceVotersForIdentity(input: GetContestedResourceVotersForIdentityRequest, options?: RpcOptions): UnaryCall; + /** + * How did an identity vote? + * + * @generated from protobuf rpc: getContestedResourceIdentityVotes(org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse); + */ + getContestedResourceIdentityVotes(input: GetContestedResourceIdentityVotesRequest, options?: RpcOptions): UnaryCall; + /** + * What vote polls will end soon? + * + * @generated from protobuf rpc: getVotePollsByEndDate(org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest) returns (org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse); + */ + getVotePollsByEndDate(input: GetVotePollsByEndDateRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getPrefundedSpecializedBalance(org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest) returns (org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse); + */ + getPrefundedSpecializedBalance(input: GetPrefundedSpecializedBalanceRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTotalCreditsInPlatform(org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest) returns (org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse); + */ + getTotalCreditsInPlatform(input: GetTotalCreditsInPlatformRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getPathElements(org.dash.platform.dapi.v0.GetPathElementsRequest) returns (org.dash.platform.dapi.v0.GetPathElementsResponse); + */ + getPathElements(input: GetPathElementsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getStatus(org.dash.platform.dapi.v0.GetStatusRequest) returns (org.dash.platform.dapi.v0.GetStatusResponse); + */ + getStatus(input: GetStatusRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getCurrentQuorumsInfo(org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest) returns (org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse); + */ + getCurrentQuorumsInfo(input: GetCurrentQuorumsInfoRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityTokenBalances(org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse); + */ + getIdentityTokenBalances(input: GetIdentityTokenBalancesRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentitiesTokenBalances(org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse); + */ + getIdentitiesTokenBalances(input: GetIdentitiesTokenBalancesRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentityTokenInfos(org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest) returns (org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse); + */ + getIdentityTokenInfos(input: GetIdentityTokenInfosRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getIdentitiesTokenInfos(org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse); + */ + getIdentitiesTokenInfos(input: GetIdentitiesTokenInfosRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTokenStatuses(org.dash.platform.dapi.v0.GetTokenStatusesRequest) returns (org.dash.platform.dapi.v0.GetTokenStatusesResponse); + */ + getTokenStatuses(input: GetTokenStatusesRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTokenPreProgrammedDistributions(org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest) returns (org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse); + */ + getTokenPreProgrammedDistributions(input: GetTokenPreProgrammedDistributionsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getTokenTotalSupply(org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest) returns (org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse); + */ + getTokenTotalSupply(input: GetTokenTotalSupplyRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getGroupInfo(org.dash.platform.dapi.v0.GetGroupInfoRequest) returns (org.dash.platform.dapi.v0.GetGroupInfoResponse); + */ + getGroupInfo(input: GetGroupInfoRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getGroupInfos(org.dash.platform.dapi.v0.GetGroupInfosRequest) returns (org.dash.platform.dapi.v0.GetGroupInfosResponse); + */ + getGroupInfos(input: GetGroupInfosRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getGroupActions(org.dash.platform.dapi.v0.GetGroupActionsRequest) returns (org.dash.platform.dapi.v0.GetGroupActionsResponse); + */ + getGroupActions(input: GetGroupActionsRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: getGroupActionSigners(org.dash.platform.dapi.v0.GetGroupActionSignersRequest) returns (org.dash.platform.dapi.v0.GetGroupActionSignersResponse); + */ + getGroupActionSigners(input: GetGroupActionSignersRequest, options?: RpcOptions): UnaryCall; +} +/** + * @generated from protobuf service org.dash.platform.dapi.v0.Platform + */ +export class PlatformClient implements IPlatformClient, ServiceInfo { + typeName = Platform.typeName; + methods = Platform.methods; + options = Platform.options; + constructor(private readonly _transport: RpcTransport) { + } + /** + * @generated from protobuf rpc: broadcastStateTransition(org.dash.platform.dapi.v0.BroadcastStateTransitionRequest) returns (org.dash.platform.dapi.v0.BroadcastStateTransitionResponse); + */ + broadcastStateTransition(input: BroadcastStateTransitionRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[0], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentity(org.dash.platform.dapi.v0.GetIdentityRequest) returns (org.dash.platform.dapi.v0.GetIdentityResponse); + */ + getIdentity(input: GetIdentityRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[1], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityKeys(org.dash.platform.dapi.v0.GetIdentityKeysRequest) returns (org.dash.platform.dapi.v0.GetIdentityKeysResponse); + */ + getIdentityKeys(input: GetIdentityKeysRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[2], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentitiesContractKeys(org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse); + */ + getIdentitiesContractKeys(input: GetIdentitiesContractKeysRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[3], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityNonce(org.dash.platform.dapi.v0.GetIdentityNonceRequest) returns (org.dash.platform.dapi.v0.GetIdentityNonceResponse); + */ + getIdentityNonce(input: GetIdentityNonceRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[4], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityContractNonce(org.dash.platform.dapi.v0.GetIdentityContractNonceRequest) returns (org.dash.platform.dapi.v0.GetIdentityContractNonceResponse); + */ + getIdentityContractNonce(input: GetIdentityContractNonceRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[5], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityBalance(org.dash.platform.dapi.v0.GetIdentityBalanceRequest) returns (org.dash.platform.dapi.v0.GetIdentityBalanceResponse); + */ + getIdentityBalance(input: GetIdentityBalanceRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[6], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentitiesBalances(org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse); + */ + getIdentitiesBalances(input: GetIdentitiesBalancesRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[7], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityBalanceAndRevision(org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest) returns (org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse); + */ + getIdentityBalanceAndRevision(input: GetIdentityBalanceAndRevisionRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[8], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getEvonodesProposedEpochBlocksByIds(org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest) returns (org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse); + */ + getEvonodesProposedEpochBlocksByIds(input: GetEvonodesProposedEpochBlocksByIdsRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[9], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getEvonodesProposedEpochBlocksByRange(org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest) returns (org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse); + */ + getEvonodesProposedEpochBlocksByRange(input: GetEvonodesProposedEpochBlocksByRangeRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[10], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getProofs(org.dash.platform.dapi.v0.GetProofsRequest) returns (org.dash.platform.dapi.v0.GetProofsResponse); + */ + getProofs(input: GetProofsRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[11], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getDataContract(org.dash.platform.dapi.v0.GetDataContractRequest) returns (org.dash.platform.dapi.v0.GetDataContractResponse); + */ + getDataContract(input: GetDataContractRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[12], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getDataContractHistory(org.dash.platform.dapi.v0.GetDataContractHistoryRequest) returns (org.dash.platform.dapi.v0.GetDataContractHistoryResponse); + */ + getDataContractHistory(input: GetDataContractHistoryRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[13], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getDataContracts(org.dash.platform.dapi.v0.GetDataContractsRequest) returns (org.dash.platform.dapi.v0.GetDataContractsResponse); + */ + getDataContracts(input: GetDataContractsRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[14], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getDocuments(org.dash.platform.dapi.v0.GetDocumentsRequest) returns (org.dash.platform.dapi.v0.GetDocumentsResponse); + */ + getDocuments(input: GetDocumentsRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[15], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityByPublicKeyHash(org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest) returns (org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse); + */ + getIdentityByPublicKeyHash(input: GetIdentityByPublicKeyHashRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[16], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: waitForStateTransitionResult(org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest) returns (org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse); + */ + waitForStateTransitionResult(input: WaitForStateTransitionResultRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[17], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getConsensusParams(org.dash.platform.dapi.v0.GetConsensusParamsRequest) returns (org.dash.platform.dapi.v0.GetConsensusParamsResponse); + */ + getConsensusParams(input: GetConsensusParamsRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[18], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getProtocolVersionUpgradeState(org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest) returns (org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse); + */ + getProtocolVersionUpgradeState(input: GetProtocolVersionUpgradeStateRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[19], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getProtocolVersionUpgradeVoteStatus(org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest) returns (org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse); + */ + getProtocolVersionUpgradeVoteStatus(input: GetProtocolVersionUpgradeVoteStatusRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[20], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getEpochsInfo(org.dash.platform.dapi.v0.GetEpochsInfoRequest) returns (org.dash.platform.dapi.v0.GetEpochsInfoResponse); + */ + getEpochsInfo(input: GetEpochsInfoRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[21], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * What votes are currently happening for a specific contested index + * + * @generated from protobuf rpc: getContestedResources(org.dash.platform.dapi.v0.GetContestedResourcesRequest) returns (org.dash.platform.dapi.v0.GetContestedResourcesResponse); + */ + getContestedResources(input: GetContestedResourcesRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[22], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * What's the state of a contested resource vote? (ie who is winning?) + * + * @generated from protobuf rpc: getContestedResourceVoteState(org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse); + */ + getContestedResourceVoteState(input: GetContestedResourceVoteStateRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[23], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * Who voted for a contested resource to go to a specific identity? + * + * @generated from protobuf rpc: getContestedResourceVotersForIdentity(org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse); + */ + getContestedResourceVotersForIdentity(input: GetContestedResourceVotersForIdentityRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[24], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * How did an identity vote? + * + * @generated from protobuf rpc: getContestedResourceIdentityVotes(org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest) returns (org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse); + */ + getContestedResourceIdentityVotes(input: GetContestedResourceIdentityVotesRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[25], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * What vote polls will end soon? + * + * @generated from protobuf rpc: getVotePollsByEndDate(org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest) returns (org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse); + */ + getVotePollsByEndDate(input: GetVotePollsByEndDateRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[26], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getPrefundedSpecializedBalance(org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest) returns (org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse); + */ + getPrefundedSpecializedBalance(input: GetPrefundedSpecializedBalanceRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[27], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getTotalCreditsInPlatform(org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest) returns (org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse); + */ + getTotalCreditsInPlatform(input: GetTotalCreditsInPlatformRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[28], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getPathElements(org.dash.platform.dapi.v0.GetPathElementsRequest) returns (org.dash.platform.dapi.v0.GetPathElementsResponse); + */ + getPathElements(input: GetPathElementsRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[29], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getStatus(org.dash.platform.dapi.v0.GetStatusRequest) returns (org.dash.platform.dapi.v0.GetStatusResponse); + */ + getStatus(input: GetStatusRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[30], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getCurrentQuorumsInfo(org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest) returns (org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse); + */ + getCurrentQuorumsInfo(input: GetCurrentQuorumsInfoRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[31], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityTokenBalances(org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse); + */ + getIdentityTokenBalances(input: GetIdentityTokenBalancesRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[32], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentitiesTokenBalances(org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse); + */ + getIdentitiesTokenBalances(input: GetIdentitiesTokenBalancesRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[33], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentityTokenInfos(org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest) returns (org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse); + */ + getIdentityTokenInfos(input: GetIdentityTokenInfosRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[34], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getIdentitiesTokenInfos(org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest) returns (org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse); + */ + getIdentitiesTokenInfos(input: GetIdentitiesTokenInfosRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[35], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getTokenStatuses(org.dash.platform.dapi.v0.GetTokenStatusesRequest) returns (org.dash.platform.dapi.v0.GetTokenStatusesResponse); + */ + getTokenStatuses(input: GetTokenStatusesRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[36], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getTokenPreProgrammedDistributions(org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest) returns (org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse); + */ + getTokenPreProgrammedDistributions(input: GetTokenPreProgrammedDistributionsRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[37], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getTokenTotalSupply(org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest) returns (org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse); + */ + getTokenTotalSupply(input: GetTokenTotalSupplyRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[38], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getGroupInfo(org.dash.platform.dapi.v0.GetGroupInfoRequest) returns (org.dash.platform.dapi.v0.GetGroupInfoResponse); + */ + getGroupInfo(input: GetGroupInfoRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[39], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getGroupInfos(org.dash.platform.dapi.v0.GetGroupInfosRequest) returns (org.dash.platform.dapi.v0.GetGroupInfosResponse); + */ + getGroupInfos(input: GetGroupInfosRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[40], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getGroupActions(org.dash.platform.dapi.v0.GetGroupActionsRequest) returns (org.dash.platform.dapi.v0.GetGroupActionsResponse); + */ + getGroupActions(input: GetGroupActionsRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[41], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } + /** + * @generated from protobuf rpc: getGroupActionSigners(org.dash.platform.dapi.v0.GetGroupActionSignersRequest) returns (org.dash.platform.dapi.v0.GetGroupActionSignersResponse); + */ + getGroupActionSigners(input: GetGroupActionSignersRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[42], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } +} diff --git a/src/generated/platform/v0/platform.ts b/src/generated/platform/v0/platform.ts new file mode 100644 index 0000000..b1719ea --- /dev/null +++ b/src/generated/platform/v0/platform.ts @@ -0,0 +1,8984 @@ +// @generated by protobuf-ts 2.9.6 with parameter optimize_code_size +// @generated from protobuf file "platform/v0/platform.proto" (package "org.dash.platform.dapi.v0", syntax proto3) +// tslint:disable +import { ServiceType } from "@protobuf-ts/runtime-rpc"; +import { MessageType } from "@protobuf-ts/runtime"; +import { BytesValue } from "../../google/protobuf/wrappers.ts"; +import { UInt32Value } from "../../google/protobuf/wrappers.ts"; +/** + * Proof message includes cryptographic proofs for validating responses + * + * @generated from protobuf message org.dash.platform.dapi.v0.Proof + */ +export interface Proof { + /** + * @generated from protobuf field: bytes grovedb_proof = 1; + */ + grovedbProof: Uint8Array; // GroveDB proof for the data + /** + * @generated from protobuf field: bytes quorum_hash = 2; + */ + quorumHash: Uint8Array; // Hash of the quorum validating the data + /** + * @generated from protobuf field: bytes signature = 3; + */ + signature: Uint8Array; // Signature proving data authenticity + /** + * @generated from protobuf field: uint32 round = 4; + */ + round: number; // Consensus round number + /** + * @generated from protobuf field: bytes block_id_hash = 5; + */ + blockIdHash: Uint8Array; // Hash of the block ID + /** + * @generated from protobuf field: uint32 quorum_type = 6; + */ + quorumType: number; // Type of the quorum +} +/** + * ResponseMetadata provides metadata about the blockchain state at the time of response + * + * @generated from protobuf message org.dash.platform.dapi.v0.ResponseMetadata + */ +export interface ResponseMetadata { + /** + * @generated from protobuf field: uint64 height = 1 [jstype = JS_STRING]; + */ + height: string; // Current blockchain height + /** + * @generated from protobuf field: uint32 core_chain_locked_height = 2; + */ + coreChainLockedHeight: number; // Latest known core height in consensus + /** + * @generated from protobuf field: uint32 epoch = 3; + */ + epoch: number; // Current epoch number + /** + * @generated from protobuf field: uint64 time_ms = 4 [jstype = JS_STRING]; + */ + timeMs: string; // Timestamp in milliseconds + /** + * @generated from protobuf field: uint32 protocol_version = 5; + */ + protocolVersion: number; // Protocol version + /** + * @generated from protobuf field: string chain_id = 6; + */ + chainId: string; // Identifier of the blockchain +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.StateTransitionBroadcastError + */ +export interface StateTransitionBroadcastError { + /** + * @generated from protobuf field: uint32 code = 1; + */ + code: number; + /** + * @generated from protobuf field: string message = 2; + */ + message: string; + /** + * @generated from protobuf field: bytes data = 3; + */ + data: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BroadcastStateTransitionRequest + */ +export interface BroadcastStateTransitionRequest { + /** + * @generated from protobuf field: bytes state_transition = 1; + */ + stateTransition: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.BroadcastStateTransitionResponse + */ +export interface BroadcastStateTransitionResponse { +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityRequest + */ +export interface GetIdentityRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0 v0 = 1; + */ + v0: GetIdentityRequest_GetIdentityRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0 + */ +export interface GetIdentityRequest_GetIdentityRequestV0 { + /** + * @generated from protobuf field: bytes id = 1; + */ + id: Uint8Array; // The ID of the identity being requested + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityNonceRequest + */ +export interface GetIdentityNonceRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0 v0 = 1; + */ + v0: GetIdentityNonceRequest_GetIdentityNonceRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0 + */ +export interface GetIdentityNonceRequest_GetIdentityNonceRequestV0 { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceRequest + */ +export interface GetIdentityContractNonceRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0 v0 = 1; + */ + v0: GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0 + */ +export interface GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0 { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: bytes contract_id = 2; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceRequest + */ +export interface GetIdentityBalanceRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0 v0 = 1; + */ + v0: GetIdentityBalanceRequest_GetIdentityBalanceRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0 + */ +export interface GetIdentityBalanceRequest_GetIdentityBalanceRequestV0 { + /** + * @generated from protobuf field: bytes id = 1; + */ + id: Uint8Array; // ID of the identity whose balance is requested + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest + */ +export interface GetIdentityBalanceAndRevisionRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0 v0 = 1; + */ + v0: GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0 + */ +export interface GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0 { + /** + * @generated from protobuf field: bytes id = 1; + */ + id: Uint8Array; // ID of the identity for balance and revision + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityResponse + */ +export interface GetIdentityResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0 v0 = 1; + */ + v0: GetIdentityResponse_GetIdentityResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0 + */ +export interface GetIdentityResponse_GetIdentityResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identity"; + /** + * @generated from protobuf field: bytes identity = 1; + */ + identity: Uint8Array; // The requested identity data + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Proof of the identity data, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityNonceResponse + */ +export interface GetIdentityNonceResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0 v0 = 1; + */ + v0: GetIdentityNonceResponse_GetIdentityNonceResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0 + */ +export interface GetIdentityNonceResponse_GetIdentityNonceResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identityNonce"; + /** + * @generated from protobuf field: uint64 identity_nonce = 1 [jstype = JS_STRING]; + */ + identityNonce: string; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceResponse + */ +export interface GetIdentityContractNonceResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0 v0 = 1; + */ + v0: GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0 + */ +export interface GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identityContractNonce"; + /** + * @generated from protobuf field: uint64 identity_contract_nonce = 1 [jstype = JS_STRING]; + */ + identityContractNonce: string; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceResponse + */ +export interface GetIdentityBalanceResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0 v0 = 1; + */ + v0: GetIdentityBalanceResponse_GetIdentityBalanceResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0 + */ +export interface GetIdentityBalanceResponse_GetIdentityBalanceResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "balance"; + /** + * @generated from protobuf field: uint64 balance = 1 [jstype = JS_STRING]; + */ + balance: string; // The balance of the requested identity + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Proof of the balance, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse + */ +export interface GetIdentityBalanceAndRevisionResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0 v0 = 1; + */ + v0: GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0 + */ +export interface GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "balanceAndRevision"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision balance_and_revision = 1; + */ + balanceAndRevision: GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision; // The balance and revision data + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Proof of the data, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision + */ +export interface GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision { + /** + * @generated from protobuf field: uint64 balance = 1 [jstype = JS_STRING]; + */ + balance: string; // Balance of the identity + /** + * @generated from protobuf field: uint64 revision = 2 [jstype = JS_STRING]; + */ + revision: string; // Revision number of the identity +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.KeyRequestType + */ +export interface KeyRequestType { + /** + * @generated from protobuf oneof: request + */ + request: { + oneofKind: "allKeys"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.AllKeys all_keys = 1; + */ + allKeys: AllKeys; // Request for all keys + } | { + oneofKind: "specificKeys"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.SpecificKeys specific_keys = 2; + */ + specificKeys: SpecificKeys; // Request for specific keys by their IDs + } | { + oneofKind: "searchKey"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.SearchKey search_key = 3; + */ + searchKey: SearchKey; // Request for keys based on a search criteria + } | { + oneofKind: undefined; + }; +} +/** + * AllKeys is an empty message used to signify a request for all keys + * + * @generated from protobuf message org.dash.platform.dapi.v0.AllKeys + */ +export interface AllKeys { +} +/** + * SpecificKeys is used to request specific keys by their IDs + * + * @generated from protobuf message org.dash.platform.dapi.v0.SpecificKeys + */ +export interface SpecificKeys { + /** + * @generated from protobuf field: repeated uint32 key_ids = 1; + */ + keyIds: number[]; // List of key IDs +} +/** + * SearchKey represents a request to search for keys based on specific criteria + * + * @generated from protobuf message org.dash.platform.dapi.v0.SearchKey + */ +export interface SearchKey { + /** + * @generated from protobuf field: map purpose_map = 1; + */ + purposeMap: { + [key: number]: SecurityLevelMap; + }; // Map of purposes to their security level maps +} +/** + * SecurityLevelMap maps security levels to a request type for key retrieval + * + * @generated from protobuf message org.dash.platform.dapi.v0.SecurityLevelMap + */ +export interface SecurityLevelMap { + /** + * @generated from protobuf field: map security_level_map = 1; + */ + securityLevelMap: { + [key: number]: SecurityLevelMap_KeyKindRequestType; + }; // Maps security levels to key request types +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType + */ +export enum SecurityLevelMap_KeyKindRequestType { + /** + * Request the current key of a particular kind + * + * @generated from protobuf enum value: CURRENT_KEY_OF_KIND_REQUEST = 0; + */ + CURRENT_KEY_OF_KIND_REQUEST = 0, + /** + * Request all keys of a particular kind + * + * @generated from protobuf enum value: ALL_KEYS_OF_KIND_REQUEST = 1; + */ + ALL_KEYS_OF_KIND_REQUEST = 1 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityKeysRequest + */ +export interface GetIdentityKeysRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0 v0 = 1; + */ + v0: GetIdentityKeysRequest_GetIdentityKeysRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0 + */ +export interface GetIdentityKeysRequest_GetIdentityKeysRequestV0 { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; // ID of the identity for key retrieval + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.KeyRequestType request_type = 2; + */ + requestType?: KeyRequestType; // Type of key request: all, specific, or search + /** + * @generated from protobuf field: google.protobuf.UInt32Value limit = 3; + */ + limit?: UInt32Value; // Limit on the number of keys to be returned + /** + * @generated from protobuf field: google.protobuf.UInt32Value offset = 4; + */ + offset?: UInt32Value; // Offset for pagination through the keys + /** + * @generated from protobuf field: bool prove = 5; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse + */ +export interface GetIdentityKeysResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0 v0 = 1; + */ + v0: GetIdentityKeysResponse_GetIdentityKeysResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0 + */ +export interface GetIdentityKeysResponse_GetIdentityKeysResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "keys"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys keys = 1; + */ + keys: GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys; // The actual key data + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Proof of the keys data, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys + */ +export interface GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys { + /** + * @generated from protobuf field: repeated bytes keys_bytes = 1; + */ + keysBytes: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest + */ +export interface GetIdentitiesContractKeysRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0 v0 = 1; + */ + v0: GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0 + */ +export interface GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0 { + /** + * @generated from protobuf field: repeated bytes identities_ids = 1; + */ + identitiesIds: Uint8Array[]; + /** + * @generated from protobuf field: bytes contract_id = 2; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: optional string document_type_name = 3; + */ + documentTypeName?: string; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.KeyPurpose purposes = 4; + */ + purposes: KeyPurpose[]; + /** + * @generated from protobuf field: bool prove = 5; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse + */ +export interface GetIdentitiesContractKeysResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0 v0 = 1; + */ + v0: GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0 + */ +export interface GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identitiesKeys"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys identities_keys = 1; + */ + identitiesKeys: GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys + */ +export interface GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.KeyPurpose purpose = 1; + */ + purpose: KeyPurpose; + /** + * @generated from protobuf field: repeated bytes keys_bytes = 2; + */ + keysBytes: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys + */ +export interface GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys keys = 2; + */ + keys: GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys + */ +export interface GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys entries = 1; + */ + entries: GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + */ +export interface GetEvonodesProposedEpochBlocksByIdsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 v0 = 1; + */ + v0: GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + */ +export interface GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 { + /** + * @generated from protobuf field: optional uint32 epoch = 1; + */ + epoch?: number; // The epoch we are querying for, if none is set, get current epoch + /** + * @generated from protobuf field: repeated bytes ids = 2; + */ + ids: Uint8Array[]; // IDs of the evonodes for which we want to get their proposed blocks + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + */ +export interface GetEvonodesProposedEpochBlocksResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 v0 = 1; + */ + v0: GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + */ +export interface GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "evonodesProposedBlockCountsInfo"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks evonodes_proposed_block_counts_info = 1; + */ + evonodesProposedBlockCountsInfo: GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks; // The actual result + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Proof of the keys data, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + */ +export interface GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks { + /** + * @generated from protobuf field: bytes pro_tx_hash = 1; + */ + proTxHash: Uint8Array; + /** + * @generated from protobuf field: uint64 count = 2 [jstype = JS_STRING]; + */ + count: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + */ +export interface GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks evonodes_proposed_block_counts = 1; + */ + evonodesProposedBlockCounts: GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + */ +export interface GetEvonodesProposedEpochBlocksByRangeRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 v0 = 1; + */ + v0: GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + */ +export interface GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 { + /** + * @generated from protobuf field: optional uint32 epoch = 1; + */ + epoch?: number; // The epoch we are querying for, if none is set, get current epoch + /** + * @generated from protobuf field: optional uint32 limit = 2; + */ + limit?: number; // Maximum number of evonodes proposed epoch blocks to return + /** + * @generated from protobuf oneof: start + */ + start: { + oneofKind: "startAfter"; + /** + * @generated from protobuf field: bytes start_after = 3; + */ + startAfter: Uint8Array; // Start retrieval after this document + } | { + oneofKind: "startAt"; + /** + * @generated from protobuf field: bytes start_at = 4; + */ + startAt: Uint8Array; // Start retrieval at this document + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: bool prove = 5; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + */ +export interface GetIdentitiesBalancesRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 v0 = 1; + */ + v0: GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + */ +export interface GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 { + /** + * @generated from protobuf field: repeated bytes ids = 1; + */ + ids: Uint8Array[]; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + */ +export interface GetIdentitiesBalancesResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 v0 = 1; + */ + v0: GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + */ +export interface GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identitiesBalances"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances identities_balances = 1; + */ + identitiesBalances: GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + */ +export interface GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: optional uint64 balance = 2 [jstype = JS_STRING]; + */ + balance?: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + */ +export interface GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance entries = 1; + */ + entries: GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest + */ +export interface GetProofsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 v0 = 1; + */ + v0: GetProofsRequest_GetProofsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 + */ +export interface GetProofsRequest_GetProofsRequestV0 { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest identities = 1; + */ + identities: GetProofsRequest_GetProofsRequestV0_IdentityRequest[]; // List of identity requests + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest contracts = 2; + */ + contracts: GetProofsRequest_GetProofsRequestV0_ContractRequest[]; // List of contract requests + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest documents = 3; + */ + documents: GetProofsRequest_GetProofsRequestV0_DocumentRequest[]; // List of document requests + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest votes = 4; + */ + votes: GetProofsRequest_GetProofsRequestV0_VoteStatusRequest[]; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest identity_token_balances = 5; + */ + identityTokenBalances: GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest[]; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest identity_token_infos = 6; + */ + identityTokenInfos: GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest[]; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest token_statuses = 7; + */ + tokenStatuses: GetProofsRequest_GetProofsRequestV0_TokenStatusRequest[]; +} +/** + * DocumentRequest specifies a request for a document proof + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_DocumentRequest { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; // ID of the contract the document belongs to + /** + * @generated from protobuf field: string document_type = 2; + */ + documentType: string; // Type of document being requested + /** + * @generated from protobuf field: bool document_type_keeps_history = 3; + */ + documentTypeKeepsHistory: boolean; // Indicates if the document type keeps a history of changes + /** + * @generated from protobuf field: bytes document_id = 4; + */ + documentId: Uint8Array; // ID of the specific document being requested + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus document_contested_status = 5; + */ + documentContestedStatus: GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus + */ +export enum GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus { + /** + * @generated from protobuf enum value: NOT_CONTESTED = 0; + */ + NOT_CONTESTED = 0, + /** + * @generated from protobuf enum value: MAYBE_CONTESTED = 1; + */ + MAYBE_CONTESTED = 1, + /** + * @generated from protobuf enum value: CONTESTED = 2; + */ + CONTESTED = 2 +} +/** + * IdentityRequest specifies a request for an identity proof + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_IdentityRequest { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; // ID of the identity for which the proof is requested + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type request_type = 2; + */ + requestType: GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type; // Type of identity request +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type + */ +export enum GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type { + /** + * Request for the full identity + * + * @generated from protobuf enum value: FULL_IDENTITY = 0; + */ + FULL_IDENTITY = 0, + /** + * Request for the identity's balance + * + * @generated from protobuf enum value: BALANCE = 1; + */ + BALANCE = 1, + /** + * Request for the identity's keys + * + * @generated from protobuf enum value: KEYS = 2; + */ + KEYS = 2, + /** + * Request for the identity's revision + * + * @generated from protobuf enum value: REVISION = 3; + */ + REVISION = 3 +} +/** + * ContractRequest specifies a request for a data contract proof. + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_ContractRequest { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_VoteStatusRequest { + /** + * @generated from protobuf oneof: request_type + */ + requestType: { + oneofKind: "contestedResourceVoteStatusRequest"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest contested_resource_vote_status_request = 1; + */ + contestedResourceVoteStatusRequest: GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: string document_type_name = 2; + */ + documentTypeName: string; + /** + * @generated from protobuf field: string index_name = 3; + */ + indexName: string; + /** + * @generated from protobuf field: repeated bytes index_values = 4; + */ + indexValues: Uint8Array[]; + /** + * @generated from protobuf field: bytes voter_identifier = 5; + */ + voterIdentifier: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: bytes identity_id = 2; + */ + identityId: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: bytes identity_id = 2; + */ + identityId: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + */ +export interface GetProofsRequest_GetProofsRequestV0_TokenStatusRequest { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsResponse + */ +export interface GetProofsResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0 v0 = 1; + */ + v0: GetProofsResponse_GetProofsResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0 + */ +export interface GetProofsResponse_GetProofsResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 1; + */ + proof: Proof; // Cryptographic proof for the requested data + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 2; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractRequest + */ +export interface GetDataContractRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0 v0 = 1; + */ + v0: GetDataContractRequest_GetDataContractRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0 + */ +export interface GetDataContractRequest_GetDataContractRequestV0 { + /** + * @generated from protobuf field: bytes id = 1; + */ + id: Uint8Array; // The ID of the data contract being requested + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractResponse + */ +export interface GetDataContractResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0 v0 = 1; + */ + v0: GetDataContractResponse_GetDataContractResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0 + */ +export interface GetDataContractResponse_GetDataContractResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "dataContract"; + /** + * @generated from protobuf field: bytes data_contract = 1; + */ + dataContract: Uint8Array; // The actual data contract in binary form + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Cryptographic proof of the data contract, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractsRequest + */ +export interface GetDataContractsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0 v0 = 1; + */ + v0: GetDataContractsRequest_GetDataContractsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0 + */ +export interface GetDataContractsRequest_GetDataContractsRequestV0 { + /** + * @generated from protobuf field: repeated bytes ids = 1; + */ + ids: Uint8Array[]; // A list of unique IDs for the data contracts being requested + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse + */ +export interface GetDataContractsResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0 v0 = 1; + */ + v0: GetDataContractsResponse_GetDataContractsResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry + */ +export interface GetDataContractsResponse_DataContractEntry { + /** + * @generated from protobuf field: bytes identifier = 1; + */ + identifier: Uint8Array; // The unique identifier of the data contract + /** + * @generated from protobuf field: google.protobuf.BytesValue data_contract = 2; + */ + dataContract?: BytesValue; // The actual data contract content +} +/** + * DataContracts is a collection of data contract entries. + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts + */ +export interface GetDataContractsResponse_DataContracts { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry data_contract_entries = 1; + */ + dataContractEntries: GetDataContractsResponse_DataContractEntry[]; // A list of data contract entries +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0 + */ +export interface GetDataContractsResponse_GetDataContractsResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "dataContracts"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts data_contracts = 1; + */ + dataContracts: GetDataContractsResponse_DataContracts; // The actual data contracts requested + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Cryptographic proof for the data contracts, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryRequest + */ +export interface GetDataContractHistoryRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0 v0 = 1; + */ + v0: GetDataContractHistoryRequest_GetDataContractHistoryRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0 + */ +export interface GetDataContractHistoryRequest_GetDataContractHistoryRequestV0 { + /** + * @generated from protobuf field: bytes id = 1; + */ + id: Uint8Array; // The unique ID of the data contract + /** + * @generated from protobuf field: google.protobuf.UInt32Value limit = 2; + */ + limit?: UInt32Value; // The maximum number of history entries to return + /** + * @generated from protobuf field: google.protobuf.UInt32Value offset = 3; + */ + offset?: UInt32Value; // The offset for pagination through the contract history + /** + * @generated from protobuf field: uint64 start_at_ms = 4 [jstype = JS_STRING]; + */ + startAtMs: string; // Only return results starting at this time in milliseconds + /** + * @generated from protobuf field: bool prove = 5; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse + */ +export interface GetDataContractHistoryResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0 v0 = 1; + */ + v0: GetDataContractHistoryResponse_GetDataContractHistoryResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0 + */ +export interface GetDataContractHistoryResponse_GetDataContractHistoryResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "dataContractHistory"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory data_contract_history = 1; + */ + dataContractHistory: GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory; // The actual history of the data contract + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Cryptographic proof of the data contract history, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * Represents a single entry in the data contract's history + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry + */ +export interface GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry { + /** + * @generated from protobuf field: uint64 date = 1 [jstype = JS_STRING]; + */ + date: string; // The date of the history entry + /** + * @generated from protobuf field: bytes value = 2; + */ + value: Uint8Array; // The value of the data contract at this point in history +} +/** + * Collection of data contract history entries + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory + */ +export interface GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry data_contract_entries = 1; + */ + dataContractEntries: GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry[]; // List of history entries +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDocumentsRequest + */ +export interface GetDocumentsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0 v0 = 1; + */ + v0: GetDocumentsRequest_GetDocumentsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0 + */ +export interface GetDocumentsRequest_GetDocumentsRequestV0 { + /** + * @generated from protobuf field: bytes data_contract_id = 1; + */ + dataContractId: Uint8Array; // The ID of the data contract containing the documents + /** + * @generated from protobuf field: string document_type = 2; + */ + documentType: string; // The type of document being requested + /** + * @generated from protobuf field: bytes where = 3; + */ + where: Uint8Array; // Conditions to be met by the requested documents + /** + * @generated from protobuf field: bytes order_by = 4; + */ + orderBy: Uint8Array; // Ordering criteria for the documents + /** + * @generated from protobuf field: uint32 limit = 5; + */ + limit: number; // Maximum number of documents to return + /** + * @generated from protobuf oneof: start + */ + start: { + oneofKind: "startAfter"; + /** + * @generated from protobuf field: bytes start_after = 6; + */ + startAfter: Uint8Array; // Start retrieval after this document + } | { + oneofKind: "startAt"; + /** + * @generated from protobuf field: bytes start_at = 7; + */ + startAt: Uint8Array; // Start retrieval at this document + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: bool prove = 8; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse + */ +export interface GetDocumentsResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0 v0 = 1; + */ + v0: GetDocumentsResponse_GetDocumentsResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0 + */ +export interface GetDocumentsResponse_GetDocumentsResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "documents"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents documents = 1; + */ + documents: GetDocumentsResponse_GetDocumentsResponseV0_Documents; // The actual documents requested + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Cryptographic proof of the documents, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * Represents a collection of documents + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents + */ +export interface GetDocumentsResponse_GetDocumentsResponseV0_Documents { + /** + * @generated from protobuf field: repeated bytes documents = 1; + */ + documents: Uint8Array[]; // The actual documents in binary form +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest + */ +export interface GetIdentityByPublicKeyHashRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0 v0 = 1; + */ + v0: GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0 + */ +export interface GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0 { + /** + * @generated from protobuf field: bytes public_key_hash = 1; + */ + publicKeyHash: Uint8Array; // The public key hash of the identity being requested + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse + */ +export interface GetIdentityByPublicKeyHashResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0 v0 = 1; + */ + v0: GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0 + */ +export interface GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identity"; + /** + * @generated from protobuf field: bytes identity = 1; + */ + identity: Uint8Array; // The actual identity data corresponding to the requested public key hash + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Cryptographic proof for the identity data, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest + */ +export interface WaitForStateTransitionResultRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0 v0 = 1; + */ + v0: WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0 + */ +export interface WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0 { + /** + * @generated from protobuf field: bytes state_transition_hash = 1; + */ + stateTransitionHash: Uint8Array; // The hash of the state transition to wait for + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse + */ +export interface WaitForStateTransitionResultResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0 v0 = 1; + */ + v0: WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0 + */ +export interface WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "error"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.StateTransitionBroadcastError error = 1; + */ + error: StateTransitionBroadcastError; // Any error that occurred during the state transition broadcast + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Cryptographic proof for the state transition, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetConsensusParamsRequest + */ +export interface GetConsensusParamsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0 v0 = 1; + */ + v0: GetConsensusParamsRequest_GetConsensusParamsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0 + */ +export interface GetConsensusParamsRequest_GetConsensusParamsRequestV0 { + /** + * @generated from protobuf field: int32 height = 1; + */ + height: number; // The blockchain height at which to get the consensus parameters + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse + */ +export interface GetConsensusParamsResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0 v0 = 1; + */ + v0: GetConsensusParamsResponse_GetConsensusParamsResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock + */ +export interface GetConsensusParamsResponse_ConsensusParamsBlock { + /** + * @generated from protobuf field: string max_bytes = 1; + */ + maxBytes: string; // The maximum size of a block in bytes + /** + * @generated from protobuf field: string max_gas = 2; + */ + maxGas: string; // The maximum gas allowed in a block + /** + * @generated from protobuf field: string time_iota_ms = 3; + */ + timeIotaMs: string; // The minimum time increment between consecutive blocks, in milliseconds +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence + */ +export interface GetConsensusParamsResponse_ConsensusParamsEvidence { + /** + * @generated from protobuf field: string max_age_num_blocks = 1; + */ + maxAgeNumBlocks: string; // The maximum age of evidence, in number of blocks + /** + * @generated from protobuf field: string max_age_duration = 2; + */ + maxAgeDuration: string; // The maximum age of evidence, as a duration + /** + * @generated from protobuf field: string max_bytes = 3; + */ + maxBytes: string; // The maximum size of evidence in bytes +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0 + */ +export interface GetConsensusParamsResponse_GetConsensusParamsResponseV0 { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock block = 1; + */ + block?: GetConsensusParamsResponse_ConsensusParamsBlock; // Consensus parameters related to block creation and validation + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence evidence = 2; + */ + evidence?: GetConsensusParamsResponse_ConsensusParamsEvidence; // Consensus parameters related to evidence +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest + */ +export interface GetProtocolVersionUpgradeStateRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0 v0 = 1; + */ + v0: GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0 + */ +export interface GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0 { + /** + * @generated from protobuf field: bool prove = 1; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse + */ +export interface GetProtocolVersionUpgradeStateResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0 v0 = 1; + */ + v0: GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0 + */ +export interface GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "versions"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions versions = 1; + */ + versions: GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions; // The actual protocol version information + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Cryptographic proof of the protocol version information, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * Versions holds a collection of version entries + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions + */ +export interface GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry versions = 1; + */ + versions: GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry[]; // List of protocol version entries +} +/** + * VersionEntry represents a single entry of a protocol version + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry + */ +export interface GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry { + /** + * @generated from protobuf field: uint32 version_number = 1; + */ + versionNumber: number; // The protocol version number + /** + * @generated from protobuf field: uint32 vote_count = 2; + */ + voteCount: number; // The vote count for this protocol version +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest + */ +export interface GetProtocolVersionUpgradeVoteStatusRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0 v0 = 1; + */ + v0: GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0 + */ +export interface GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0 { + /** + * @generated from protobuf field: bytes start_pro_tx_hash = 1; + */ + startProTxHash: Uint8Array; // The starting masternode provider transaction hash to filter the votes by + /** + * @generated from protobuf field: uint32 count = 2; + */ + count: number; // The number of vote entries to retrieve + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse + */ +export interface GetProtocolVersionUpgradeVoteStatusResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0 v0 = 1; + */ + v0: GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0 + */ +export interface GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "versions"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals versions = 1; + */ + versions: GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals; // The actual version signal information + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Cryptographic proof of the version signal information, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * VersionSignals holds a collection of version signal entries + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals + */ +export interface GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal version_signals = 1; + */ + versionSignals: GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal[]; // List of version signal entries +} +/** + * VersionSignal represents a single voting signal for a protocol version + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal + */ +export interface GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal { + /** + * @generated from protobuf field: bytes pro_tx_hash = 1; + */ + proTxHash: Uint8Array; // The masternode provider transaction hash associated with the vote + /** + * @generated from protobuf field: uint32 version = 2; + */ + version: number; // The protocol version number that is being voted on +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEpochsInfoRequest + */ +export interface GetEpochsInfoRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0 v0 = 1; + */ + v0: GetEpochsInfoRequest_GetEpochsInfoRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0 + */ +export interface GetEpochsInfoRequest_GetEpochsInfoRequestV0 { + /** + * @generated from protobuf field: google.protobuf.UInt32Value start_epoch = 1; + */ + startEpoch?: UInt32Value; // The starting epoch for the request + /** + * @generated from protobuf field: uint32 count = 2; + */ + count: number; // The number of epochs to retrieve information for + /** + * @generated from protobuf field: bool ascending = 3; + */ + ascending: boolean; // Flag indicating if the epochs should be listed in ascending order + /** + * @generated from protobuf field: bool prove = 4; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse + */ +export interface GetEpochsInfoResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0 v0 = 1; + */ + v0: GetEpochsInfoResponse_GetEpochsInfoResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0 + */ +export interface GetEpochsInfoResponse_GetEpochsInfoResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "epochs"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos epochs = 1; + */ + epochs: GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos; // The actual information about the requested epochs + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Cryptographic proof of the epoch information, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * EpochInfos holds a collection of epoch information entries + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos + */ +export interface GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo epoch_infos = 1; + */ + epochInfos: GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo[]; // List of information for each requested epoch +} +/** + * EpochInfo represents information about a single epoch + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo + */ +export interface GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo { + /** + * @generated from protobuf field: uint32 number = 1; + */ + number: number; // The number of the epoch + /** + * @generated from protobuf field: uint64 first_block_height = 2 [jstype = JS_STRING]; + */ + firstBlockHeight: string; // The height of the first block in this epoch + /** + * @generated from protobuf field: uint32 first_core_block_height = 3; + */ + firstCoreBlockHeight: number; // The height of the first Core block in this epoch + /** + * @generated from protobuf field: uint64 start_time = 4 [jstype = JS_STRING]; + */ + startTime: string; // The start time of the epoch + /** + * @generated from protobuf field: double fee_multiplier = 5; + */ + feeMultiplier: number; // The fee multiplier applicable in this epoch + /** + * @generated from protobuf field: uint32 protocol_version = 6; + */ + protocolVersion: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest + */ +export interface GetContestedResourcesRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0 v0 = 1; + */ + v0: GetContestedResourcesRequest_GetContestedResourcesRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0 + */ +export interface GetContestedResourcesRequest_GetContestedResourcesRequestV0 { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: string document_type_name = 2; + */ + documentTypeName: string; + /** + * @generated from protobuf field: string index_name = 3; + */ + indexName: string; + /** + * @generated from protobuf field: repeated bytes start_index_values = 4; + */ + startIndexValues: Uint8Array[]; + /** + * @generated from protobuf field: repeated bytes end_index_values = 5; + */ + endIndexValues: Uint8Array[]; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo start_at_value_info = 6; + */ + startAtValueInfo?: GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo; + /** + * @generated from protobuf field: optional uint32 count = 7; + */ + count?: number; + /** + * @generated from protobuf field: bool order_ascending = 8; + */ + orderAscending: boolean; + /** + * @generated from protobuf field: bool prove = 9; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo + */ +export interface GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo { + /** + * @generated from protobuf field: bytes start_value = 1; + */ + startValue: Uint8Array; + /** + * @generated from protobuf field: bool start_value_included = 2; + */ + startValueIncluded: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse + */ +export interface GetContestedResourcesResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0 v0 = 1; + */ + v0: GetContestedResourcesResponse_GetContestedResourcesResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0 + */ +export interface GetContestedResourcesResponse_GetContestedResourcesResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "contestedResourceValues"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues contested_resource_values = 1; + */ + contestedResourceValues: GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues + */ +export interface GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues { + /** + * @generated from protobuf field: repeated bytes contested_resource_values = 1; + */ + contestedResourceValues: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest + */ +export interface GetVotePollsByEndDateRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0 v0 = 1; + */ + v0: GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0 + */ +export interface GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0 { + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo start_time_info = 1; + */ + startTimeInfo?: GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo end_time_info = 2; + */ + endTimeInfo?: GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo; + /** + * @generated from protobuf field: optional uint32 limit = 3; + */ + limit?: number; + /** + * @generated from protobuf field: optional uint32 offset = 4; + */ + offset?: number; + /** + * @generated from protobuf field: bool ascending = 5; + */ + ascending: boolean; + /** + * @generated from protobuf field: bool prove = 6; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo + */ +export interface GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo { + /** + * @generated from protobuf field: uint64 start_time_ms = 1 [jstype = JS_STRING]; + */ + startTimeMs: string; + /** + * @generated from protobuf field: bool start_time_included = 2; + */ + startTimeIncluded: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo + */ +export interface GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo { + /** + * @generated from protobuf field: uint64 end_time_ms = 1 [jstype = JS_STRING]; + */ + endTimeMs: string; + /** + * @generated from protobuf field: bool end_time_included = 2; + */ + endTimeIncluded: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse + */ +export interface GetVotePollsByEndDateResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0 v0 = 1; + */ + v0: GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0 + */ +export interface GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "votePollsByTimestamps"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps vote_polls_by_timestamps = 1; + */ + votePollsByTimestamps: GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp + */ +export interface GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp { + /** + * @generated from protobuf field: uint64 timestamp = 1 [jstype = JS_STRING]; + */ + timestamp: string; + /** + * @generated from protobuf field: repeated bytes serialized_vote_polls = 2; + */ + serializedVotePolls: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps + */ +export interface GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp vote_polls_by_timestamps = 1; + */ + votePollsByTimestamps: GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp[]; + /** + * @generated from protobuf field: bool finished_results = 2; + */ + finishedResults: boolean; +} +/** + * What's the state of a contested resource vote? (ie who is winning?) + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest + */ +export interface GetContestedResourceVoteStateRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0 v0 = 1; + */ + v0: GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0 + */ +export interface GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0 { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: string document_type_name = 2; + */ + documentTypeName: string; + /** + * @generated from protobuf field: string index_name = 3; + */ + indexName: string; + /** + * @generated from protobuf field: repeated bytes index_values = 4; + */ + indexValues: Uint8Array[]; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType result_type = 5; + */ + resultType: GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType; + /** + * @generated from protobuf field: bool allow_include_locked_and_abstaining_vote_tally = 6; + */ + allowIncludeLockedAndAbstainingVoteTally: boolean; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo start_at_identifier_info = 7; + */ + startAtIdentifierInfo?: GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo; + /** + * @generated from protobuf field: optional uint32 count = 8; + */ + count?: number; + /** + * @generated from protobuf field: bool prove = 9; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo + */ +export interface GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo { + /** + * @generated from protobuf field: bytes start_identifier = 1; + */ + startIdentifier: Uint8Array; + /** + * @generated from protobuf field: bool start_identifier_included = 2; + */ + startIdentifierIncluded: boolean; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType + */ +export enum GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType { + /** + * @generated from protobuf enum value: DOCUMENTS = 0; + */ + DOCUMENTS = 0, + /** + * @generated from protobuf enum value: VOTE_TALLY = 1; + */ + VOTE_TALLY = 1, + /** + * @generated from protobuf enum value: DOCUMENTS_AND_VOTE_TALLY = 2; + */ + DOCUMENTS_AND_VOTE_TALLY = 2 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse + */ +export interface GetContestedResourceVoteStateResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0 v0 = 1; + */ + v0: GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0 + */ +export interface GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "contestedResourceContenders"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders contested_resource_contenders = 1; + */ + contestedResourceContenders: GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo + */ +export interface GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome finished_vote_outcome = 1; + */ + finishedVoteOutcome: GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome; + /** + * @generated from protobuf field: optional bytes won_by_identity_id = 2; + */ + wonByIdentityId?: Uint8Array; // Only used when vote_choice_type is TOWARDS_IDENTITY + /** + * @generated from protobuf field: uint64 finished_at_block_height = 3 [jstype = JS_STRING]; + */ + finishedAtBlockHeight: string; + /** + * @generated from protobuf field: uint32 finished_at_core_block_height = 4; + */ + finishedAtCoreBlockHeight: number; + /** + * @generated from protobuf field: uint64 finished_at_block_time_ms = 5 [jstype = JS_STRING]; + */ + finishedAtBlockTimeMs: string; + /** + * @generated from protobuf field: uint32 finished_at_epoch = 6; + */ + finishedAtEpoch: number; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome + */ +export enum GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome { + /** + * @generated from protobuf enum value: TOWARDS_IDENTITY = 0; + */ + TOWARDS_IDENTITY = 0, + /** + * @generated from protobuf enum value: LOCKED = 1; + */ + LOCKED = 1, + /** + * @generated from protobuf enum value: NO_PREVIOUS_WINNER = 2; + */ + NO_PREVIOUS_WINNER = 2 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders + */ +export interface GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender contenders = 1; + */ + contenders: GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender[]; + /** + * @generated from protobuf field: optional uint32 abstain_vote_tally = 2; + */ + abstainVoteTally?: number; + /** + * @generated from protobuf field: optional uint32 lock_vote_tally = 3; + */ + lockVoteTally?: number; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo finished_vote_info = 4; + */ + finishedVoteInfo?: GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender + */ +export interface GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender { + /** + * @generated from protobuf field: bytes identifier = 1; + */ + identifier: Uint8Array; + /** + * @generated from protobuf field: optional uint32 vote_count = 2; + */ + voteCount?: number; + /** + * @generated from protobuf field: optional bytes document = 3; + */ + document?: Uint8Array; +} +/** + * Who voted for a contested resource to go to a specific identity? + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest + */ +export interface GetContestedResourceVotersForIdentityRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0 v0 = 1; + */ + v0: GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0 + */ +export interface GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0 { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: string document_type_name = 2; + */ + documentTypeName: string; + /** + * @generated from protobuf field: string index_name = 3; + */ + indexName: string; + /** + * @generated from protobuf field: repeated bytes index_values = 4; + */ + indexValues: Uint8Array[]; + /** + * @generated from protobuf field: bytes contestant_id = 5; + */ + contestantId: Uint8Array; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo start_at_identifier_info = 6; + */ + startAtIdentifierInfo?: GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo; + /** + * @generated from protobuf field: optional uint32 count = 7; + */ + count?: number; + /** + * @generated from protobuf field: bool order_ascending = 8; + */ + orderAscending: boolean; + /** + * @generated from protobuf field: bool prove = 9; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo + */ +export interface GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo { + /** + * @generated from protobuf field: bytes start_identifier = 1; + */ + startIdentifier: Uint8Array; + /** + * @generated from protobuf field: bool start_identifier_included = 2; + */ + startIdentifierIncluded: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse + */ +export interface GetContestedResourceVotersForIdentityResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0 v0 = 1; + */ + v0: GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0 + */ +export interface GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "contestedResourceVoters"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters contested_resource_voters = 1; + */ + contestedResourceVoters: GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters + */ +export interface GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters { + /** + * @generated from protobuf field: repeated bytes voters = 1; + */ + voters: Uint8Array[]; + /** + * @generated from protobuf field: bool finished_results = 2; + */ + finishedResults: boolean; +} +/** + * How did an identity vote? + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest + */ +export interface GetContestedResourceIdentityVotesRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0 v0 = 1; + */ + v0: GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0 + */ +export interface GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0 { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: google.protobuf.UInt32Value limit = 2; + */ + limit?: UInt32Value; + /** + * @generated from protobuf field: google.protobuf.UInt32Value offset = 3; + */ + offset?: UInt32Value; + /** + * @generated from protobuf field: bool order_ascending = 4; + */ + orderAscending: boolean; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo start_at_vote_poll_id_info = 5; + */ + startAtVotePollIdInfo?: GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo; + /** + * @generated from protobuf field: bool prove = 6; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo + */ +export interface GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo { + /** + * @generated from protobuf field: bytes start_at_poll_identifier = 1; + */ + startAtPollIdentifier: Uint8Array; + /** + * @generated from protobuf field: bool start_poll_identifier_included = 2; + */ + startPollIdentifierIncluded: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse + */ +export interface GetContestedResourceIdentityVotesResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0 v0 = 1; + */ + v0: GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0 + */ +export interface GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "votes"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes votes = 1; + */ + votes: GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes + */ +export interface GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote contested_resource_identity_votes = 1; + */ + contestedResourceIdentityVotes: GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote[]; + /** + * @generated from protobuf field: bool finished_results = 2; + */ + finishedResults: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice + */ +export interface GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType vote_choice_type = 1; + */ + voteChoiceType: GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType; + /** + * @generated from protobuf field: optional bytes identity_id = 2; + */ + identityId?: Uint8Array; // Only used when vote_choice_type is TOWARDS_IDENTITY +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType + */ +export enum GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType { + /** + * @generated from protobuf enum value: TOWARDS_IDENTITY = 0; + */ + TOWARDS_IDENTITY = 0, + /** + * @generated from protobuf enum value: ABSTAIN = 1; + */ + ABSTAIN = 1, + /** + * @generated from protobuf enum value: LOCK = 2; + */ + LOCK = 2 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote + */ +export interface GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: string document_type_name = 2; + */ + documentTypeName: string; + /** + * @generated from protobuf field: repeated bytes serialized_index_storage_values = 3; + */ + serializedIndexStorageValues: Uint8Array[]; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice vote_choice = 4; + */ + voteChoice?: GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest + */ +export interface GetPrefundedSpecializedBalanceRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0 v0 = 1; + */ + v0: GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0 + */ +export interface GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0 { + /** + * @generated from protobuf field: bytes id = 1; + */ + id: Uint8Array; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse + */ +export interface GetPrefundedSpecializedBalanceResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0 v0 = 1; + */ + v0: GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0 + */ +export interface GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "balance"; + /** + * @generated from protobuf field: uint64 balance = 1 [jstype = JS_STRING]; + */ + balance: string; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest + */ +export interface GetTotalCreditsInPlatformRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0 v0 = 1; + */ + v0: GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0 + */ +export interface GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0 { + /** + * @generated from protobuf field: bool prove = 1; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse + */ +export interface GetTotalCreditsInPlatformResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0 v0 = 1; + */ + v0: GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0 + */ +export interface GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "credits"; + /** + * @generated from protobuf field: uint64 credits = 1 [jstype = JS_STRING]; + */ + credits: string; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPathElementsRequest + */ +export interface GetPathElementsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0 v0 = 1; + */ + v0: GetPathElementsRequest_GetPathElementsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0 + */ +export interface GetPathElementsRequest_GetPathElementsRequestV0 { + /** + * @generated from protobuf field: repeated bytes path = 1; + */ + path: Uint8Array[]; + /** + * @generated from protobuf field: repeated bytes keys = 2; + */ + keys: Uint8Array[]; + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse + */ +export interface GetPathElementsResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0 v0 = 1; + */ + v0: GetPathElementsResponse_GetPathElementsResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0 + */ +export interface GetPathElementsResponse_GetPathElementsResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "elements"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements elements = 1; + */ + elements: GetPathElementsResponse_GetPathElementsResponseV0_Elements; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements + */ +export interface GetPathElementsResponse_GetPathElementsResponseV0_Elements { + /** + * @generated from protobuf field: repeated bytes elements = 1; + */ + elements: Uint8Array[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusRequest + */ +export interface GetStatusRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0 v0 = 1; + */ + v0: GetStatusRequest_GetStatusRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0 + */ +export interface GetStatusRequest_GetStatusRequestV0 { +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse + */ +export interface GetStatusResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0 v0 = 1; + */ + v0: GetStatusResponse_GetStatusResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0 + */ +export interface GetStatusResponse_GetStatusResponseV0 { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version version = 1; + */ + version?: GetStatusResponse_GetStatusResponseV0_Version; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node node = 2; + */ + node?: GetStatusResponse_GetStatusResponseV0_Node; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain chain = 3; + */ + chain?: GetStatusResponse_GetStatusResponseV0_Chain; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network network = 4; + */ + network?: GetStatusResponse_GetStatusResponseV0_Network; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync state_sync = 5; + */ + stateSync?: GetStatusResponse_GetStatusResponseV0_StateSync; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time time = 6; + */ + time?: GetStatusResponse_GetStatusResponseV0_Time; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version + */ +export interface GetStatusResponse_GetStatusResponseV0_Version { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software software = 1; + */ + software?: GetStatusResponse_GetStatusResponseV0_Version_Software; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol protocol = 2; + */ + protocol?: GetStatusResponse_GetStatusResponseV0_Version_Protocol; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software + */ +export interface GetStatusResponse_GetStatusResponseV0_Version_Software { + /** + * @generated from protobuf field: string dapi = 1; + */ + dapi: string; + /** + * It will be missing if Drive is not responding + * + * @generated from protobuf field: optional string drive = 2; + */ + drive?: string; + /** + * It will be missing if Tenderdash is not responding + * + * @generated from protobuf field: optional string tenderdash = 3; + */ + tenderdash?: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol + */ +export interface GetStatusResponse_GetStatusResponseV0_Version_Protocol { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash tenderdash = 1; + */ + tenderdash?: GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive drive = 2; + */ + drive?: GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash + */ +export interface GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash { + /** + * @generated from protobuf field: uint32 p2p = 1 [json_name = "p2p"]; + */ + p2P: number; + /** + * @generated from protobuf field: uint32 block = 2; + */ + block: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive + */ +export interface GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive { + /** + * @generated from protobuf field: uint32 latest = 3; + */ + latest: number; + /** + * @generated from protobuf field: uint32 current = 4; + */ + current: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time + */ +export interface GetStatusResponse_GetStatusResponseV0_Time { + /** + * @generated from protobuf field: uint64 local = 1 [jstype = JS_STRING]; + */ + local: string; + /** + * It will be missing if Drive is not responding + * + * @generated from protobuf field: optional uint64 block = 2 [jstype = JS_STRING]; + */ + block?: string; + /** + * It will be missing if Drive is not responding + * + * @generated from protobuf field: optional uint64 genesis = 3 [jstype = JS_STRING]; + */ + genesis?: string; + /** + * It will be missing if Drive is not responding + * + * @generated from protobuf field: optional uint32 epoch = 4; + */ + epoch?: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node + */ +export interface GetStatusResponse_GetStatusResponseV0_Node { + /** + * Platform node ID + * + * @generated from protobuf field: bytes id = 1; + */ + id: Uint8Array; + /** + * Evo masternode pro tx hash. It will be absent if the node is a fullnode + * + * @generated from protobuf field: optional bytes pro_tx_hash = 2; + */ + proTxHash?: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain + */ +export interface GetStatusResponse_GetStatusResponseV0_Chain { + /** + * @generated from protobuf field: bool catching_up = 1; + */ + catchingUp: boolean; + /** + * @generated from protobuf field: bytes latest_block_hash = 2; + */ + latestBlockHash: Uint8Array; + /** + * @generated from protobuf field: bytes latest_app_hash = 3; + */ + latestAppHash: Uint8Array; + /** + * @generated from protobuf field: uint64 latest_block_height = 4 [jstype = JS_STRING]; + */ + latestBlockHeight: string; + /** + * @generated from protobuf field: bytes earliest_block_hash = 5; + */ + earliestBlockHash: Uint8Array; + /** + * @generated from protobuf field: bytes earliest_app_hash = 6; + */ + earliestAppHash: Uint8Array; + /** + * @generated from protobuf field: uint64 earliest_block_height = 7 [jstype = JS_STRING]; + */ + earliestBlockHeight: string; + /** + * @generated from protobuf field: uint64 max_peer_block_height = 9 [jstype = JS_STRING]; + */ + maxPeerBlockHeight: string; + /** + * Latest known core height in consensus. + * It will be missing if Drive is not responding + * + * @generated from protobuf field: optional uint32 core_chain_locked_height = 10; + */ + coreChainLockedHeight?: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network + */ +export interface GetStatusResponse_GetStatusResponseV0_Network { + /** + * @generated from protobuf field: string chain_id = 1; + */ + chainId: string; + /** + * @generated from protobuf field: uint32 peers_count = 2; + */ + peersCount: number; + /** + * @generated from protobuf field: bool listening = 3; + */ + listening: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync + */ +export interface GetStatusResponse_GetStatusResponseV0_StateSync { + /** + * @generated from protobuf field: uint64 total_synced_time = 1 [jstype = JS_STRING]; + */ + totalSyncedTime: string; + /** + * @generated from protobuf field: uint64 remaining_time = 2 [jstype = JS_STRING]; + */ + remainingTime: string; + /** + * @generated from protobuf field: uint32 total_snapshots = 3; + */ + totalSnapshots: number; + /** + * @generated from protobuf field: uint64 chunk_process_avg_time = 4 [jstype = JS_STRING]; + */ + chunkProcessAvgTime: string; + /** + * @generated from protobuf field: uint64 snapshot_height = 5 [jstype = JS_STRING]; + */ + snapshotHeight: string; + /** + * @generated from protobuf field: uint64 snapshot_chunks_count = 6 [jstype = JS_STRING]; + */ + snapshotChunksCount: string; + /** + * @generated from protobuf field: uint64 backfilled_blocks = 7 [jstype = JS_STRING]; + */ + backfilledBlocks: string; + /** + * @generated from protobuf field: uint64 backfill_blocks_total = 8 [jstype = JS_STRING]; + */ + backfillBlocksTotal: string; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest + */ +export interface GetCurrentQuorumsInfoRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0 v0 = 1; + */ + v0: GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0 + */ +export interface GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0 { +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse + */ +export interface GetCurrentQuorumsInfoResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0 v0 = 1; + */ + v0: GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0 + */ +export interface GetCurrentQuorumsInfoResponse_ValidatorV0 { + /** + * @generated from protobuf field: bytes pro_tx_hash = 1; + */ + proTxHash: Uint8Array; + /** + * @generated from protobuf field: string node_ip = 2; + */ + nodeIp: string; + /** + * @generated from protobuf field: bool is_banned = 3; + */ + isBanned: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0 + */ +export interface GetCurrentQuorumsInfoResponse_ValidatorSetV0 { + /** + * @generated from protobuf field: bytes quorum_hash = 1; + */ + quorumHash: Uint8Array; + /** + * @generated from protobuf field: uint32 core_height = 2; + */ + coreHeight: number; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0 members = 3; + */ + members: GetCurrentQuorumsInfoResponse_ValidatorV0[]; + /** + * @generated from protobuf field: bytes threshold_public_key = 4; + */ + thresholdPublicKey: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0 + */ +export interface GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0 { + /** + * @generated from protobuf field: repeated bytes quorum_hashes = 1; + */ + quorumHashes: Uint8Array[]; + /** + * @generated from protobuf field: bytes current_quorum_hash = 2; + */ + currentQuorumHash: Uint8Array; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0 validator_sets = 3; + */ + validatorSets: GetCurrentQuorumsInfoResponse_ValidatorSetV0[]; + /** + * @generated from protobuf field: bytes last_block_proposer = 4; + */ + lastBlockProposer: Uint8Array; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 5; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + */ +export interface GetIdentityTokenBalancesRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 v0 = 1; + */ + v0: GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + */ +export interface GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; // ID of the identity + /** + * @generated from protobuf field: repeated bytes token_ids = 2; + */ + tokenIds: Uint8Array[]; // List of token IDs + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + */ +export interface GetIdentityTokenBalancesResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 v0 = 1; + */ + v0: GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + */ +export interface GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "tokenBalances"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances token_balances = 1; + */ + tokenBalances: GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances; // Actual token balances + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Proof of the token balances, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + */ +export interface GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; // Token ID + /** + * @generated from protobuf field: optional uint64 balance = 2; + */ + balance?: bigint; // Token balance for the contract +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + */ +export interface GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry token_balances = 1; + */ + tokenBalances: GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry[]; // List of token balances +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + */ +export interface GetIdentitiesTokenBalancesRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 v0 = 1; + */ + v0: GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + */ +export interface GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; // Token ID + /** + * @generated from protobuf field: repeated bytes identity_ids = 2; + */ + identityIds: Uint8Array[]; // List of identity IDs + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; // Flag to request a proof as the response +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + */ +export interface GetIdentitiesTokenBalancesResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 v0 = 1; + */ + v0: GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + */ +export interface GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identityTokenBalances"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances identity_token_balances = 1; + */ + identityTokenBalances: GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances; // Actual identity token balances + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; // Proof of the balances, if requested + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; // Metadata about the blockchain state +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + */ +export interface GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; // Identity ID + /** + * @generated from protobuf field: optional uint64 balance = 2; + */ + balance?: bigint; // Token balance for the identity +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + */ +export interface GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry identity_token_balances = 1; + */ + identityTokenBalances: GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry[]; // List of identity token balances +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + */ +export interface GetIdentityTokenInfosRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 v0 = 1; + */ + v0: GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + */ +export interface GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: repeated bytes token_ids = 2; + */ + tokenIds: Uint8Array[]; + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + */ +export interface GetIdentityTokenInfosResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 v0 = 1; + */ + v0: GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + */ +export interface GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "tokenInfos"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos token_infos = 1; + */ + tokenInfos: GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + */ +export interface GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry { + /** + * @generated from protobuf field: bool frozen = 1; + */ + frozen: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + */ +export interface GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry info = 2; + */ + info?: GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + */ +export interface GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry token_infos = 1; + */ + tokenInfos: GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + */ +export interface GetIdentitiesTokenInfosRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 v0 = 1; + */ + v0: GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + */ +export interface GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: repeated bytes identity_ids = 2; + */ + identityIds: Uint8Array[]; + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + */ +export interface GetIdentitiesTokenInfosResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 v0 = 1; + */ + v0: GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + */ +export interface GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "identityTokenInfos"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos identity_token_infos = 1; + */ + identityTokenInfos: GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + */ +export interface GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry { + /** + * @generated from protobuf field: bool frozen = 1; + */ + frozen: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + */ +export interface GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry { + /** + * @generated from protobuf field: bytes identity_id = 1; + */ + identityId: Uint8Array; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry info = 2; + */ + info?: GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + */ +export interface GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry token_infos = 1; + */ + tokenInfos: GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenStatusesRequest + */ +export interface GetTokenStatusesRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 v0 = 1; + */ + v0: GetTokenStatusesRequest_GetTokenStatusesRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + */ +export interface GetTokenStatusesRequest_GetTokenStatusesRequestV0 { + /** + * @generated from protobuf field: repeated bytes token_ids = 1; + */ + tokenIds: Uint8Array[]; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse + */ +export interface GetTokenStatusesResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 v0 = 1; + */ + v0: GetTokenStatusesResponse_GetTokenStatusesResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + */ +export interface GetTokenStatusesResponse_GetTokenStatusesResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "tokenStatuses"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses token_statuses = 1; + */ + tokenStatuses: GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + */ +export interface GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: optional bool paused = 2; + */ + paused?: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + */ +export interface GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry token_statuses = 1; + */ + tokenStatuses: GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + */ +export interface GetTokenPreProgrammedDistributionsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 v0 = 1; + */ + v0: GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + */ +export interface GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo start_at_info = 2; + */ + startAtInfo?: GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo; + /** + * @generated from protobuf field: optional uint32 limit = 3; + */ + limit?: number; + /** + * @generated from protobuf field: bool prove = 4; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + */ +export interface GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo { + /** + * @generated from protobuf field: uint64 start_time_ms = 1; + */ + startTimeMs: bigint; + /** + * @generated from protobuf field: optional bytes start_recipient = 2; + */ + startRecipient?: Uint8Array; + /** + * @generated from protobuf field: optional bool start_recipient_included = 3; + */ + startRecipientIncluded?: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + */ +export interface GetTokenPreProgrammedDistributionsResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 v0 = 1; + */ + v0: GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + */ +export interface GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "tokenDistributions"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions token_distributions = 1; + */ + tokenDistributions: GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + */ +export interface GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry { + /** + * @generated from protobuf field: bytes recipient_id = 1; + */ + recipientId: Uint8Array; + /** + * @generated from protobuf field: uint64 amount = 2; + */ + amount: bigint; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + */ +export interface GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry { + /** + * @generated from protobuf field: uint64 timestamp = 1; + */ + timestamp: bigint; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry distributions = 2; + */ + distributions: GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + */ +export interface GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry token_distributions = 1; + */ + tokenDistributions: GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + */ +export interface GetTokenTotalSupplyRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 v0 = 1; + */ + v0: GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + */ +export interface GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: bool prove = 2; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + */ +export interface GetTokenTotalSupplyResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 v0 = 1; + */ + v0: GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + */ +export interface GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "tokenTotalSupply"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry token_total_supply = 1; + */ + tokenTotalSupply: GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + */ +export interface GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry { + /** + * @generated from protobuf field: bytes token_id = 1; + */ + tokenId: Uint8Array; + /** + * @generated from protobuf field: uint64 total_aggregated_amount_in_user_accounts = 2; + */ + totalAggregatedAmountInUserAccounts: bigint; + /** + * @generated from protobuf field: uint64 total_system_amount = 3; + */ + totalSystemAmount: bigint; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfoRequest + */ +export interface GetGroupInfoRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 v0 = 1; + */ + v0: GetGroupInfoRequest_GetGroupInfoRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + */ +export interface GetGroupInfoRequest_GetGroupInfoRequestV0 { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: uint32 group_contract_position = 2; + */ + groupContractPosition: number; + /** + * @generated from protobuf field: bool prove = 3; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse + */ +export interface GetGroupInfoResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 v0 = 1; + */ + v0: GetGroupInfoResponse_GetGroupInfoResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + */ +export interface GetGroupInfoResponse_GetGroupInfoResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "groupInfo"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo group_info = 1; + */ + groupInfo: GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 4; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + */ +export interface GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry { + /** + * @generated from protobuf field: bytes member_id = 1; + */ + memberId: Uint8Array; + /** + * @generated from protobuf field: uint32 power = 2; + */ + power: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + */ +export interface GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry members = 1; + */ + members: GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry[]; + /** + * @generated from protobuf field: uint32 group_required_power = 2; + */ + groupRequiredPower: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + */ +export interface GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo { + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry group_info = 1; + */ + groupInfo?: GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest + */ +export interface GetGroupInfosRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 v0 = 1; + */ + v0: GetGroupInfosRequest_GetGroupInfosRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + */ +export interface GetGroupInfosRequest_StartAtGroupContractPosition { + /** + * @generated from protobuf field: uint32 start_group_contract_position = 1; + */ + startGroupContractPosition: number; + /** + * @generated from protobuf field: bool start_group_contract_position_included = 2; + */ + startGroupContractPositionIncluded: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + */ +export interface GetGroupInfosRequest_GetGroupInfosRequestV0 { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition start_at_group_contract_position = 2; + */ + startAtGroupContractPosition?: GetGroupInfosRequest_StartAtGroupContractPosition; + /** + * @generated from protobuf field: optional uint32 count = 3; + */ + count?: number; + /** + * @generated from protobuf field: bool prove = 4; + */ + prove: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse + */ +export interface GetGroupInfosResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 v0 = 1; + */ + v0: GetGroupInfosResponse_GetGroupInfosResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + */ +export interface GetGroupInfosResponse_GetGroupInfosResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "groupInfos"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos group_infos = 1; + */ + groupInfos: GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 4; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + */ +export interface GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry { + /** + * @generated from protobuf field: bytes member_id = 1; + */ + memberId: Uint8Array; + /** + * @generated from protobuf field: uint32 power = 2; + */ + power: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + */ +export interface GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry { + /** + * @generated from protobuf field: uint32 group_contract_position = 1; + */ + groupContractPosition: number; + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry members = 2; + */ + members: GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry[]; + /** + * @generated from protobuf field: uint32 group_required_power = 3; + */ + groupRequiredPower: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + */ +export interface GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry group_infos = 1; + */ + groupInfos: GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest + */ +export interface GetGroupActionsRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 v0 = 1; + */ + v0: GetGroupActionsRequest_GetGroupActionsRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + */ +export interface GetGroupActionsRequest_StartAtActionId { + /** + * @generated from protobuf field: bytes start_action_id = 1; + */ + startActionId: Uint8Array; + /** + * @generated from protobuf field: bool start_action_id_included = 2; + */ + startActionIdIncluded: boolean; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + */ +export interface GetGroupActionsRequest_GetGroupActionsRequestV0 { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: uint32 group_contract_position = 2; + */ + groupContractPosition: number; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus status = 3; + */ + status: GetGroupActionsRequest_ActionStatus; + /** + * @generated from protobuf field: optional org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId start_at_action_id = 4; + */ + startAtActionId?: GetGroupActionsRequest_StartAtActionId; + /** + * @generated from protobuf field: optional uint32 count = 5; + */ + count?: number; + /** + * @generated from protobuf field: bool prove = 6; + */ + prove: boolean; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus + */ +export enum GetGroupActionsRequest_ActionStatus { + /** + * Request the active actions + * + * @generated from protobuf enum value: ACTIVE = 0; + */ + ACTIVE = 0, + /** + * Request the closed actions + * + * @generated from protobuf enum value: CLOSED = 1; + */ + CLOSED = 1 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse + */ +export interface GetGroupActionsResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 v0 = 1; + */ + v0: GetGroupActionsResponse_GetGroupActionsResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "groupActions"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions group_actions = 1; + */ + groupActions: GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * Mint event + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent { + /** + * @generated from protobuf field: uint64 amount = 1; + */ + amount: bigint; // Amount to mint + /** + * @generated from protobuf field: bytes recipient_id = 2; + */ + recipientId: Uint8Array; // Recipient identifier + /** + * @generated from protobuf field: optional string public_note = 3; + */ + publicNote?: string; // Public note +} +/** + * Burn event + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent { + /** + * @generated from protobuf field: uint64 amount = 1; + */ + amount: bigint; // Amount to burn + /** + * @generated from protobuf field: optional string public_note = 2; + */ + publicNote?: string; // Public note +} +/** + * Freeze event + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent { + /** + * @generated from protobuf field: bytes frozen_id = 1; + */ + frozenId: Uint8Array; // Identifier of the frozen entity + /** + * @generated from protobuf field: optional string public_note = 2; + */ + publicNote?: string; // Public note +} +/** + * Unfreeze event + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent { + /** + * @generated from protobuf field: bytes frozen_id = 1; + */ + frozenId: Uint8Array; // Identifier of the unfrozen entity + /** + * @generated from protobuf field: optional string public_note = 2; + */ + publicNote?: string; // Public note +} +/** + * Destroy frozen funds event + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent { + /** + * @generated from protobuf field: bytes frozen_id = 1; + */ + frozenId: Uint8Array; // Identifier of the frozen entity + /** + * @generated from protobuf field: uint64 amount = 2; + */ + amount: bigint; // Amount to destroy + /** + * @generated from protobuf field: optional string public_note = 3; + */ + publicNote?: string; // Public note +} +/** + * Shared encrypted note + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote { + /** + * @generated from protobuf field: uint32 sender_key_index = 1; + */ + senderKeyIndex: number; // Sender key index + /** + * @generated from protobuf field: uint32 recipient_key_index = 2; + */ + recipientKeyIndex: number; // Recipient key index + /** + * @generated from protobuf field: bytes encrypted_data = 3; + */ + encryptedData: Uint8Array; // Encrypted data +} +/** + * Personal encrypted note + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote { + /** + * @generated from protobuf field: uint32 root_encryption_key_index = 1; + */ + rootEncryptionKeyIndex: number; // Root encryption key index + /** + * @generated from protobuf field: uint32 derivation_encryption_key_index = 2; + */ + derivationEncryptionKeyIndex: number; // Derivation encryption key index + /** + * @generated from protobuf field: bytes encrypted_data = 3; + */ + encryptedData: Uint8Array; // Encrypted data +} +/** + * Emergency action event + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent { + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType action_type = 1; + */ + actionType: GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType; // Emergency action type + /** + * @generated from protobuf field: optional string public_note = 2; + */ + publicNote?: string; // Public note +} +/** + * Enum for emergency action types + * + * @generated from protobuf enum org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType + */ +export enum GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType { + /** + * Pause action + * + * @generated from protobuf enum value: PAUSE = 0; + */ + PAUSE = 0, + /** + * Resume action + * + * @generated from protobuf enum value: RESUME = 1; + */ + RESUME = 1 +} +/** + * Token config update event + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent { + /** + * @generated from protobuf field: bytes token_config_update_item = 1; + */ + tokenConfigUpdateItem: Uint8Array; // Token config update item + /** + * @generated from protobuf field: optional string public_note = 2; + */ + publicNote?: string; // Public note +} +/** + * Event associated with this action + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent { + /** + * @generated from protobuf oneof: event_type + */ + eventType: { + oneofKind: "tokenEvent"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent token_event = 1; + */ + tokenEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent; // Token event details + } | { + oneofKind: "documentEvent"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent document_event = 2; + */ + documentEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent; + } | { + oneofKind: "contractEvent"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent contract_event = 3; + */ + contractEvent: GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent { + /** + * @generated from protobuf oneof: type + */ + type: { + oneofKind: "create"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent create = 1; + */ + create: GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent; // Create event details + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent { + /** + * @generated from protobuf field: bytes created_document = 1; + */ + createdDocument: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent { + /** + * @generated from protobuf field: bytes updated_contract = 1; + */ + updatedContract: Uint8Array; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent { + /** + * @generated from protobuf oneof: type + */ + type: { + oneofKind: "update"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent update = 1; + */ + update: GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent; // Contract update event + } | { + oneofKind: undefined; + }; +} +/** + * Details for token events + * + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent { + /** + * @generated from protobuf oneof: type + */ + type: { + oneofKind: "mint"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent mint = 1; + */ + mint: GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent; // Mint event details + } | { + oneofKind: "burn"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent burn = 2; + */ + burn: GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent; // Burn event details + } | { + oneofKind: "freeze"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent freeze = 3; + */ + freeze: GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent; // Freeze event details + } | { + oneofKind: "unfreeze"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent unfreeze = 4; + */ + unfreeze: GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent; // Unfreeze event details + } | { + oneofKind: "destroyFrozenFunds"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent destroy_frozen_funds = 5; + */ + destroyFrozenFunds: GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent; // Destroy frozen funds + } | { + oneofKind: "emergencyAction"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent emergency_action = 6; + */ + emergencyAction: GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent; // Emergency action details + } | { + oneofKind: "tokenConfigUpdate"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent token_config_update = 7; + */ + tokenConfigUpdate: GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent; // Token configuration update details + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry { + /** + * @generated from protobuf field: bytes action_id = 1; + */ + actionId: Uint8Array; // Unique identifier for the action + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent event = 2; + */ + event?: GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent; // The event data +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + */ +export interface GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry group_actions = 1; + */ + groupActions: GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry[]; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersRequest + */ +export interface GetGroupActionSignersRequest { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 v0 = 1; + */ + v0: GetGroupActionSignersRequest_GetGroupActionSignersRequestV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + */ +export interface GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 { + /** + * @generated from protobuf field: bytes contract_id = 1; + */ + contractId: Uint8Array; + /** + * @generated from protobuf field: uint32 group_contract_position = 2; + */ + groupContractPosition: number; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus status = 3; + */ + status: GetGroupActionSignersRequest_ActionStatus; + /** + * @generated from protobuf field: bytes action_id = 4; + */ + actionId: Uint8Array; + /** + * @generated from protobuf field: bool prove = 5; + */ + prove: boolean; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus + */ +export enum GetGroupActionSignersRequest_ActionStatus { + /** + * Request the active actions + * + * @generated from protobuf enum value: ACTIVE = 0; + */ + ACTIVE = 0, + /** + * Request the closed actions + * + * @generated from protobuf enum value: CLOSED = 1; + */ + CLOSED = 1 +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse + */ +export interface GetGroupActionSignersResponse { + /** + * @generated from protobuf oneof: version + */ + version: { + oneofKind: "v0"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 v0 = 1; + */ + v0: GetGroupActionSignersResponse_GetGroupActionSignersResponseV0; + } | { + oneofKind: undefined; + }; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + */ +export interface GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 { + /** + * @generated from protobuf oneof: result + */ + result: { + oneofKind: "groupActionSigners"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners group_action_signers = 1; + */ + groupActionSigners: GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners; + } | { + oneofKind: "proof"; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.Proof proof = 2; + */ + proof: Proof; + } | { + oneofKind: undefined; + }; + /** + * @generated from protobuf field: org.dash.platform.dapi.v0.ResponseMetadata metadata = 3; + */ + metadata?: ResponseMetadata; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + */ +export interface GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner { + /** + * @generated from protobuf field: bytes signer_id = 1; + */ + signerId: Uint8Array; + /** + * @generated from protobuf field: uint32 power = 2; + */ + power: number; +} +/** + * @generated from protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + */ +export interface GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners { + /** + * @generated from protobuf field: repeated org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner signers = 1; + */ + signers: GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner[]; +} +/** + * @generated from protobuf enum org.dash.platform.dapi.v0.KeyPurpose + */ +export enum KeyPurpose { + /** + * @generated from protobuf enum value: AUTHENTICATION = 0; + */ + AUTHENTICATION = 0, + /** + * @generated from protobuf enum value: ENCRYPTION = 1; + */ + ENCRYPTION = 1, + /** + * @generated from protobuf enum value: DECRYPTION = 2; + */ + DECRYPTION = 2, + /** + * @generated from protobuf enum value: TRANSFER = 3; + */ + TRANSFER = 3, + /** + * @generated from protobuf enum value: VOTING = 5; + */ + VOTING = 5 +} +// @generated message type with reflection information, may provide speed optimized methods +class Proof$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.Proof", [ + { no: 1, name: "grovedb_proof", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "quorum_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "signature", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 4, name: "round", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 5, name: "block_id_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 6, name: "quorum_type", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.Proof + */ +export const Proof = new Proof$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class ResponseMetadata$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.ResponseMetadata", [ + { no: 1, name: "height", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "core_chain_locked_height", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "epoch", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "time_ms", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 5, name: "protocol_version", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 6, name: "chain_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.ResponseMetadata + */ +export const ResponseMetadata = new ResponseMetadata$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class StateTransitionBroadcastError$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.StateTransitionBroadcastError", [ + { no: 1, name: "code", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.StateTransitionBroadcastError + */ +export const StateTransitionBroadcastError = new StateTransitionBroadcastError$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BroadcastStateTransitionRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BroadcastStateTransitionRequest", [ + { no: 1, name: "state_transition", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BroadcastStateTransitionRequest + */ +export const BroadcastStateTransitionRequest = new BroadcastStateTransitionRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class BroadcastStateTransitionResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.BroadcastStateTransitionResponse", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.BroadcastStateTransitionResponse + */ +export const BroadcastStateTransitionResponse = new BroadcastStateTransitionResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityRequest_GetIdentityRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityRequest + */ +export const GetIdentityRequest = new GetIdentityRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityRequest_GetIdentityRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0", [ + { no: 1, name: "id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0 + */ +export const GetIdentityRequest_GetIdentityRequestV0 = new GetIdentityRequest_GetIdentityRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityNonceRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityNonceRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityNonceRequest_GetIdentityNonceRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityNonceRequest + */ +export const GetIdentityNonceRequest = new GetIdentityNonceRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityNonceRequest_GetIdentityNonceRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0 + */ +export const GetIdentityNonceRequest_GetIdentityNonceRequestV0 = new GetIdentityNonceRequest_GetIdentityNonceRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityContractNonceRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityContractNonceRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceRequest + */ +export const GetIdentityContractNonceRequest = new GetIdentityContractNonceRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0 + */ +export const GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0 = new GetIdentityContractNonceRequest_GetIdentityContractNonceRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityBalanceRequest_GetIdentityBalanceRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceRequest + */ +export const GetIdentityBalanceRequest = new GetIdentityBalanceRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceRequest_GetIdentityBalanceRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0", [ + { no: 1, name: "id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0 + */ +export const GetIdentityBalanceRequest_GetIdentityBalanceRequestV0 = new GetIdentityBalanceRequest_GetIdentityBalanceRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceAndRevisionRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest + */ +export const GetIdentityBalanceAndRevisionRequest = new GetIdentityBalanceAndRevisionRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0", [ + { no: 1, name: "id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0 + */ +export const GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0 = new GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityResponse_GetIdentityResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityResponse + */ +export const GetIdentityResponse = new GetIdentityResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityResponse_GetIdentityResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0", [ + { no: 1, name: "identity", kind: "scalar", oneof: "result", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0 + */ +export const GetIdentityResponse_GetIdentityResponseV0 = new GetIdentityResponse_GetIdentityResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityNonceResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityNonceResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityNonceResponse_GetIdentityNonceResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityNonceResponse + */ +export const GetIdentityNonceResponse = new GetIdentityNonceResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityNonceResponse_GetIdentityNonceResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0", [ + { no: 1, name: "identity_nonce", kind: "scalar", oneof: "result", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0 + */ +export const GetIdentityNonceResponse_GetIdentityNonceResponseV0 = new GetIdentityNonceResponse_GetIdentityNonceResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityContractNonceResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityContractNonceResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceResponse + */ +export const GetIdentityContractNonceResponse = new GetIdentityContractNonceResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0", [ + { no: 1, name: "identity_contract_nonce", kind: "scalar", oneof: "result", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0 + */ +export const GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0 = new GetIdentityContractNonceResponse_GetIdentityContractNonceResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityBalanceResponse_GetIdentityBalanceResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceResponse + */ +export const GetIdentityBalanceResponse = new GetIdentityBalanceResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceResponse_GetIdentityBalanceResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0", [ + { no: 1, name: "balance", kind: "scalar", oneof: "result", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0 + */ +export const GetIdentityBalanceResponse_GetIdentityBalanceResponseV0 = new GetIdentityBalanceResponse_GetIdentityBalanceResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceAndRevisionResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse + */ +export const GetIdentityBalanceAndRevisionResponse = new GetIdentityBalanceAndRevisionResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0", [ + { no: 1, name: "balance_and_revision", kind: "message", oneof: "result", T: () => GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0 + */ +export const GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0 = new GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision", [ + { no: 1, name: "balance", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "revision", kind: "scalar", T: 4 /*ScalarType.UINT64*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision + */ +export const GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision = new GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class KeyRequestType$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.KeyRequestType", [ + { no: 1, name: "all_keys", kind: "message", oneof: "request", T: () => AllKeys }, + { no: 2, name: "specific_keys", kind: "message", oneof: "request", T: () => SpecificKeys }, + { no: 3, name: "search_key", kind: "message", oneof: "request", T: () => SearchKey } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.KeyRequestType + */ +export const KeyRequestType = new KeyRequestType$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class AllKeys$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.AllKeys", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.AllKeys + */ +export const AllKeys = new AllKeys$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SpecificKeys$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.SpecificKeys", [ + { no: 1, name: "key_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.SpecificKeys + */ +export const SpecificKeys = new SpecificKeys$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SearchKey$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.SearchKey", [ + { no: 1, name: "purpose_map", kind: "map", K: 13 /*ScalarType.UINT32*/, V: { kind: "message", T: () => SecurityLevelMap } } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.SearchKey + */ +export const SearchKey = new SearchKey$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class SecurityLevelMap$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.SecurityLevelMap", [ + { no: 1, name: "security_level_map", kind: "map", K: 13 /*ScalarType.UINT32*/, V: { kind: "enum", T: () => ["org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType", SecurityLevelMap_KeyKindRequestType] } } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.SecurityLevelMap + */ +export const SecurityLevelMap = new SecurityLevelMap$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityKeysRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityKeysRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityKeysRequest_GetIdentityKeysRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysRequest + */ +export const GetIdentityKeysRequest = new GetIdentityKeysRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityKeysRequest_GetIdentityKeysRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "request_type", kind: "message", T: () => KeyRequestType }, + { no: 3, name: "limit", kind: "message", T: () => UInt32Value }, + { no: 4, name: "offset", kind: "message", T: () => UInt32Value }, + { no: 5, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0 + */ +export const GetIdentityKeysRequest_GetIdentityKeysRequestV0 = new GetIdentityKeysRequest_GetIdentityKeysRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityKeysResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityKeysResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityKeysResponse_GetIdentityKeysResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse + */ +export const GetIdentityKeysResponse = new GetIdentityKeysResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityKeysResponse_GetIdentityKeysResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0", [ + { no: 1, name: "keys", kind: "message", oneof: "result", T: () => GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0 + */ +export const GetIdentityKeysResponse_GetIdentityKeysResponseV0 = new GetIdentityKeysResponse_GetIdentityKeysResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys", [ + { no: 1, name: "keys_bytes", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys + */ +export const GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys = new GetIdentityKeysResponse_GetIdentityKeysResponseV0_Keys$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesContractKeysRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest + */ +export const GetIdentitiesContractKeysRequest = new GetIdentitiesContractKeysRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0", [ + { no: 1, name: "identities_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "document_type_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "purposes", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["org.dash.platform.dapi.v0.KeyPurpose", KeyPurpose] }, + { no: 5, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0 + */ +export const GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0 = new GetIdentitiesContractKeysRequest_GetIdentitiesContractKeysRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesContractKeysResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse + */ +export const GetIdentitiesContractKeysResponse = new GetIdentitiesContractKeysResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0", [ + { no: 1, name: "identities_keys", kind: "message", oneof: "result", T: () => GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0 + */ +export const GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0 = new GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys", [ + { no: 1, name: "purpose", kind: "enum", T: () => ["org.dash.platform.dapi.v0.KeyPurpose", KeyPurpose] }, + { no: 2, name: "keys_bytes", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys + */ +export const GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys = new GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "keys", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys + */ +export const GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys = new GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys", [ + { no: 1, name: "entries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys + */ +export const GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys = new GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksByIdsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest + */ +export const GetEvonodesProposedEpochBlocksByIdsRequest = new GetEvonodesProposedEpochBlocksByIdsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0", [ + { no: 1, name: "epoch", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0 + */ +export const GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0 = new GetEvonodesProposedEpochBlocksByIdsRequest_GetEvonodesProposedEpochBlocksByIdsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse + */ +export const GetEvonodesProposedEpochBlocksResponse = new GetEvonodesProposedEpochBlocksResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0", [ + { no: 1, name: "evonodes_proposed_block_counts_info", kind: "message", oneof: "result", T: () => GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0 + */ +export const GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0 = new GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks", [ + { no: 1, name: "pro_tx_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "count", kind: "scalar", T: 4 /*ScalarType.UINT64*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks + */ +export const GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks = new GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks", [ + { no: 1, name: "evonodes_proposed_block_counts", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks + */ +export const GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks = new GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksByRangeRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest + */ +export const GetEvonodesProposedEpochBlocksByRangeRequest = new GetEvonodesProposedEpochBlocksByRangeRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0", [ + { no: 1, name: "epoch", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "limit", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "start_after", kind: "scalar", oneof: "start", T: 12 /*ScalarType.BYTES*/ }, + { no: 4, name: "start_at", kind: "scalar", oneof: "start", T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0 + */ +export const GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0 = new GetEvonodesProposedEpochBlocksByRangeRequest_GetEvonodesProposedEpochBlocksByRangeRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesBalancesRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest + */ +export const GetIdentitiesBalancesRequest = new GetIdentitiesBalancesRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0", [ + { no: 1, name: "ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0 + */ +export const GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0 = new GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesBalancesResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse + */ +export const GetIdentitiesBalancesResponse = new GetIdentitiesBalancesResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0", [ + { no: 1, name: "identities_balances", kind: "message", oneof: "result", T: () => GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0 + */ +export const GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0 = new GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "balance", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance + */ +export const GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance = new GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances", [ + { no: 1, name: "entries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentityBalance } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances + */ +export const GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances = new GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetProofsRequest_GetProofsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest + */ +export const GetProofsRequest = new GetProofsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0", [ + { no: 1, name: "identities", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProofsRequest_GetProofsRequestV0_IdentityRequest }, + { no: 2, name: "contracts", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProofsRequest_GetProofsRequestV0_ContractRequest }, + { no: 3, name: "documents", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProofsRequest_GetProofsRequestV0_DocumentRequest }, + { no: 4, name: "votes", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProofsRequest_GetProofsRequestV0_VoteStatusRequest }, + { no: 5, name: "identity_token_balances", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest }, + { no: 6, name: "identity_token_infos", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest }, + { no: 7, name: "token_statuses", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProofsRequest_GetProofsRequestV0_TokenStatusRequest } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 + */ +export const GetProofsRequest_GetProofsRequestV0 = new GetProofsRequest_GetProofsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_DocumentRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "document_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "document_type_keeps_history", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 4, name: "document_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "document_contested_status", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus", GetProofsRequest_GetProofsRequestV0_DocumentRequest_DocumentContestedStatus] } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest + */ +export const GetProofsRequest_GetProofsRequestV0_DocumentRequest = new GetProofsRequest_GetProofsRequestV0_DocumentRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_IdentityRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "request_type", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type", GetProofsRequest_GetProofsRequestV0_IdentityRequest_Type] } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest + */ +export const GetProofsRequest_GetProofsRequestV0_IdentityRequest = new GetProofsRequest_GetProofsRequestV0_IdentityRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_ContractRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest + */ +export const GetProofsRequest_GetProofsRequestV0_ContractRequest = new GetProofsRequest_GetProofsRequestV0_ContractRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_VoteStatusRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest", [ + { no: 1, name: "contested_resource_vote_status_request", kind: "message", oneof: "requestType", T: () => GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest + */ +export const GetProofsRequest_GetProofsRequestV0_VoteStatusRequest = new GetProofsRequest_GetProofsRequestV0_VoteStatusRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "document_type_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "index_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "index_values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "voter_identifier", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest + */ +export const GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest = new GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + */ +export const GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest = new GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + */ +export const GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest = new GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsRequest_GetProofsRequestV0_TokenStatusRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + */ +export const GetProofsRequest_GetProofsRequestV0_TokenStatusRequest = new GetProofsRequest_GetProofsRequestV0_TokenStatusRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetProofsResponse_GetProofsResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsResponse + */ +export const GetProofsResponse = new GetProofsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProofsResponse_GetProofsResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0", [ + { no: 1, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 2, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0 + */ +export const GetProofsResponse_GetProofsResponseV0 = new GetProofsResponse_GetProofsResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDataContractRequest_GetDataContractRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractRequest + */ +export const GetDataContractRequest = new GetDataContractRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractRequest_GetDataContractRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0", [ + { no: 1, name: "id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0 + */ +export const GetDataContractRequest_GetDataContractRequestV0 = new GetDataContractRequest_GetDataContractRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDataContractResponse_GetDataContractResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractResponse + */ +export const GetDataContractResponse = new GetDataContractResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractResponse_GetDataContractResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0", [ + { no: 1, name: "data_contract", kind: "scalar", oneof: "result", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0 + */ +export const GetDataContractResponse_GetDataContractResponseV0 = new GetDataContractResponse_GetDataContractResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDataContractsRequest_GetDataContractsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsRequest + */ +export const GetDataContractsRequest = new GetDataContractsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractsRequest_GetDataContractsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0", [ + { no: 1, name: "ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0 + */ +export const GetDataContractsRequest_GetDataContractsRequestV0 = new GetDataContractsRequest_GetDataContractsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractsResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDataContractsResponse_GetDataContractsResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse + */ +export const GetDataContractsResponse = new GetDataContractsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractsResponse_DataContractEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry", [ + { no: 1, name: "identifier", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "data_contract", kind: "message", T: () => BytesValue } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry + */ +export const GetDataContractsResponse_DataContractEntry = new GetDataContractsResponse_DataContractEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractsResponse_DataContracts$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts", [ + { no: 1, name: "data_contract_entries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetDataContractsResponse_DataContractEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts + */ +export const GetDataContractsResponse_DataContracts = new GetDataContractsResponse_DataContracts$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractsResponse_GetDataContractsResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0", [ + { no: 1, name: "data_contracts", kind: "message", oneof: "result", T: () => GetDataContractsResponse_DataContracts }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0 + */ +export const GetDataContractsResponse_GetDataContractsResponseV0 = new GetDataContractsResponse_GetDataContractsResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractHistoryRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractHistoryRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDataContractHistoryRequest_GetDataContractHistoryRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryRequest + */ +export const GetDataContractHistoryRequest = new GetDataContractHistoryRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractHistoryRequest_GetDataContractHistoryRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0", [ + { no: 1, name: "id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "limit", kind: "message", T: () => UInt32Value }, + { no: 3, name: "offset", kind: "message", T: () => UInt32Value }, + { no: 4, name: "start_at_ms", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 5, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0 + */ +export const GetDataContractHistoryRequest_GetDataContractHistoryRequestV0 = new GetDataContractHistoryRequest_GetDataContractHistoryRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractHistoryResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractHistoryResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDataContractHistoryResponse_GetDataContractHistoryResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse + */ +export const GetDataContractHistoryResponse = new GetDataContractHistoryResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractHistoryResponse_GetDataContractHistoryResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0", [ + { no: 1, name: "data_contract_history", kind: "message", oneof: "result", T: () => GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0 + */ +export const GetDataContractHistoryResponse_GetDataContractHistoryResponseV0 = new GetDataContractHistoryResponse_GetDataContractHistoryResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry", [ + { no: 1, name: "date", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry + */ +export const GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry = new GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory", [ + { no: 1, name: "data_contract_entries", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistoryEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory + */ +export const GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory = new GetDataContractHistoryResponse_GetDataContractHistoryResponseV0_DataContractHistory$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDocumentsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDocumentsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDocumentsRequest_GetDocumentsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsRequest + */ +export const GetDocumentsRequest = new GetDocumentsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDocumentsRequest_GetDocumentsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0", [ + { no: 1, name: "data_contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "document_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "where", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 4, name: "order_by", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "limit", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 6, name: "start_after", kind: "scalar", oneof: "start", T: 12 /*ScalarType.BYTES*/ }, + { no: 7, name: "start_at", kind: "scalar", oneof: "start", T: 12 /*ScalarType.BYTES*/ }, + { no: 8, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0 + */ +export const GetDocumentsRequest_GetDocumentsRequestV0 = new GetDocumentsRequest_GetDocumentsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDocumentsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDocumentsResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetDocumentsResponse_GetDocumentsResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse + */ +export const GetDocumentsResponse = new GetDocumentsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDocumentsResponse_GetDocumentsResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0", [ + { no: 1, name: "documents", kind: "message", oneof: "result", T: () => GetDocumentsResponse_GetDocumentsResponseV0_Documents }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0 + */ +export const GetDocumentsResponse_GetDocumentsResponseV0 = new GetDocumentsResponse_GetDocumentsResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetDocumentsResponse_GetDocumentsResponseV0_Documents$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents", [ + { no: 1, name: "documents", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents + */ +export const GetDocumentsResponse_GetDocumentsResponseV0_Documents = new GetDocumentsResponse_GetDocumentsResponseV0_Documents$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityByPublicKeyHashRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest + */ +export const GetIdentityByPublicKeyHashRequest = new GetIdentityByPublicKeyHashRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0", [ + { no: 1, name: "public_key_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0 + */ +export const GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0 = new GetIdentityByPublicKeyHashRequest_GetIdentityByPublicKeyHashRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityByPublicKeyHashResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse + */ +export const GetIdentityByPublicKeyHashResponse = new GetIdentityByPublicKeyHashResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0", [ + { no: 1, name: "identity", kind: "scalar", oneof: "result", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0 + */ +export const GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0 = new GetIdentityByPublicKeyHashResponse_GetIdentityByPublicKeyHashResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class WaitForStateTransitionResultRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest + */ +export const WaitForStateTransitionResultRequest = new WaitForStateTransitionResultRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0", [ + { no: 1, name: "state_transition_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0 + */ +export const WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0 = new WaitForStateTransitionResultRequest_WaitForStateTransitionResultRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class WaitForStateTransitionResultResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse + */ +export const WaitForStateTransitionResultResponse = new WaitForStateTransitionResultResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0", [ + { no: 1, name: "error", kind: "message", oneof: "result", T: () => StateTransitionBroadcastError }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0 + */ +export const WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0 = new WaitForStateTransitionResultResponse_WaitForStateTransitionResultResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetConsensusParamsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetConsensusParamsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetConsensusParamsRequest_GetConsensusParamsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsRequest + */ +export const GetConsensusParamsRequest = new GetConsensusParamsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetConsensusParamsRequest_GetConsensusParamsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0", [ + { no: 1, name: "height", kind: "scalar", T: 5 /*ScalarType.INT32*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0 + */ +export const GetConsensusParamsRequest_GetConsensusParamsRequestV0 = new GetConsensusParamsRequest_GetConsensusParamsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetConsensusParamsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetConsensusParamsResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetConsensusParamsResponse_GetConsensusParamsResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse + */ +export const GetConsensusParamsResponse = new GetConsensusParamsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetConsensusParamsResponse_ConsensusParamsBlock$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock", [ + { no: 1, name: "max_bytes", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "max_gas", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "time_iota_ms", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock + */ +export const GetConsensusParamsResponse_ConsensusParamsBlock = new GetConsensusParamsResponse_ConsensusParamsBlock$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetConsensusParamsResponse_ConsensusParamsEvidence$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence", [ + { no: 1, name: "max_age_num_blocks", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "max_age_duration", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "max_bytes", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence + */ +export const GetConsensusParamsResponse_ConsensusParamsEvidence = new GetConsensusParamsResponse_ConsensusParamsEvidence$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetConsensusParamsResponse_GetConsensusParamsResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0", [ + { no: 1, name: "block", kind: "message", T: () => GetConsensusParamsResponse_ConsensusParamsBlock }, + { no: 2, name: "evidence", kind: "message", T: () => GetConsensusParamsResponse_ConsensusParamsEvidence } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0 + */ +export const GetConsensusParamsResponse_GetConsensusParamsResponseV0 = new GetConsensusParamsResponse_GetConsensusParamsResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeStateRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest + */ +export const GetProtocolVersionUpgradeStateRequest = new GetProtocolVersionUpgradeStateRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0", [ + { no: 1, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0 + */ +export const GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0 = new GetProtocolVersionUpgradeStateRequest_GetProtocolVersionUpgradeStateRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeStateResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse + */ +export const GetProtocolVersionUpgradeStateResponse = new GetProtocolVersionUpgradeStateResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0", [ + { no: 1, name: "versions", kind: "message", oneof: "result", T: () => GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0 + */ +export const GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0 = new GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions", [ + { no: 1, name: "versions", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions + */ +export const GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions = new GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_Versions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry", [ + { no: 1, name: "version_number", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "vote_count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry + */ +export const GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry = new GetProtocolVersionUpgradeStateResponse_GetProtocolVersionUpgradeStateResponseV0_VersionEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeVoteStatusRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest + */ +export const GetProtocolVersionUpgradeVoteStatusRequest = new GetProtocolVersionUpgradeVoteStatusRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0", [ + { no: 1, name: "start_pro_tx_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0 + */ +export const GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0 = new GetProtocolVersionUpgradeVoteStatusRequest_GetProtocolVersionUpgradeVoteStatusRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeVoteStatusResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse + */ +export const GetProtocolVersionUpgradeVoteStatusResponse = new GetProtocolVersionUpgradeVoteStatusResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0", [ + { no: 1, name: "versions", kind: "message", oneof: "result", T: () => GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0 + */ +export const GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0 = new GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals", [ + { no: 1, name: "version_signals", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals + */ +export const GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals = new GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal", [ + { no: 1, name: "pro_tx_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "version", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal + */ +export const GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal = new GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEpochsInfoRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEpochsInfoRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetEpochsInfoRequest_GetEpochsInfoRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoRequest + */ +export const GetEpochsInfoRequest = new GetEpochsInfoRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEpochsInfoRequest_GetEpochsInfoRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0", [ + { no: 1, name: "start_epoch", kind: "message", T: () => UInt32Value }, + { no: 2, name: "count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "ascending", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 4, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0 + */ +export const GetEpochsInfoRequest_GetEpochsInfoRequestV0 = new GetEpochsInfoRequest_GetEpochsInfoRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEpochsInfoResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEpochsInfoResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetEpochsInfoResponse_GetEpochsInfoResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse + */ +export const GetEpochsInfoResponse = new GetEpochsInfoResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEpochsInfoResponse_GetEpochsInfoResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0", [ + { no: 1, name: "epochs", kind: "message", oneof: "result", T: () => GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0 + */ +export const GetEpochsInfoResponse_GetEpochsInfoResponseV0 = new GetEpochsInfoResponse_GetEpochsInfoResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos", [ + { no: 1, name: "epoch_infos", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos + */ +export const GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos = new GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfos$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo", [ + { no: 1, name: "number", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "first_block_height", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 3, name: "first_core_block_height", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "start_time", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 5, name: "fee_multiplier", kind: "scalar", T: 1 /*ScalarType.DOUBLE*/ }, + { no: 6, name: "protocol_version", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo + */ +export const GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo = new GetEpochsInfoResponse_GetEpochsInfoResponseV0_EpochInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourcesRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourcesRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourcesRequest_GetContestedResourcesRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest + */ +export const GetContestedResourcesRequest = new GetContestedResourcesRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourcesRequest_GetContestedResourcesRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "document_type_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "index_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "start_index_values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "end_index_values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 6, name: "start_at_value_info", kind: "message", T: () => GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo }, + { no: 7, name: "count", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 8, name: "order_ascending", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 9, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0 + */ +export const GetContestedResourcesRequest_GetContestedResourcesRequestV0 = new GetContestedResourcesRequest_GetContestedResourcesRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo", [ + { no: 1, name: "start_value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "start_value_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo + */ +export const GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo = new GetContestedResourcesRequest_GetContestedResourcesRequestV0_StartAtValueInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourcesResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourcesResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourcesResponse_GetContestedResourcesResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse + */ +export const GetContestedResourcesResponse = new GetContestedResourcesResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourcesResponse_GetContestedResourcesResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0", [ + { no: 1, name: "contested_resource_values", kind: "message", oneof: "result", T: () => GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0 + */ +export const GetContestedResourcesResponse_GetContestedResourcesResponseV0 = new GetContestedResourcesResponse_GetContestedResourcesResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues", [ + { no: 1, name: "contested_resource_values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues + */ +export const GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues = new GetContestedResourcesResponse_GetContestedResourcesResponseV0_ContestedResourceValues$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest + */ +export const GetVotePollsByEndDateRequest = new GetVotePollsByEndDateRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0", [ + { no: 1, name: "start_time_info", kind: "message", T: () => GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo }, + { no: 2, name: "end_time_info", kind: "message", T: () => GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo }, + { no: 3, name: "limit", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "offset", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 5, name: "ascending", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 6, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0 + */ +export const GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0 = new GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo", [ + { no: 1, name: "start_time_ms", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "start_time_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo + */ +export const GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo = new GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_StartAtTimeInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo", [ + { no: 1, name: "end_time_ms", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "end_time_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo + */ +export const GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo = new GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0_EndAtTimeInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse + */ +export const GetVotePollsByEndDateResponse = new GetVotePollsByEndDateResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0", [ + { no: 1, name: "vote_polls_by_timestamps", kind: "message", oneof: "result", T: () => GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0 + */ +export const GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0 = new GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp", [ + { no: 1, name: "timestamp", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "serialized_vote_polls", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp + */ +export const GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp = new GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps", [ + { no: 1, name: "vote_polls_by_timestamps", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamp }, + { no: 2, name: "finished_results", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps + */ +export const GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps = new GetVotePollsByEndDateResponse_GetVotePollsByEndDateResponseV0_SerializedVotePollsByTimestamps$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest + */ +export const GetContestedResourceVoteStateRequest = new GetContestedResourceVoteStateRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "document_type_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "index_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "index_values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "result_type", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType", GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType] }, + { no: 6, name: "allow_include_locked_and_abstaining_vote_tally", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 7, name: "start_at_identifier_info", kind: "message", T: () => GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo }, + { no: 8, name: "count", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 9, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0 + */ +export const GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0 = new GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo", [ + { no: 1, name: "start_identifier", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "start_identifier_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo + */ +export const GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo = new GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_StartAtIdentifierInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse + */ +export const GetContestedResourceVoteStateResponse = new GetContestedResourceVoteStateResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0", [ + { no: 1, name: "contested_resource_contenders", kind: "message", oneof: "result", T: () => GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0 + */ +export const GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0 = new GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo", [ + { no: 1, name: "finished_vote_outcome", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome", GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo_FinishedVoteOutcome] }, + { no: 2, name: "won_by_identity_id", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "finished_at_block_height", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 4, name: "finished_at_core_block_height", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 5, name: "finished_at_block_time_ms", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 6, name: "finished_at_epoch", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo + */ +export const GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo = new GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders", [ + { no: 1, name: "contenders", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender }, + { no: 2, name: "abstain_vote_tally", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "lock_vote_tally", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "finished_vote_info", kind: "message", T: () => GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_FinishedVoteInfo } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders + */ +export const GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders = new GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_ContestedResourceContenders$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender", [ + { no: 1, name: "identifier", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "vote_count", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "document", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender + */ +export const GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender = new GetContestedResourceVoteStateResponse_GetContestedResourceVoteStateResponseV0_Contender$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVotersForIdentityRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest + */ +export const GetContestedResourceVotersForIdentityRequest = new GetContestedResourceVotersForIdentityRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "document_type_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "index_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "index_values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "contestant_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 6, name: "start_at_identifier_info", kind: "message", T: () => GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo }, + { no: 7, name: "count", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 8, name: "order_ascending", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 9, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0 + */ +export const GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0 = new GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo", [ + { no: 1, name: "start_identifier", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "start_identifier_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo + */ +export const GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo = new GetContestedResourceVotersForIdentityRequest_GetContestedResourceVotersForIdentityRequestV0_StartAtIdentifierInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVotersForIdentityResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse + */ +export const GetContestedResourceVotersForIdentityResponse = new GetContestedResourceVotersForIdentityResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0", [ + { no: 1, name: "contested_resource_voters", kind: "message", oneof: "result", T: () => GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0 + */ +export const GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0 = new GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters", [ + { no: 1, name: "voters", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "finished_results", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters + */ +export const GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters = new GetContestedResourceVotersForIdentityResponse_GetContestedResourceVotersForIdentityResponseV0_ContestedResourceVoters$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest + */ +export const GetContestedResourceIdentityVotesRequest = new GetContestedResourceIdentityVotesRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "limit", kind: "message", T: () => UInt32Value }, + { no: 3, name: "offset", kind: "message", T: () => UInt32Value }, + { no: 4, name: "order_ascending", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 5, name: "start_at_vote_poll_id_info", kind: "message", T: () => GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo }, + { no: 6, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0 + */ +export const GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0 = new GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo", [ + { no: 1, name: "start_at_poll_identifier", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "start_poll_identifier_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo + */ +export const GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo = new GetContestedResourceIdentityVotesRequest_GetContestedResourceIdentityVotesRequestV0_StartAtVotePollIdInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse + */ +export const GetContestedResourceIdentityVotesResponse = new GetContestedResourceIdentityVotesResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0", [ + { no: 1, name: "votes", kind: "message", oneof: "result", T: () => GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0 + */ +export const GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0 = new GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes", [ + { no: 1, name: "contested_resource_identity_votes", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote }, + { no: 2, name: "finished_results", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes + */ +export const GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes = new GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVotes$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice", [ + { no: 1, name: "vote_choice_type", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType", GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType] }, + { no: 2, name: "identity_id", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice + */ +export const GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice = new GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "document_type_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "serialized_index_storage_values", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 4, name: "vote_choice", kind: "message", T: () => GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote + */ +export const GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote = new GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ContestedResourceIdentityVote$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPrefundedSpecializedBalanceRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest + */ +export const GetPrefundedSpecializedBalanceRequest = new GetPrefundedSpecializedBalanceRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0", [ + { no: 1, name: "id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0 + */ +export const GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0 = new GetPrefundedSpecializedBalanceRequest_GetPrefundedSpecializedBalanceRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPrefundedSpecializedBalanceResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse + */ +export const GetPrefundedSpecializedBalanceResponse = new GetPrefundedSpecializedBalanceResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0", [ + { no: 1, name: "balance", kind: "scalar", oneof: "result", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0 + */ +export const GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0 = new GetPrefundedSpecializedBalanceResponse_GetPrefundedSpecializedBalanceResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTotalCreditsInPlatformRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest + */ +export const GetTotalCreditsInPlatformRequest = new GetTotalCreditsInPlatformRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0", [ + { no: 1, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0 + */ +export const GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0 = new GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTotalCreditsInPlatformResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse + */ +export const GetTotalCreditsInPlatformResponse = new GetTotalCreditsInPlatformResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0", [ + { no: 1, name: "credits", kind: "scalar", oneof: "result", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0 + */ +export const GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0 = new GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPathElementsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPathElementsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetPathElementsRequest_GetPathElementsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsRequest + */ +export const GetPathElementsRequest = new GetPathElementsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPathElementsRequest_GetPathElementsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0", [ + { no: 1, name: "path", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "keys", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0 + */ +export const GetPathElementsRequest_GetPathElementsRequestV0 = new GetPathElementsRequest_GetPathElementsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPathElementsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPathElementsResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetPathElementsResponse_GetPathElementsResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse + */ +export const GetPathElementsResponse = new GetPathElementsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPathElementsResponse_GetPathElementsResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0", [ + { no: 1, name: "elements", kind: "message", oneof: "result", T: () => GetPathElementsResponse_GetPathElementsResponseV0_Elements }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0 + */ +export const GetPathElementsResponse_GetPathElementsResponseV0 = new GetPathElementsResponse_GetPathElementsResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetPathElementsResponse_GetPathElementsResponseV0_Elements$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements", [ + { no: 1, name: "elements", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements + */ +export const GetPathElementsResponse_GetPathElementsResponseV0_Elements = new GetPathElementsResponse_GetPathElementsResponseV0_Elements$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetStatusRequest_GetStatusRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusRequest + */ +export const GetStatusRequest = new GetStatusRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusRequest_GetStatusRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0 + */ +export const GetStatusRequest_GetStatusRequestV0 = new GetStatusRequest_GetStatusRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetStatusResponse_GetStatusResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse + */ +export const GetStatusResponse = new GetStatusResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0", [ + { no: 1, name: "version", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Version }, + { no: 2, name: "node", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Node }, + { no: 3, name: "chain", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Chain }, + { no: 4, name: "network", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Network }, + { no: 5, name: "state_sync", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_StateSync }, + { no: 6, name: "time", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Time } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0 + */ +export const GetStatusResponse_GetStatusResponseV0 = new GetStatusResponse_GetStatusResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Version$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version", [ + { no: 1, name: "software", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Version_Software }, + { no: 2, name: "protocol", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Version_Protocol } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version + */ +export const GetStatusResponse_GetStatusResponseV0_Version = new GetStatusResponse_GetStatusResponseV0_Version$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Version_Software$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software", [ + { no: 1, name: "dapi", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "drive", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "tenderdash", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software + */ +export const GetStatusResponse_GetStatusResponseV0_Version_Software = new GetStatusResponse_GetStatusResponseV0_Version_Software$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Version_Protocol$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol", [ + { no: 1, name: "tenderdash", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash }, + { no: 2, name: "drive", kind: "message", T: () => GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol + */ +export const GetStatusResponse_GetStatusResponseV0_Version_Protocol = new GetStatusResponse_GetStatusResponseV0_Version_Protocol$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash", [ + { no: 1, name: "p2p", kind: "scalar", jsonName: "p2p", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "block", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash + */ +export const GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash = new GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive", [ + { no: 3, name: "latest", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "current", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive + */ +export const GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive = new GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Time$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time", [ + { no: 1, name: "local", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "block", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ }, + { no: 3, name: "genesis", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ }, + { no: 4, name: "epoch", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time + */ +export const GetStatusResponse_GetStatusResponseV0_Time = new GetStatusResponse_GetStatusResponseV0_Time$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Node$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node", [ + { no: 1, name: "id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "pro_tx_hash", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node + */ +export const GetStatusResponse_GetStatusResponseV0_Node = new GetStatusResponse_GetStatusResponseV0_Node$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Chain$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain", [ + { no: 1, name: "catching_up", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 2, name: "latest_block_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "latest_app_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 4, name: "latest_block_height", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 5, name: "earliest_block_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 6, name: "earliest_app_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 7, name: "earliest_block_height", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 9, name: "max_peer_block_height", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 10, name: "core_chain_locked_height", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain + */ +export const GetStatusResponse_GetStatusResponseV0_Chain = new GetStatusResponse_GetStatusResponseV0_Chain$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_Network$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network", [ + { no: 1, name: "chain_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "peers_count", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "listening", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network + */ +export const GetStatusResponse_GetStatusResponseV0_Network = new GetStatusResponse_GetStatusResponseV0_Network$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetStatusResponse_GetStatusResponseV0_StateSync$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync", [ + { no: 1, name: "total_synced_time", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "remaining_time", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 3, name: "total_snapshots", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "chunk_process_avg_time", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 5, name: "snapshot_height", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 6, name: "snapshot_chunks_count", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 7, name: "backfilled_blocks", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 8, name: "backfill_blocks_total", kind: "scalar", T: 4 /*ScalarType.UINT64*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync + */ +export const GetStatusResponse_GetStatusResponseV0_StateSync = new GetStatusResponse_GetStatusResponseV0_StateSync$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetCurrentQuorumsInfoRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest + */ +export const GetCurrentQuorumsInfoRequest = new GetCurrentQuorumsInfoRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0", []); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0 + */ +export const GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0 = new GetCurrentQuorumsInfoRequest_GetCurrentQuorumsInfoRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetCurrentQuorumsInfoResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse + */ +export const GetCurrentQuorumsInfoResponse = new GetCurrentQuorumsInfoResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetCurrentQuorumsInfoResponse_ValidatorV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0", [ + { no: 1, name: "pro_tx_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "node_ip", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "is_banned", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0 + */ +export const GetCurrentQuorumsInfoResponse_ValidatorV0 = new GetCurrentQuorumsInfoResponse_ValidatorV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetCurrentQuorumsInfoResponse_ValidatorSetV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0", [ + { no: 1, name: "quorum_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "core_height", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "members", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetCurrentQuorumsInfoResponse_ValidatorV0 }, + { no: 4, name: "threshold_public_key", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0 + */ +export const GetCurrentQuorumsInfoResponse_ValidatorSetV0 = new GetCurrentQuorumsInfoResponse_ValidatorSetV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0", [ + { no: 1, name: "quorum_hashes", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "current_quorum_hash", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "validator_sets", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetCurrentQuorumsInfoResponse_ValidatorSetV0 }, + { no: 4, name: "last_block_proposer", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0 + */ +export const GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0 = new GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenBalancesRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + */ +export const GetIdentityTokenBalancesRequest = new GetIdentityTokenBalancesRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "token_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + */ +export const GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 = new GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenBalancesResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + */ +export const GetIdentityTokenBalancesResponse = new GetIdentityTokenBalancesResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0", [ + { no: 1, name: "token_balances", kind: "message", oneof: "result", T: () => GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + */ +export const GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 = new GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "balance", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + */ +export const GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry = new GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances", [ + { no: 1, name: "token_balances", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + */ +export const GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances = new GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenBalancesRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + */ +export const GetIdentitiesTokenBalancesRequest = new GetIdentitiesTokenBalancesRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "identity_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + */ +export const GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 = new GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenBalancesResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + */ +export const GetIdentitiesTokenBalancesResponse = new GetIdentitiesTokenBalancesResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0", [ + { no: 1, name: "identity_token_balances", kind: "message", oneof: "result", T: () => GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + */ +export const GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 = new GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "balance", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + */ +export const GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry = new GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances", [ + { no: 1, name: "identity_token_balances", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + */ +export const GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances = new GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenInfosRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + */ +export const GetIdentityTokenInfosRequest = new GetIdentityTokenInfosRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "token_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + */ +export const GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 = new GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenInfosResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + */ +export const GetIdentityTokenInfosResponse = new GetIdentityTokenInfosResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0", [ + { no: 1, name: "token_infos", kind: "message", oneof: "result", T: () => GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + */ +export const GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 = new GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry", [ + { no: 1, name: "frozen", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + */ +export const GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry = new GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "info", kind: "message", T: () => GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + */ +export const GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry = new GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos", [ + { no: 1, name: "token_infos", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + */ +export const GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos = new GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenInfosRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + */ +export const GetIdentitiesTokenInfosRequest = new GetIdentitiesTokenInfosRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "identity_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + */ +export const GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 = new GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenInfosResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + */ +export const GetIdentitiesTokenInfosResponse = new GetIdentitiesTokenInfosResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0", [ + { no: 1, name: "identity_token_infos", kind: "message", oneof: "result", T: () => GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + */ +export const GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 = new GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry", [ + { no: 1, name: "frozen", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + */ +export const GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry = new GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry", [ + { no: 1, name: "identity_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "info", kind: "message", T: () => GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + */ +export const GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry = new GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos", [ + { no: 1, name: "token_infos", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + */ +export const GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos = new GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenStatusesRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenStatusesRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTokenStatusesRequest_GetTokenStatusesRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesRequest + */ +export const GetTokenStatusesRequest = new GetTokenStatusesRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenStatusesRequest_GetTokenStatusesRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0", [ + { no: 1, name: "token_ids", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + */ +export const GetTokenStatusesRequest_GetTokenStatusesRequestV0 = new GetTokenStatusesRequest_GetTokenStatusesRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenStatusesResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenStatusesResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTokenStatusesResponse_GetTokenStatusesResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse + */ +export const GetTokenStatusesResponse = new GetTokenStatusesResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenStatusesResponse_GetTokenStatusesResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0", [ + { no: 1, name: "token_statuses", kind: "message", oneof: "result", T: () => GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + */ +export const GetTokenStatusesResponse_GetTokenStatusesResponseV0 = new GetTokenStatusesResponse_GetTokenStatusesResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "paused", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + */ +export const GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry = new GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses", [ + { no: 1, name: "token_statuses", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + */ +export const GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses = new GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest + */ +export const GetTokenPreProgrammedDistributionsRequest = new GetTokenPreProgrammedDistributionsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "start_at_info", kind: "message", T: () => GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo }, + { no: 3, name: "limit", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0 + */ +export const GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0 = new GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo", [ + { no: 1, name: "start_time_ms", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 2, name: "start_recipient", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "start_recipient_included", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfo + */ +export const GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo = new GetTokenPreProgrammedDistributionsRequest_GetTokenPreProgrammedDistributionsRequestV0_StartAtInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse + */ +export const GetTokenPreProgrammedDistributionsResponse = new GetTokenPreProgrammedDistributionsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0", [ + { no: 1, name: "token_distributions", kind: "message", oneof: "result", T: () => GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0 + */ +export const GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0 = new GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry", [ + { no: 1, name: "recipient_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "amount", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry + */ +export const GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry = new GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry", [ + { no: 1, name: "timestamp", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 2, name: "distributions", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributionEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntry + */ +export const GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry = new GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions", [ + { no: 1, name: "token_distributions", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenTimedDistributionEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributions + */ +export const GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions = new GetTokenPreProgrammedDistributionsResponse_GetTokenPreProgrammedDistributionsResponseV0_TokenDistributions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenTotalSupplyRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + */ +export const GetTokenTotalSupplyRequest = new GetTokenTotalSupplyRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + */ +export const GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 = new GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenTotalSupplyResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + */ +export const GetTokenTotalSupplyResponse = new GetTokenTotalSupplyResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0", [ + { no: 1, name: "token_total_supply", kind: "message", oneof: "result", T: () => GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + */ +export const GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 = new GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry", [ + { no: 1, name: "token_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "total_aggregated_amount_in_user_accounts", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 3, name: "total_system_amount", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + */ +export const GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry = new GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfoRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfoRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupInfoRequest_GetGroupInfoRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoRequest + */ +export const GetGroupInfoRequest = new GetGroupInfoRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfoRequest_GetGroupInfoRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "group_contract_position", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + */ +export const GetGroupInfoRequest_GetGroupInfoRequestV0 = new GetGroupInfoRequest_GetGroupInfoRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfoResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfoResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupInfoResponse_GetGroupInfoResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse + */ +export const GetGroupInfoResponse = new GetGroupInfoResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfoResponse_GetGroupInfoResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0", [ + { no: 1, name: "group_info", kind: "message", oneof: "result", T: () => GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 4, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + */ +export const GetGroupInfoResponse_GetGroupInfoResponseV0 = new GetGroupInfoResponse_GetGroupInfoResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry", [ + { no: 1, name: "member_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "power", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + */ +export const GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry = new GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry", [ + { no: 1, name: "members", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry }, + { no: 2, name: "group_required_power", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + */ +export const GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry = new GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo", [ + { no: 1, name: "group_info", kind: "message", T: () => GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + */ +export const GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo = new GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupInfosRequest_GetGroupInfosRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest + */ +export const GetGroupInfosRequest = new GetGroupInfosRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosRequest_StartAtGroupContractPosition$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition", [ + { no: 1, name: "start_group_contract_position", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "start_group_contract_position_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + */ +export const GetGroupInfosRequest_StartAtGroupContractPosition = new GetGroupInfosRequest_StartAtGroupContractPosition$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosRequest_GetGroupInfosRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "start_at_group_contract_position", kind: "message", T: () => GetGroupInfosRequest_StartAtGroupContractPosition }, + { no: 3, name: "count", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + */ +export const GetGroupInfosRequest_GetGroupInfosRequestV0 = new GetGroupInfosRequest_GetGroupInfosRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupInfosResponse_GetGroupInfosResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse + */ +export const GetGroupInfosResponse = new GetGroupInfosResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosResponse_GetGroupInfosResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0", [ + { no: 1, name: "group_infos", kind: "message", oneof: "result", T: () => GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 4, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + */ +export const GetGroupInfosResponse_GetGroupInfosResponseV0 = new GetGroupInfosResponse_GetGroupInfosResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry", [ + { no: 1, name: "member_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "power", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + */ +export const GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry = new GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry", [ + { no: 1, name: "group_contract_position", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "members", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry }, + { no: 3, name: "group_required_power", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + */ +export const GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry = new GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos", [ + { no: 1, name: "group_infos", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + */ +export const GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos = new GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupActionsRequest_GetGroupActionsRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest + */ +export const GetGroupActionsRequest = new GetGroupActionsRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsRequest_StartAtActionId$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId", [ + { no: 1, name: "start_action_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "start_action_id_included", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + */ +export const GetGroupActionsRequest_StartAtActionId = new GetGroupActionsRequest_StartAtActionId$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsRequest_GetGroupActionsRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "group_contract_position", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "status", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus", GetGroupActionsRequest_ActionStatus] }, + { no: 4, name: "start_at_action_id", kind: "message", T: () => GetGroupActionsRequest_StartAtActionId }, + { no: 5, name: "count", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 6, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + */ +export const GetGroupActionsRequest_GetGroupActionsRequestV0 = new GetGroupActionsRequest_GetGroupActionsRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse + */ +export const GetGroupActionsResponse = new GetGroupActionsResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0", [ + { no: 1, name: "group_actions", kind: "message", oneof: "result", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0 = new GetGroupActionsResponse_GetGroupActionsResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent", [ + { no: 1, name: "amount", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 2, name: "recipient_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 3, name: "public_note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent", [ + { no: 1, name: "amount", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 2, name: "public_note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent", [ + { no: 1, name: "frozen_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "public_note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent", [ + { no: 1, name: "frozen_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "public_note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent", [ + { no: 1, name: "frozen_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "amount", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 3, name: "public_note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote", [ + { no: 1, name: "sender_key_index", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "recipient_key_index", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "encrypted_data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote = new GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote", [ + { no: 1, name: "root_encryption_key_index", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "derivation_encryption_key_index", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "encrypted_data", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote = new GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent", [ + { no: 1, name: "action_type", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType", GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType] }, + { no: 2, name: "public_note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent", [ + { no: 1, name: "token_config_update_item", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "public_note", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent", [ + { no: 1, name: "token_event", kind: "message", oneof: "eventType", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent }, + { no: 2, name: "document_event", kind: "message", oneof: "eventType", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent }, + { no: 3, name: "contract_event", kind: "message", oneof: "eventType", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent", [ + { no: 1, name: "create", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent", [ + { no: 1, name: "created_document", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent", [ + { no: 1, name: "updated_contract", kind: "scalar", T: 12 /*ScalarType.BYTES*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent", [ + { no: 1, name: "update", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent", [ + { no: 1, name: "mint", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent }, + { no: 2, name: "burn", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent }, + { no: 3, name: "freeze", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent }, + { no: 4, name: "unfreeze", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent }, + { no: 5, name: "destroy_frozen_funds", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent }, + { no: 6, name: "emergency_action", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent }, + { no: 7, name: "token_config_update", kind: "message", oneof: "type", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent = new GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry", [ + { no: 1, name: "action_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "event", kind: "message", T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry = new GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions", [ + { no: 1, name: "group_actions", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + */ +export const GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions = new GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionSignersRequest$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionSignersRequest", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersRequest + */ +export const GetGroupActionSignersRequest = new GetGroupActionSignersRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionSignersRequest_GetGroupActionSignersRequestV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0", [ + { no: 1, name: "contract_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "group_contract_position", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "status", kind: "enum", T: () => ["org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus", GetGroupActionSignersRequest_ActionStatus] }, + { no: 4, name: "action_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 5, name: "prove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + */ +export const GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 = new GetGroupActionSignersRequest_GetGroupActionSignersRequestV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionSignersResponse$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionSignersResponse", [ + { no: 1, name: "v0", kind: "message", oneof: "version", T: () => GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse + */ +export const GetGroupActionSignersResponse = new GetGroupActionSignersResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionSignersResponse_GetGroupActionSignersResponseV0$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0", [ + { no: 1, name: "group_action_signers", kind: "message", oneof: "result", T: () => GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners }, + { no: 2, name: "proof", kind: "message", oneof: "result", T: () => Proof }, + { no: 3, name: "metadata", kind: "message", T: () => ResponseMetadata } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + */ +export const GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 = new GetGroupActionSignersResponse_GetGroupActionSignersResponseV0$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner", [ + { no: 1, name: "signer_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 2, name: "power", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + */ +export const GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner = new GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners$Type extends MessageType { + constructor() { + super("org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners", [ + { no: 1, name: "signers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner } + ]); + } +} +/** + * @generated MessageType for protobuf message org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + */ +export const GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners = new GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners$Type(); +/** + * @generated ServiceType for protobuf service org.dash.platform.dapi.v0.Platform + */ +export const Platform = new ServiceType("org.dash.platform.dapi.v0.Platform", [ + { name: "broadcastStateTransition", options: {}, I: BroadcastStateTransitionRequest, O: BroadcastStateTransitionResponse }, + { name: "getIdentity", options: {}, I: GetIdentityRequest, O: GetIdentityResponse }, + { name: "getIdentityKeys", options: {}, I: GetIdentityKeysRequest, O: GetIdentityKeysResponse }, + { name: "getIdentitiesContractKeys", options: {}, I: GetIdentitiesContractKeysRequest, O: GetIdentitiesContractKeysResponse }, + { name: "getIdentityNonce", options: {}, I: GetIdentityNonceRequest, O: GetIdentityNonceResponse }, + { name: "getIdentityContractNonce", options: {}, I: GetIdentityContractNonceRequest, O: GetIdentityContractNonceResponse }, + { name: "getIdentityBalance", options: {}, I: GetIdentityBalanceRequest, O: GetIdentityBalanceResponse }, + { name: "getIdentitiesBalances", options: {}, I: GetIdentitiesBalancesRequest, O: GetIdentitiesBalancesResponse }, + { name: "getIdentityBalanceAndRevision", options: {}, I: GetIdentityBalanceAndRevisionRequest, O: GetIdentityBalanceAndRevisionResponse }, + { name: "getEvonodesProposedEpochBlocksByIds", options: {}, I: GetEvonodesProposedEpochBlocksByIdsRequest, O: GetEvonodesProposedEpochBlocksResponse }, + { name: "getEvonodesProposedEpochBlocksByRange", options: {}, I: GetEvonodesProposedEpochBlocksByRangeRequest, O: GetEvonodesProposedEpochBlocksResponse }, + { name: "getProofs", options: {}, I: GetProofsRequest, O: GetProofsResponse }, + { name: "getDataContract", options: {}, I: GetDataContractRequest, O: GetDataContractResponse }, + { name: "getDataContractHistory", options: {}, I: GetDataContractHistoryRequest, O: GetDataContractHistoryResponse }, + { name: "getDataContracts", options: {}, I: GetDataContractsRequest, O: GetDataContractsResponse }, + { name: "getDocuments", options: {}, I: GetDocumentsRequest, O: GetDocumentsResponse }, + { name: "getIdentityByPublicKeyHash", options: {}, I: GetIdentityByPublicKeyHashRequest, O: GetIdentityByPublicKeyHashResponse }, + { name: "waitForStateTransitionResult", options: {}, I: WaitForStateTransitionResultRequest, O: WaitForStateTransitionResultResponse }, + { name: "getConsensusParams", options: {}, I: GetConsensusParamsRequest, O: GetConsensusParamsResponse }, + { name: "getProtocolVersionUpgradeState", options: {}, I: GetProtocolVersionUpgradeStateRequest, O: GetProtocolVersionUpgradeStateResponse }, + { name: "getProtocolVersionUpgradeVoteStatus", options: {}, I: GetProtocolVersionUpgradeVoteStatusRequest, O: GetProtocolVersionUpgradeVoteStatusResponse }, + { name: "getEpochsInfo", options: {}, I: GetEpochsInfoRequest, O: GetEpochsInfoResponse }, + { name: "getContestedResources", options: {}, I: GetContestedResourcesRequest, O: GetContestedResourcesResponse }, + { name: "getContestedResourceVoteState", options: {}, I: GetContestedResourceVoteStateRequest, O: GetContestedResourceVoteStateResponse }, + { name: "getContestedResourceVotersForIdentity", options: {}, I: GetContestedResourceVotersForIdentityRequest, O: GetContestedResourceVotersForIdentityResponse }, + { name: "getContestedResourceIdentityVotes", options: {}, I: GetContestedResourceIdentityVotesRequest, O: GetContestedResourceIdentityVotesResponse }, + { name: "getVotePollsByEndDate", options: {}, I: GetVotePollsByEndDateRequest, O: GetVotePollsByEndDateResponse }, + { name: "getPrefundedSpecializedBalance", options: {}, I: GetPrefundedSpecializedBalanceRequest, O: GetPrefundedSpecializedBalanceResponse }, + { name: "getTotalCreditsInPlatform", options: {}, I: GetTotalCreditsInPlatformRequest, O: GetTotalCreditsInPlatformResponse }, + { name: "getPathElements", options: {}, I: GetPathElementsRequest, O: GetPathElementsResponse }, + { name: "getStatus", options: {}, I: GetStatusRequest, O: GetStatusResponse }, + { name: "getCurrentQuorumsInfo", options: {}, I: GetCurrentQuorumsInfoRequest, O: GetCurrentQuorumsInfoResponse }, + { name: "getIdentityTokenBalances", options: {}, I: GetIdentityTokenBalancesRequest, O: GetIdentityTokenBalancesResponse }, + { name: "getIdentitiesTokenBalances", options: {}, I: GetIdentitiesTokenBalancesRequest, O: GetIdentitiesTokenBalancesResponse }, + { name: "getIdentityTokenInfos", options: {}, I: GetIdentityTokenInfosRequest, O: GetIdentityTokenInfosResponse }, + { name: "getIdentitiesTokenInfos", options: {}, I: GetIdentitiesTokenInfosRequest, O: GetIdentitiesTokenInfosResponse }, + { name: "getTokenStatuses", options: {}, I: GetTokenStatusesRequest, O: GetTokenStatusesResponse }, + { name: "getTokenPreProgrammedDistributions", options: {}, I: GetTokenPreProgrammedDistributionsRequest, O: GetTokenPreProgrammedDistributionsResponse }, + { name: "getTokenTotalSupply", options: {}, I: GetTokenTotalSupplyRequest, O: GetTokenTotalSupplyResponse }, + { name: "getGroupInfo", options: {}, I: GetGroupInfoRequest, O: GetGroupInfoResponse }, + { name: "getGroupInfos", options: {}, I: GetGroupInfosRequest, O: GetGroupInfosResponse }, + { name: "getGroupActions", options: {}, I: GetGroupActionsRequest, O: GetGroupActionsResponse }, + { name: "getGroupActionSigners", options: {}, I: GetGroupActionSignersRequest, O: GetGroupActionSignersResponse } +]); diff --git a/src/hex.js b/src/hex.js new file mode 100644 index 0000000..2124717 --- /dev/null +++ b/src/hex.js @@ -0,0 +1,34 @@ +/** + * @type {string[]} + */ +const byteToHex = []; + +for (let n = 0; n <= 0xff; ++n) +{ + const hexOctet = n.toString(16).padStart(2, "0"); + byteToHex.push(hexOctet); +} + +/** + * @param {ArrayBuffer | Uint8Array} arrayBuffer + */ +export function toHex(arrayBuffer) +{ + const buff = new Uint8Array(arrayBuffer); + const hexOctets = []; // new Array(buff.length) is even faster (preallocates necessary array size), then use hexOctets[i] instead of .push() + + for (let i = 0; i < buff.length; ++i) + hexOctets.push(byteToHex[buff[i]]); + + return hexOctets.join(""); +} + +/** + * @param {string} string + */ +export function fromHex(string) { + const uint8array = new Uint8Array(Math.ceil(string.length / 2)); + for (let i = 0; i < string.length;) + uint8array[i / 2] = Number.parseInt(string.slice(i, i += 2), 16); + return uint8array; +} \ No newline at end of file diff --git a/src/identity.ts b/src/identity.ts new file mode 100644 index 0000000..d78974a --- /dev/null +++ b/src/identity.ts @@ -0,0 +1,44 @@ +import { toHex } from "./hex.js" +import { base58 } from "./util/base58.ts" +import * as BinCode from "../src/bincode.ts" +import * as DashBincode from "../2.0.0/generated_bincode.js" +import { NodeConnection } from "./rpc.ts" + +export type IdentityId = Uint8Array + +/** + * Retrieve the IdentityId of the Identity that includes the given public key hash + */ +// TODO: Pass in a plain Key instead +export async function findExistingIdentity(node: NodeConnection, publicKeyHash: Uint8Array): Promise { + let alreadyIdentity: Awaited>; + try { + alreadyIdentity = await node.platform.getIdentityByPublicKeyHash({ + version: { + oneofKind: 'v0', v0: { + publicKeyHash, + prove: false, + } + } + }) + } catch (e) { + // console.error(e, Object.entries(e)); + if ((e as any)?.code === 'NOT_FOUND') { + // not created yet + return null + } else { + throw e + } + } + if (alreadyIdentity.response.version.oneofKind === 'v0') { + // console.log('alreadyIdentity', alreadyIdentity.response.version.v0) + if (alreadyIdentity.response.version.v0.result.oneofKind === 'identity') { + const identityBytes: Uint8Array = alreadyIdentity.response.version.v0.result.identity + // console.log('alreadyIdentity hex', toHex(identityBytes)) + const identity = BinCode.decode(DashBincode.Identity, BinCode.typedArrayToBuffer(identityBytes)) + // console.log('Identity Already Created!', identity) + return identity + } + } + throw new Error("Cannot handle getIdentityByPublicKeyHash response"); +} \ No newline at end of file diff --git a/src/key-utils.js b/src/key-utils.js new file mode 100644 index 0000000..348730a --- /dev/null +++ b/src/key-utils.js @@ -0,0 +1,201 @@ +import * as Secp256k1 from "@dashincubator/secp256k1"; +import ripemd160 from "ripemd160-js/ripemd160.js" + +/** + * @typedef KeyInfo + * @prop {String} address + * @prop {Uint8Array} privateKey + * @prop {Uint8Array} publicKey + * @prop {String} pubKeyHash + */ + +/** @type {Object.} */ +const keysMap = {}; + +/** + * @param {String} id - typically address + * @param {KeyInfo} keyInfo + */ +export function set(id, keyInfo) { + if (!id) { + throw new Error(`key identifier is not defined)`); + } + keysMap[id] = keyInfo; +}; + +/** + * @param {Uint8Array} privKeyBytes + * @param {Uint8Array} hashBytes + */ +export async function sign(privKeyBytes, hashBytes) { + let asn1Bytes = await signAsn1(privKeyBytes, hashBytes); + return asn1Bytes; +}; + +/** + * @param {Uint8Array} privKeyBytes + * @param {Uint8Array} hashBytes + */ +export async function signAsn1(privKeyBytes, hashBytes) { + let testing = true; + let sigOpts = { canonical: true }; + if (!testing) { + Object.assign({ extraEntropy: true }); + } + let sigBytes = await Secp256k1.sign(hashBytes, privKeyBytes, sigOpts); + return sigBytes; +}; + +/** + * @param {Uint8Array} bytes + */ +export async function doubleSha256(bytes) { + let firstHash = await sha256(bytes); + let secondHash = await sha256(firstHash); + return secondHash; +}; + +/** + * @param {Uint8Array} bytes + */ +export async function sha256(bytes) { + let hashBuffer = await crypto.subtle.digest("SHA-256", bytes); + let hashBytes = new Uint8Array(hashBuffer); + return hashBytes; +} + +/** + * Sha256 then RIPEMD-160 + * @param {Uint8Array} bytes + */ +export async function pubkeyHash(bytes) { + let firstHash = await sha256(bytes); + return ripemd160(firstHash); +} + +/** + * This is called "Simple Sign" by the Rust SDK. + * @param {Object} opts + * @param {Uint8Array} opts.privKeyBytes + * @param {Uint8Array} opts.doubleSha256Bytes + */ +export async function magicSign({ privKeyBytes, doubleSha256Bytes }) { + if (doubleSha256Bytes?.length !== 32) { + throw new Error(`'doubleSha256Bytes' must be a 32-byte double sha256 hash`); + } + + let MAGIC_OFFSET = 27 + 4; // 27 because bitcoin, 4 because "compressed" key + let testing = true; + let sigOpts = { canonical: true, der: false, recovered: true }; + if (!testing) { + Object.assign({ extraEntropy: true }); + } + let recoverySig = await Secp256k1.sign( + doubleSha256Bytes, + privKeyBytes, + sigOpts, + ); + let magicSig = new Uint8Array(65); + // the magic byte is prepended (the signature is NOT reversed) + magicSig[0] = MAGIC_OFFSET + recoverySig[1]; + magicSig.set(recoverySig[0], 1); + return magicSig; +}; + +/** + * @param {Uint8Array} privKeyBytes + * @param {Uint8Array} hashBytes + * @param {Uint8Array} [sigBytes] - preallocated 64 bytes + */ +export async function signP1363(privKeyBytes, hashBytes, sigBytes) { + let asn1Bytes = await signAsn1(privKeyBytes, hashBytes); + let p1363Bytes = asn1ToP1363Signature(asn1Bytes, sigBytes); + // TODO DEBUG TESTING + // for (let i = 0; i < p1363Bytes.length; i += 1) { + // p1363Bytes[i] = 0xff; + // } + return p1363Bytes; +}; + +/** + * @param {Uint8Array} asn1 + * @param {Uint8Array} [p1363Signature] + */ +export function asn1ToP1363Signature(asn1, p1363Signature) { + if (asn1[0] !== 0x30) { + throw new Error("Invalid DER signature format"); + } + + let offset = 0; + offset += 2; // skip SEQUENCE and length bytes + + offset += 1; // skip type byte + let rLength = asn1[offset]; + offset += 1; + let r = asn1.slice(offset, offset + rLength); + + offset += rLength; + offset += 1; // skip type byte + let sLength = asn1[offset]; + offset += 1; + let s = asn1.slice(offset, offset + sLength); + + if (!p1363Signature) { + p1363Signature = new Uint8Array(64); + } + + // remove ASN1 padding, or zero-pad the start of r and s, if needed + let rStart = 32 - r.length; + if (rStart === -1) { + r = r.subarray(1); + rStart = 0; + } + p1363Signature.set(r, rStart); + + let sStart = 64 - s.length; + if (sStart === 31) { + s = s.subarray(1); + sStart = 32; + } + p1363Signature.set(s, sStart); + + return p1363Signature; +}; + +/** + * @param {{ address?: string; txid: any; outputIndex: any; }} input + */ +export async function getPrivateKey(input) { + if (!input.address) { + //throw new Error('should put the address on the input there buddy...'); + console.warn("missing address:", input.txid, input.outputIndex); + return null; + } + + let keyInfo = keysMap[input.address]; + return keyInfo.privateKey; +}; + +/** + * @param {{ address?: string; txid: any; outputIndex: any; }} txInput + * @param {any} i + */ +export async function getPublicKey(txInput, i) { + let privKeyBytes = await getPrivateKey(txInput, i); + if (!privKeyBytes) { + return null; + } + let pubKeyBytes = await toPublicKey(privKeyBytes); + + return pubKeyBytes; +}; + +/** + * @param {Uint8Array} privKeyBytes + */ +export async function toPublicKey(privKeyBytes) { + let isCompressed = true; + let pubKeyBytes = Secp256k1.getPublicKey(privKeyBytes, isCompressed); + + return pubKeyBytes; +}; \ No newline at end of file diff --git a/src/opcodes.ts b/src/opcodes.ts new file mode 100644 index 0000000..e4e9176 --- /dev/null +++ b/src/opcodes.ts @@ -0,0 +1,517 @@ +export const OP = { + /** Push an empty array onto the stack. */ + OP_PUSHBYTES_0: 0x00, + /** Push the next byte as an array onto the stack. */ + OP_PUSHBYTES_1: 0x01, + /** Push the next 2 bytes as an array onto the stack. */ + OP_PUSHBYTES_2: 0x02, + /** Push the next 3 bytes as an array onto the stack. */ + OP_PUSHBYTES_3: 0x03, + /** Push the next 4 bytes as an array onto the stack. */ + OP_PUSHBYTES_4: 0x04, + /** Push the next 5 bytes as an array onto the stack. */ + OP_PUSHBYTES_5: 0x05, + /** Push the next 6 bytes as an array onto the stack. */ + OP_PUSHBYTES_6: 0x06, + /** Push the next 7 bytes as an array onto the stack. */ + OP_PUSHBYTES_7: 0x07, + /** Push the next 8 bytes as an array onto the stack. */ + OP_PUSHBYTES_8: 0x08, + /** Push the next 9 bytes as an array onto the stack. */ + OP_PUSHBYTES_9: 0x09, + /** Push the next 10 bytes as an array onto the stack. */ + OP_PUSHBYTES_10: 0x0a, + /** Push the next 11 bytes as an array onto the stack. */ + OP_PUSHBYTES_11: 0x0b, + /** Push the next 12 bytes as an array onto the stack. */ + OP_PUSHBYTES_12: 0x0c, + /** Push the next 13 bytes as an array onto the stack. */ + OP_PUSHBYTES_13: 0x0d, + /** Push the next 14 bytes as an array onto the stack. */ + OP_PUSHBYTES_14: 0x0e, + /** Push the next 15 bytes as an array onto the stack. */ + OP_PUSHBYTES_15: 0x0f, + /** Push the next 16 bytes as an array onto the stack. */ + OP_PUSHBYTES_16: 0x10, + /** Push the next 17 bytes as an array onto the stack. */ + OP_PUSHBYTES_17: 0x11, + /** Push the next 18 bytes as an array onto the stack. */ + OP_PUSHBYTES_18: 0x12, + /** Push the next 19 bytes as an array onto the stack. */ + OP_PUSHBYTES_19: 0x13, + /** Push the next 20 bytes as an array onto the stack. */ + OP_PUSHBYTES_20: 0x14, + /** Push the next 21 bytes as an array onto the stack. */ + OP_PUSHBYTES_21: 0x15, + /** Push the next 22 bytes as an array onto the stack. */ + OP_PUSHBYTES_22: 0x16, + /** Push the next 23 bytes as an array onto the stack. */ + OP_PUSHBYTES_23: 0x17, + /** Push the next 24 bytes as an array onto the stack. */ + OP_PUSHBYTES_24: 0x18, + /** Push the next 25 bytes as an array onto the stack. */ + OP_PUSHBYTES_25: 0x19, + /** Push the next 26 bytes as an array onto the stack. */ + OP_PUSHBYTES_26: 0x1a, + /** Push the next 27 bytes as an array onto the stack. */ + OP_PUSHBYTES_27: 0x1b, + /** Push the next 28 bytes as an array onto the stack. */ + OP_PUSHBYTES_28: 0x1c, + /** Push the next 29 bytes as an array onto the stack. */ + OP_PUSHBYTES_29: 0x1d, + /** Push the next 30 bytes as an array onto the stack. */ + OP_PUSHBYTES_30: 0x1e, + /** Push the next 31 bytes as an array onto the stack. */ + OP_PUSHBYTES_31: 0x1f, + /** Push the next 32 bytes as an array onto the stack. */ + OP_PUSHBYTES_32: 0x20, + /** Push the next 33 bytes as an array onto the stack. */ + OP_PUSHBYTES_33: 0x21, + /** Push the next 34 bytes as an array onto the stack. */ + OP_PUSHBYTES_34: 0x22, + /** Push the next 35 bytes as an array onto the stack. */ + OP_PUSHBYTES_35: 0x23, + /** Push the next 36 bytes as an array onto the stack. */ + OP_PUSHBYTES_36: 0x24, + /** Push the next 37 bytes as an array onto the stack. */ + OP_PUSHBYTES_37: 0x25, + /** Push the next 38 bytes as an array onto the stack. */ + OP_PUSHBYTES_38: 0x26, + /** Push the next 39 bytes as an array onto the stack. */ + OP_PUSHBYTES_39: 0x27, + /** Push the next 40 bytes as an array onto the stack. */ + OP_PUSHBYTES_40: 0x28, + /** Push the next 41 bytes as an array onto the stack. */ + OP_PUSHBYTES_41: 0x29, + /** Push the next 42 bytes as an array onto the stack. */ + OP_PUSHBYTES_42: 0x2a, + /** Push the next 43 bytes as an array onto the stack. */ + OP_PUSHBYTES_43: 0x2b, + /** Push the next 44 bytes as an array onto the stack. */ + OP_PUSHBYTES_44: 0x2c, + /** Push the next 45 bytes as an array onto the stack. */ + OP_PUSHBYTES_45: 0x2d, + /** Push the next 46 bytes as an array onto the stack. */ + OP_PUSHBYTES_46: 0x2e, + /** Push the next 47 bytes as an array onto the stack. */ + OP_PUSHBYTES_47: 0x2f, + /** Push the next 48 bytes as an array onto the stack. */ + OP_PUSHBYTES_48: 0x30, + /** Push the next 49 bytes as an array onto the stack. */ + OP_PUSHBYTES_49: 0x31, + /** Push the next 50 bytes as an array onto the stack. */ + OP_PUSHBYTES_50: 0x32, + /** Push the next 51 bytes as an array onto the stack. */ + OP_PUSHBYTES_51: 0x33, + /** Push the next 52 bytes as an array onto the stack. */ + OP_PUSHBYTES_52: 0x34, + /** Push the next 53 bytes as an array onto the stack. */ + OP_PUSHBYTES_53: 0x35, + /** Push the next 54 bytes as an array onto the stack. */ + OP_PUSHBYTES_54: 0x36, + /** Push the next 55 bytes as an array onto the stack. */ + OP_PUSHBYTES_55: 0x37, + /** Push the next 56 bytes as an array onto the stack. */ + OP_PUSHBYTES_56: 0x38, + /** Push the next 57 bytes as an array onto the stack. */ + OP_PUSHBYTES_57: 0x39, + /** Push the next 58 bytes as an array onto the stack. */ + OP_PUSHBYTES_58: 0x3a, + /** Push the next 59 bytes as an array onto the stack. */ + OP_PUSHBYTES_59: 0x3b, + /** Push the next 60 bytes as an array onto the stack. */ + OP_PUSHBYTES_60: 0x3c, + /** Push the next 61 bytes as an array onto the stack. */ + OP_PUSHBYTES_61: 0x3d, + /** Push the next 62 bytes as an array onto the stack. */ + OP_PUSHBYTES_62: 0x3e, + /** Push the next 63 bytes as an array onto the stack. */ + OP_PUSHBYTES_63: 0x3f, + /** Push the next 64 bytes as an array onto the stack. */ + OP_PUSHBYTES_64: 0x40, + /** Push the next 65 bytes as an array onto the stack. */ + OP_PUSHBYTES_65: 0x41, + /** Push the next 66 bytes as an array onto the stack. */ + OP_PUSHBYTES_66: 0x42, + /** Push the next 67 bytes as an array onto the stack. */ + OP_PUSHBYTES_67: 0x43, + /** Push the next 68 bytes as an array onto the stack. */ + OP_PUSHBYTES_68: 0x44, + /** Push the next 69 bytes as an array onto the stack. */ + OP_PUSHBYTES_69: 0x45, + /** Push the next 70 bytes as an array onto the stack. */ + OP_PUSHBYTES_70: 0x46, + /** Push the next 71 bytes as an array onto the stack. */ + OP_PUSHBYTES_71: 0x47, + /** Push the next 72 bytes as an array onto the stack. */ + OP_PUSHBYTES_72: 0x48, + /** Push the next 73 bytes as an array onto the stack. */ + OP_PUSHBYTES_73: 0x49, + /** Push the next 74 bytes as an array onto the stack. */ + OP_PUSHBYTES_74: 0x4a, + /** Push the next 75 bytes as an array onto the stack. */ + OP_PUSHBYTES_75: 0x4b, + /** Read the next byte as N; push the next N bytes as an array onto the stack. */ + OP_PUSHDATA1: 0x4c, + /** Read the next 2 bytes as N; push the next N bytes as an array onto the stack. */ + OP_PUSHDATA2: 0x4d, + /** Read the next 4 bytes as N; push the next N bytes as an array onto the stack. */ + OP_PUSHDATA4: 0x4e, + /** Push the array `0x81` onto the stack. */ + OP_PUSHNUM_NEG1: 0x4f, + /** Synonym for OP_RETURN. */ + OP_RESERVED: 0x50, + /** Push the array `0x01` onto the stack. */ + OP_PUSHNUM_1: 0x51, + /** the array `0x02` onto the stack. */ + OP_PUSHNUM_2: 0x52, + /** Push the array `0x03` onto the stack. */ + OP_PUSHNUM_3: 0x53, + /** Push the array `0x04` onto the stack. */ + OP_PUSHNUM_4: 0x54, + /** Push the array `0x05` onto the stack. */ + OP_PUSHNUM_5: 0x55, + /** Push the array `0x06` onto the stack. */ + OP_PUSHNUM_6: 0x56, + /** Push the array `0x07` onto the stack. */ + OP_PUSHNUM_7: 0x57, + /** Push the array `0x08` onto the stack. */ + OP_PUSHNUM_8: 0x58, + /** Push the array `0x09` onto the stack. */ + OP_PUSHNUM_9: 0x59, + /** Push the array `0x0a` onto the stack. */ + OP_PUSHNUM_10: 0x5a, + /** Push the array `0x0b` onto the stack. */ + OP_PUSHNUM_11: 0x5b, + /** Push the array `0x0c` onto the stack. */ + OP_PUSHNUM_12: 0x5c, + /** Push the array `0x0d` onto the stack. */ + OP_PUSHNUM_13: 0x5d, + /** Push the array `0x0e` onto the stack. */ + OP_PUSHNUM_14: 0x5e, + /** Push the array `0x0f` onto the stack. */ + OP_PUSHNUM_15: 0x5f, + /** Push the array `0x10` onto the stack. */ + OP_PUSHNUM_16: 0x60, + /** Does nothing. */ + OP_NOP: 0x61, + /** Synonym for OP_RETURN. */ + OP_VER: 0x62, + /** Pop and execute the next statements if a nonzero element was popped. */ + OP_IF: 0x63, + /** Pop and execute the next statements if a zero element was popped. */ + OP_NOTIF: 0x64, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_VERIF: 0x65, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_VERNOTIF: 0x66, + /** Execute statements if those after the previous OP_IF were not, and vice-versa. + If there is no previous OP_IF, this acts as a RETURN. */ + OP_ELSE: 0x67, + /** Pop and execute the next statements if a zero element was popped. */ + OP_ENDIF: 0x68, + /** If the top value is zero or the stack is empty, fail; otherwise, pop the stack. */ + OP_VERIFY: 0x69, + /** Fail the script immediately. (Must be executed.). */ + OP_RETURN: 0x6a, + /** Pop one element from the main stack onto the alt stack. */ + OP_TOALTSTACK: 0x6b, + /** Pop one element from the alt stack onto the main stack. */ + OP_FROMALTSTACK: 0x6c, + /** Drops the top two stack items. */ + OP_2DROP: 0x6d, + /** Duplicates the top two stack items as AB -> ABAB. */ + OP_2DUP: 0x6e, + /** Duplicates the two three stack items as ABC -> ABCABC. */ + OP_3DUP: 0x6f, + /** Copies the two stack items of items two spaces back to the front, as xxAB -> ABxxAB. */ + OP_2OVER: 0x70, + /** Moves the two stack items four spaces back to the front, as xxxxAB -> ABxxxx. */ + OP_2ROT: 0x71, + /** Swaps the top two pairs, as ABCD -> CDAB. */ + OP_2SWAP: 0x72, + /** Duplicate the top stack element unless it is zero. */ + OP_IFDUP: 0x73, + /** Push the current number of stack items onto the stack. */ + OP_DEPTH: 0x74, + /** Drops the top stack item. */ + OP_DROP: 0x75, + /** Duplicates the top stack item. */ + OP_DUP: 0x76, + /** Drops the second-to-top stack item. */ + OP_NIP: 0x77, + /** Copies the second-to-top stack item, as xA -> AxA. */ + OP_OVER: 0x78, + /** Pop the top stack element as N. Copy the Nth stack element to the top. */ + OP_PICK: 0x79, + /** Pop the top stack element as N. Move the Nth stack element to the top. */ + OP_ROLL: 0x7a, + /** Rotate the top three stack items, as [top next1 next2] -> [next2 top next1]. */ + OP_ROT: 0x7b, + /** Swap the top two stack items. */ + OP_SWAP: 0x7c, + /** Copy the top stack item to before the second item, as [top next] -> [top next top]. */ + OP_TUCK: 0x7d, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_CAT: 0x7e, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_SUBSTR: 0x7f, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_LEFT: 0x80, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_RIGHT: 0x81, + /** Pushes the length of the top stack item onto the stack. */ + OP_SIZE: 0x82, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_INVERT: 0x83, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_AND: 0x84, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_OR: 0x85, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_XOR: 0x86, + /** Pushes 1 if the inputs are exactly equal, 0 otherwise. */ + OP_EQUAL: 0x87, + /** Returns success if the inputs are exactly equal, failure otherwise. */ + OP_EQUALVERIFY: 0x88, + /** Synonym for OP_RETURN. */ + OP_RESERVED1: 0x89, + /** Synonym for OP_RETURN. */ + OP_RESERVED2: 0x8a, + /** Increment the top stack element in place. */ + OP_1ADD: 0x8b, + /** Decrement the top stack element in place. */ + OP_1SUB: 0x8c, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_2MUL: 0x8d, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_2DIV: 0x8e, + /** Multiply the top stack item by -1 in place. */ + OP_NEGATE: 0x8f, + /** Absolute value the top stack item in place. */ + OP_ABS: 0x90, + /** Map 0 to 1 and everything else to 0, in place. */ + OP_NOT: 0x91, + /** Map 0 to 0 and everything else to 1, in place. */ + OP_0NOTEQUAL: 0x92, + /** Pop two stack items and push their sum. */ + OP_ADD: 0x93, + /** Pop two stack items and push the second minus the top. */ + OP_SUB: 0x94, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_MUL: 0x95, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_DIV: 0x96, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_MOD: 0x97, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_LSHIFT: 0x98, + /** Fail the script unconditionally, does not even need to be executed. */ + OP_RSHIFT: 0x99, + /** Pop the top two stack items and push 1 if both are nonzero, else push 0. */ + OP_BOOLAND: 0x9a, + /** Pop the top two stack items and push 1 if either is nonzero, else push 0. */ + OP_BOOLOR: 0x9b, + /** Pop the top two stack items and push 1 if both are numerically equal, else push 0. */ + OP_NUMEQUAL: 0x9c, + /** Pop the top two stack items and return success if both are numerically equal, else return failure. */ + OP_NUMEQUALVERIFY: 0x9d, + /** Pop the top two stack items and push 0 if both are numerically equal, else push 1. */ + OP_NUMNOTEQUAL: 0x9e, + /** Pop the top two items; push 1 if the second is less than the top, 0 otherwise. */ + OP_LESSTHAN : 0x9f, + /** Pop the top two items; push 1 if the second is greater than the top, 0 otherwise. */ + OP_GREATERTHAN : 0xa0, + /** Pop the top two items; push 1 if the second is <= the top, 0 otherwise. */ + OP_LESSTHANOREQUAL : 0xa1, + /** Pop the top two items; push 1 if the second is >= the top, 0 otherwise. */ + OP_GREATERTHANOREQUAL : 0xa2, + /** Pop the top two items; push the smaller. */ + OP_MIN: 0xa3, + /** Pop the top two items; push the larger. */ + OP_MAX: 0xa4, + /** Pop the top three items; if the top is >= the second and < the third, push 1, otherwise push 0. */ + OP_WITHIN: 0xa5, + /** Pop the top stack item and push its RIPEMD160 hash. */ + OP_RIPEMD160: 0xa6, + /** Pop the top stack item and push its SHA1 hash. */ + OP_SHA1: 0xa7, + /** Pop the top stack item and push its SHA256 hash. */ + OP_SHA256: 0xa8, + /** Pop the top stack item and push its RIPEMD(SHA256) hash. */ + OP_HASH160: 0xa9, + /** Pop the top stack item and push its SHA256(SHA256) hash. */ + OP_HASH256: 0xaa, + /** Ignore this and everything preceding when deciding what to sign when signature-checking. */ + OP_CODESEPARATOR: 0xab, + /** pushing 1/0 for success/failure. */ + OP_CHECKSIG: 0xac, + /** returning success/failure. */ + OP_CHECKSIGVERIFY: 0xad, + /** Pop N, N pubkeys, M, M signatures, a dummy (due to bug in reference code), + and verify that all M signatures are valid. Push 1 for 'all valid', 0 otherwise. */ + OP_CHECKMULTISIG: 0xae, + /** Like the above but return success/failure. */ + OP_CHECKMULTISIGVERIFY: 0xaf, + /** Does nothing. */ + OP_NOP1: 0xb0, + /** */ + OP_CLTV: 0xb1, + /** */ + OP_CSV: 0xb2, + /** Does nothing. */ + OP_NOP4: 0xb3, + /** Does nothing. */ + OP_NOP5: 0xb4, + /** Does nothing. */ + OP_NOP6: 0xb5, + /** Does nothing. */ + OP_NOP7: 0xb6, + /** Does nothing. */ + OP_NOP8: 0xb7, + /** Does nothing. */ + OP_NOP9: 0xb8, + /** Does nothing. */ + OP_NOP10: 0xb9, + // Every other opcode acts as OP_RETURN + /** OP_CHECKSIGADD post tapscript. */ + OP_CHECKSIGADD: 0xba, + /** Synonym for OP_RETURN. */ + OP_RETURN_187: 0xbb, + /** Synonym for OP_RETURN. */ + OP_RETURN_188: 0xbc, + /** Synonym for OP_RETURN. */ + OP_RETURN_189: 0xbd, + /** Synonym for OP_RETURN. */ + OP_RETURN_190: 0xbe, + /** Synonym for OP_RETURN. */ + OP_RETURN_191: 0xbf, + /** Synonym for OP_RETURN. */ + OP_RETURN_192: 0xc0, + /** Synonym for OP_RETURN. */ + OP_RETURN_193: 0xc1, + /** Synonym for OP_RETURN. */ + OP_RETURN_194: 0xc2, + /** Synonym for OP_RETURN. */ + OP_RETURN_195: 0xc3, + /** Synonym for OP_RETURN. */ + OP_RETURN_196: 0xc4, + /** Synonym for OP_RETURN. */ + OP_RETURN_197: 0xc5, + /** Synonym for OP_RETURN. */ + OP_RETURN_198: 0xc6, + /** Synonym for OP_RETURN. */ + OP_RETURN_199: 0xc7, + /** Synonym for OP_RETURN. */ + OP_RETURN_200: 0xc8, + /** Synonym for OP_RETURN. */ + OP_RETURN_201: 0xc9, + /** Synonym for OP_RETURN. */ + OP_RETURN_202: 0xca, + /** Synonym for OP_RETURN. */ + OP_RETURN_203: 0xcb, + /** Synonym for OP_RETURN. */ + OP_RETURN_204: 0xcc, + /** Synonym for OP_RETURN. */ + OP_RETURN_205: 0xcd, + /** Synonym for OP_RETURN. */ + OP_RETURN_206: 0xce, + /** Synonym for OP_RETURN. */ + OP_RETURN_207: 0xcf, + /** Synonym for OP_RETURN. */ + OP_RETURN_208: 0xd0, + /** Synonym for OP_RETURN. */ + OP_RETURN_209: 0xd1, + /** Synonym for OP_RETURN. */ + OP_RETURN_210: 0xd2, + /** Synonym for OP_RETURN. */ + OP_RETURN_211: 0xd3, + /** Synonym for OP_RETURN. */ + OP_RETURN_212: 0xd4, + /** Synonym for OP_RETURN. */ + OP_RETURN_213: 0xd5, + /** Synonym for OP_RETURN. */ + OP_RETURN_214: 0xd6, + /** Synonym for OP_RETURN. */ + OP_RETURN_215: 0xd7, + /** Synonym for OP_RETURN. */ + OP_RETURN_216: 0xd8, + /** Synonym for OP_RETURN. */ + OP_RETURN_217: 0xd9, + /** Synonym for OP_RETURN. */ + OP_RETURN_218: 0xda, + /** Synonym for OP_RETURN. */ + OP_RETURN_219: 0xdb, + /** Synonym for OP_RETURN. */ + OP_RETURN_220: 0xdc, + /** Synonym for OP_RETURN. */ + OP_RETURN_221: 0xdd, + /** Synonym for OP_RETURN. */ + OP_RETURN_222: 0xde, + /** Synonym for OP_RETURN. */ + OP_RETURN_223: 0xdf, + /** Synonym for OP_RETURN. */ + OP_RETURN_224: 0xe0, + /** Synonym for OP_RETURN. */ + OP_RETURN_225: 0xe1, + /** Synonym for OP_RETURN. */ + OP_RETURN_226: 0xe2, + /** Synonym for OP_RETURN. */ + OP_RETURN_227: 0xe3, + /** Synonym for OP_RETURN. */ + OP_RETURN_228: 0xe4, + /** Synonym for OP_RETURN. */ + OP_RETURN_229: 0xe5, + /** Synonym for OP_RETURN. */ + OP_RETURN_230: 0xe6, + /** Synonym for OP_RETURN. */ + OP_RETURN_231: 0xe7, + /** Synonym for OP_RETURN. */ + OP_RETURN_232: 0xe8, + /** Synonym for OP_RETURN. */ + OP_RETURN_233: 0xe9, + /** Synonym for OP_RETURN. */ + OP_RETURN_234: 0xea, + /** Synonym for OP_RETURN. */ + OP_RETURN_235: 0xeb, + /** Synonym for OP_RETURN. */ + OP_RETURN_236: 0xec, + /** Synonym for OP_RETURN. */ + OP_RETURN_237: 0xed, + /** Synonym for OP_RETURN. */ + OP_RETURN_238: 0xee, + /** Synonym for OP_RETURN. */ + OP_RETURN_239: 0xef, + /** Synonym for OP_RETURN. */ + OP_RETURN_240: 0xf0, + /** Synonym for OP_RETURN. */ + OP_RETURN_241: 0xf1, + /** Synonym for OP_RETURN. */ + OP_RETURN_242: 0xf2, + /** Synonym for OP_RETURN. */ + OP_RETURN_243: 0xf3, + /** Synonym for OP_RETURN. */ + OP_RETURN_244: 0xf4, + /** Synonym for OP_RETURN. */ + OP_RETURN_245: 0xf5, + /** Synonym for OP_RETURN. */ + OP_RETURN_246: 0xf6, + /** Synonym for OP_RETURN. */ + OP_RETURN_247: 0xf7, + /** Synonym for OP_RETURN. */ + OP_RETURN_248: 0xf8, + /** Synonym for OP_RETURN. */ + OP_RETURN_249: 0xf9, + /** Synonym for OP_RETURN. */ + OP_RETURN_250: 0xfa, + /** Synonym for OP_RETURN. */ + OP_RETURN_251: 0xfb, + /** Synonym for OP_RETURN. */ + OP_RETURN_252: 0xfc, + /** Synonym for OP_RETURN. */ + OP_RETURN_253: 0xfd, + /** Synonym for OP_RETURN. */ + OP_RETURN_254: 0xfe, + /** Synonym for OP_RETURN */ + OP_INVALIDOPCODE: 0xff, +} \ No newline at end of file diff --git a/src/rpc.ts b/src/rpc.ts new file mode 100644 index 0000000..e333aa9 --- /dev/null +++ b/src/rpc.ts @@ -0,0 +1,562 @@ +import { GrpcWebFetchTransport } from "@protobuf-ts/grpcweb-transport" +import { PlatformClient } from "./generated/platform/v0/platform.client.ts" +import { CoreClient } from "./generated/core/v0/core.client.ts" +import type { RpcTransport } from "@protobuf-ts/runtime-rpc" + +export class NodeConnection { + constructor( + public readonly transport: RpcTransport, + public readonly core: CoreClient, + public readonly platform: PlatformClient, + ) { } +} + +export function connectToNode(address: string) { + const transport = new GrpcWebFetchTransport({ + baseUrl: address, + // format: 'text', + // interceptors: [ + // { + // interceptUnary(next, method, input, options) { + // console.log("UnaryCall", method, input, options); + // return next(method, input, options); + // } + // // interceptServerStreaming(next: NextServerStreamingFn, method: MethodInfo, input: object, options: RpcOptions): ServerStreamingCall; + // // interceptClientStreaming(next: NextClientStreamingFn, method: MethodInfo, options: RpcOptions): ClientStreamingCall; + // // interceptDuplex(next: NextDuplexStreamingFn, method: MethodInfo, options: RpcOptions): DuplexStreamingCall; + // } + // ] + }) + const core = new CoreClient(transport) + const platform = new PlatformClient(transport) + + return new NodeConnection(transport, core, platform) +} + +/** + * Parameters for getaddressbalance RPC. + */ +export interface GetAddressBalanceParams { + addresses: string[]; +} + +/** + * Result for getaddressbalance RPC. + */ +export interface GetAddressBalanceResult { + balance: number; + balance_immature: number; + balance_spendable: number; + received: number; +} + +/** + * Parameters for getaddressdeltas RPC. + */ +export interface GetAddressDeltasParams { + addresses: string[]; + start?: number; + end?: number; +} + +/** + * Result item for getaddressdeltas RPC. + */ +export interface AddressDelta { + satoshis: number; + txid: string; + index: number; + blockindex: number; + height: number; + address: string; +} + +/** + * Parameters for getaddressmempool RPC. + */ +export interface GetAddressMempoolParams { + addresses: string[]; +} + +/** + * Result item for getaddressmempool RPC. + */ +export interface AddressMempoolDelta { + address: string; + txid: string; + index: number; + satoshis: number; + timestamp: number; + prevtxid?: string; + prevout?: string; +} + +/** + * Parameters for getaddresstxids RPC. + */ +export interface GetAddressTxidsParams { + addresses: string[]; + start?: number; + end?: number; +} + +/** + * Parameters for getaddressutxos RPC. + */ +export interface GetAddressUtxosParams { + addresses: string[]; +} + +/** + * Result item for getaddressutxos RPC. + */ +export interface AddressUtxo { + address: string; + txid: string; + outputIndex: number; + script: string; + satoshis: number; + height: number; +} + +/** + * Parameters for analyzepsbt RPC. + */ +export interface AnalyzePsbtParams { + psbt: string; +} + +/** + * Result for analyzepsbt RPC. + */ +export interface AnalyzePsbtResult { + inputs: Array<{ + has_utxo: boolean; + is_final: boolean; + missing?: { + pubkeys?: string[]; + signatures?: string[]; + redeemscript?: string; + }; + next?: string; + }>; + estimated_vsize?: number; + estimated_feerate?: number; + fee?: number; + next: string; + error?: string; +} + +/** + * Parameters for combinepsbt RPC. + */ +export interface CombinePsbtParams { + txs: string[]; +} + +/** + * Parameters for combinerawtransaction RPC. + */ +export interface CombineRawTransactionParams { + txs: string[]; +} + +/** + * Parameters for converttopsbt RPC. + */ +export interface ConvertToPsbtParams { + hexstring: string; + permitsigdata?: boolean; +} + +/** + * Parameters for createpsbt RPC. + */ +export interface CreatePsbtInput { + txid: string; + vout: number; + sequence?: number; +} +export type CreatePsbtOutput = { [address: string]: number | string } | { data: string }; +export interface CreatePsbtParams { + inputs: CreatePsbtInput[]; + outputs: CreatePsbtOutput[]; + locktime?: number; +} + +/** + * Parameters for createrawtransaction RPC. + */ +export interface CreateRawTransactionInput { + txid: string; + vout: number; + sequence?: number; +} +export type CreateRawTransactionOutput = { [address: string]: number | string } | { data: string }; +export interface CreateRawTransactionParams { + inputs: CreateRawTransactionInput[]; + outputs: CreateRawTransactionOutput[]; + locktime?: number; +} + +/** + * Parameters for decodepsbt RPC. + */ +export interface DecodePsbtParams { + psbt: string; +} + +/** + * Parameters for decoderawtransaction RPC. + */ +export interface DecodeRawTransactionParams { + hexstring: string; +} + +/** + * Parameters for decodescript RPC. + */ +export interface DecodeScriptParams { + hexstring: string; +} + +/** + * Parameters for finalizepsbt RPC. + */ +export interface FinalizePsbtParams { + psbt: string; + extract?: boolean; +} + +/** + * Parameters for getassetunlockstatuses RPC. + */ +export interface GetAssetUnlockStatusesParams { + indexes: number[]; + height?: number; +} +export interface AssetUnlockStatus { + index: number; + status: "chainlocked" | "mined" | "mempooled" | "unknown"; +} + +/** + * Parameters for getislocks RPC. + */ +export interface GetIsLocksParams { + txids: string[]; +} +export type IsLockResult = { + txid: string; + inputs: { txid: string; vout: number }[]; + cycleHash: string; + signature: string; + hex: string; +} | "None"; + +/** + * Parameters for getrawtransaction RPC. + */ +export interface GetRawTransactionParams { + txid: string; + verbose?: boolean; + blockhash?: string; +} + +/** + * Parameters for getrawtransactionmulti RPC. + */ +export interface GetRawTransactionMultiParams { + txs: { [blockhash: string]: string[] }; + verbose?: boolean; +} + +/** + * Parameters for gettxchainlocks RPC. + */ +export interface GetTxChainLocksParams { + txids: string[]; +} +export interface TxChainLockStatus { + height: number; + chainlock: boolean; + mempool: boolean; +} + +/** + * Parameters for joinpsbts RPC. + */ +export interface JoinPsbtParams { + txs: string[]; +} + +/** + * Parameters for sendrawtransaction RPC. + */ +export interface SendRawTransactionParams { + hexstring: string; + maxfeerate?: number; + // useInstantSend?: boolean; // Deprecated + // bypassLimits?: boolean; +} + +/** + * Parameters for signrawtransactionwithkey RPC. + */ +export interface SignRawTransactionWithKeyInput { + txid: string; + vout: number; + scriptPubKey: string; + redeemScript?: string; + amount: number; +} +export interface SignRawTransactionWithKeyParams { + hexstring: string; + privkeys: string[]; + prevtxs?: SignRawTransactionWithKeyInput[]; + sighashtype?: string; +} +export interface SignRawTransactionWithKeyResult { + hex: string; + complete: boolean; +} + +/** + * Parameters for testmempoolaccept RPC. + */ +export interface TestMempoolAcceptParams { + rawtxs: string[]; + maxfeerate?: number; +} +export interface TestMempoolAcceptResult { + txid: string; + allowed: boolean; + "reject-reason"?: string; + "package-error"?: string; + vsize: number; + fees?: { base: number }; +} + +/** + * Parameters for utxoupdatepsbt RPC. + */ +export interface UtxoUpdatePsbtParams { + psbt: string; + descriptors?: (string | { desc: string; range?: number | [number, number] })[]; +} + +export class TRPC { + /** + * + * @param baseUrl A URL with in the form http://username:pass@hostname/ + */ + constructor( + public baseUrl: string, + ) { } + + async rawRpc(method: string, ...params: any[]) { + let url = new URL(this.baseUrl) + let baseUrl = `${url.protocol}//${url.host}${url.pathname}` + let basicAuth = btoa(`${url.username}:${url.password}`) + + let payload = JSON.stringify({ method, params }) + let resp = await fetch(baseUrl, { + method: "POST", + headers: { + Authorization: `Basic ${basicAuth}`, + "Content-Type": "application/json", + }, + body: payload, + }) + + let data = await resp.json() + if (data.error) { + let err = new Error(data.error.message) + Object.assign(err, data.error) + throw err + } + + return data.result + } + + /** + * Returns the balance for address(es). + */ + async getAddressBalance(params: GetAddressBalanceParams): Promise { + return this.rawRpc("getaddressbalance", params); + } + + /** + * Returns all changes (deltas) for address(es). + */ + async getAddressDeltas(params: GetAddressDeltasParams): Promise { + return this.rawRpc("getaddressdeltas", params); + } + + /** + * Returns all mempool deltas for address(es). + */ + async getAddressMempool(params: GetAddressMempoolParams): Promise { + return this.rawRpc("getaddressmempool", params); + } + + /** + * Returns the txids for address(es). + */ + async getAddressTxids(params: GetAddressTxidsParams): Promise { + return this.rawRpc("getaddresstxids", params); + } + + /** + * Returns all unspent outputs for address(es). + */ + async getAddressUtxos(params: GetAddressUtxosParams): Promise { + return this.rawRpc("getaddressutxos", params); + } + + /** + * Analyze and provide information about the current status of a PSBT and its inputs. + */ + async analyzePsbt(params: AnalyzePsbtParams): Promise { + return this.rawRpc("analyzepsbt", params.psbt); + } + + /** + * Combine multiple partially-signed PSBTs into one. + */ + async combinePsbt(params: CombinePsbtParams): Promise { + return this.rawRpc("combinepsbt", params.txs); + } + + /** + * Combine multiple partially signed transactions into one transaction. + */ + async combineRawTransaction(params: CombineRawTransactionParams): Promise { + return this.rawRpc("combinerawtransaction", params.txs); + } + + /** + * Convert a network serialized transaction to a PSBT. + */ + async convertToPsbt(params: ConvertToPsbtParams): Promise { + return this.rawRpc("converttopsbt", params.hexstring, params.permitsigdata); + } + + /** + * Create a transaction in the Partially Signed Transaction (PST) format. + */ + async createPsbt(params: CreatePsbtParams): Promise { + return this.rawRpc("createpsbt", params.inputs, params.outputs, params.locktime); + } + + /** + * Create an unsigned serialized transaction. + */ + async createRawTransaction(params: CreateRawTransactionParams): Promise { + return this.rawRpc("createrawtransaction", params.inputs, params.outputs, params.locktime); + } + + /** + * Decode a base64-encoded PSBT. + */ + async decodePsbt(params: DecodePsbtParams): Promise { + return this.rawRpc("decodepsbt", params.psbt); + } + + /** + * Decode a serialized transaction hex string. + */ + async decodeRawTransaction(params: DecodeRawTransactionParams): Promise { + return this.rawRpc("decoderawtransaction", params.hexstring); + } + + /** + * Decode a hex-encoded P2SH redeem script. + */ + async decodeScript(params: DecodeScriptParams): Promise { + return this.rawRpc("decodescript", params.hexstring); + } + + /** + * Finalize the inputs of a PSBT. + */ + async finalizePsbt(params: FinalizePsbtParams): Promise<{ psbt?: string; hex?: string; complete: boolean }> { + return this.rawRpc("finalizepsbt", params.psbt, params.extract); + } + + /** + * Returns the status of the provided Asset Unlock indexes. + */ + async getAssetUnlockStatuses(params: GetAssetUnlockStatusesParams): Promise { + return this.rawRpc("getassetunlockstatuses", params.indexes, params.height); + } + + /** + * Returns the raw InstantSend lock data for each provided transaction ID. + */ + async getIsLocks(params: GetIsLocksParams): Promise { + return this.rawRpc("getislocks", params.txids); + } + + /** + * Gets a hex-encoded serialized transaction or a JSON object describing the transaction. + */ + async getRawTransaction(params: GetRawTransactionParams): Promise { + return this.rawRpc("getrawtransaction", params.txid, params.verbose, params.blockhash); + } + + /** + * Gets hex-encoded serialized transactions or a JSON object describing the transactions. + */ + async getRawTransactionMulti(params: GetRawTransactionMultiParams): Promise { + return this.rawRpc("getrawtransactionmulti", params.txs, params.verbose); + } + + /** + * Returns the block height each transaction was mined at and indicates whether it is in the mempool, ChainLocked, or neither. + */ + async getTxChainLocks(params: GetTxChainLocksParams): Promise { + return this.rawRpc("gettxchainlocks", params.txids); + } + + /** + * Joins multiple distinct PSBTs into one PSBT with inputs and outputs from all of the PSBTs. + */ + async joinPsbt(params: JoinPsbtParams): Promise { + return this.rawRpc("joinpsbts", params.txs); + } + + /** + * Validates a transaction and broadcasts it to the peer-to-peer network. + */ + async sendRawTransaction(params: SendRawTransactionParams): Promise { + return this.rawRpc("sendrawtransaction", params.hexstring, params.maxfeerate); + } + + /** + * Signs inputs for a transaction in the serialized transaction format using private keys provided in the call. + */ + async signRawTransactionWithKey(params: SignRawTransactionWithKeyParams): Promise { + return this.rawRpc( + "signrawtransactionwithkey", + params.hexstring, + params.privkeys, + params.prevtxs, + params.sighashtype + ); + } + + /** + * Returns the results of mempool acceptance tests for raw transaction(s). + */ + async testMempoolAccept(params: TestMempoolAcceptParams): Promise { + return this.rawRpc("testmempoolaccept", params.rawtxs, params.maxfeerate); + } + + /** + * Updates a PSBT with data from output descriptors, UTXOs, or the mempool. + */ + async utxoUpdatePsbt(params: UtxoUpdatePsbtParams): Promise { + return this.rawRpc("utxoupdatepsbt", params.psbt, params.descriptors); + } +} \ No newline at end of file diff --git a/src/scripts.ts b/src/scripts.ts new file mode 100644 index 0000000..d257c5b --- /dev/null +++ b/src/scripts.ts @@ -0,0 +1,61 @@ +import { fromHex, toHex } from './hex.js' +import { OP } from './opcodes.js' + + +export function makeScript(...parts: (number | number[] | Uint8Array)[]) { + let array: number[] = []; + for (const part of parts) { + if (typeof part === "number") + array.push(part); // opcode + else { // slice + let len = part.length; + if (len < OP.OP_PUSHDATA1) { + array.push(len); + } else if (len < 0x100) { + array.push(OP.OP_PUSHDATA1, len); + } else if (len < 0x10000) { + array.push(OP.OP_PUSHDATA2, len & 0xff, len >> 8); + } else if (len < 0x100000000) { + array.push(OP.OP_PUSHDATA4, len & 0xff, (len >> 8) & 0xff, (len >> 16) & 0xff, (len >> 24) & 0xff); + } + array.push(...part); + } + } + return new Uint8Array(array) +} + +// console.log('scriptTest', toHex(makeScript(fromHex('00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff')))) + +export function makeP2PK(pubkey: Uint8Array) { + return makeScript( + pubkey, + OP.OP_CHECKSIG, + ) +} + + +export function makeP2SH(script_hash: Uint8Array) { + return makeScript( + OP.OP_HASH160, + script_hash, + OP.OP_EQUAL, + ) +} + +export function makeP2PKH(pubkey_hash: Uint8Array) { + return makeScript( + OP.OP_DUP, + OP.OP_HASH160, + pubkey_hash, + OP.OP_EQUALVERIFY, + OP.OP_CHECKSIG, + ) +} + +export function makeOP_RETURN(data: Uint8Array) { + return makeScript( + OP.OP_RETURN, + data, + ) +} + diff --git a/src/sign.ts b/src/sign.ts new file mode 100644 index 0000000..bc1a621 --- /dev/null +++ b/src/sign.ts @@ -0,0 +1,61 @@ +import { doubleSha256 } from "../../DashTx.js/dashtx.js" +import * as Bincode from "./bincode.js" +import { BinaryData, Identifier, IdentifierBytes32, IdentityPublicKey, StateTransition } from "../2.0.0/generated_bincode.js" +import * as secp from "@noble/secp256k1" + +/** + * Signs a StateTransition in-place. + * TODO: owner_id? + * @param st StateTransition to sign + * @param identity Public key to sign with + * @param private_key Cooresponding Private key + */ +export async function signTransitionWithRawKey(st: StateTransition, pubkey: IdentityPublicKey, private_key: Uint8Array) { + await Bincode.match(st, { + DataContractCreate: ({ 0: dcct }) => Bincode.match(dcct, { + V0: async ({ 0: dcct0 }) => { + await Bincode.match(dcct0.data_contract, { + V0: async ({ 0: dc }) => { + // dc.owner_id = owner_id + dc.id = await makeContractId(dc.owner_id, dcct0.identity_nonce) + }, + V1: async ({ 0: dc }) => { + // dc.owner_id = owner_id + dc.id = await makeContractId(dc.owner_id, dcct0.identity_nonce) + }, + }) + + const new_signable_bytes = Bincode.encode(StateTransition, st, { signable: true }) + const hash = await doubleSha256(new Uint8Array(new_signable_bytes)) + + // TODO: switch to magicSign + const signature = (await secp.signAsync(hash, private_key, { extraEntropy: false })) + const signature_bytes = new Uint8Array(1 + 64) + signature_bytes[0] = signature.recovery + 27 + 4 // These magic numbers come from rust-dashcore/dash/src/signer.rs RecoverableSignature::to_compact_signature + signature_bytes.set(signature.toCompactRawBytes(), 1) + + dcct0.signature_public_key_id = Bincode.match(pubkey, { + V0: ({0: pk}) => pk.id, + }) + dcct0.signature = BinaryData(signature_bytes) + } + }), + DataContractUpdate: x => { throw new Error("Not implemented") }, + Batch: x => { throw new Error("Function not implemented.") }, + IdentityCreate: x => { throw new Error("Not implemented") }, + IdentityTopUp: x => { throw new Error("Not implemented") }, + IdentityCreditWithdrawal: x => { throw new Error("Not implemented") }, + IdentityUpdate: x => { throw new Error("Not implemented") }, + IdentityCreditTransfer: x => { throw new Error("Not implemented") }, + MasternodeVote: x => { throw new Error("Not implemented") }, + }) +} + +async function makeContractId(owner_id: Identifier, identity_nonce: bigint) { + const contract_id_bytes = new Uint8Array(32 + 8); + contract_id_bytes.set(owner_id[0][0], 0); + new DataView(contract_id_bytes.buffer).setBigUint64(32, BigInt(identity_nonce), false); + const contract_id = await doubleSha256(contract_id_bytes) + + return Identifier(IdentifierBytes32(contract_id)) +} diff --git a/src/util/base58.ts b/src/util/base58.ts new file mode 100644 index 0000000..1ea3535 --- /dev/null +++ b/src/util/base58.ts @@ -0,0 +1,5 @@ +import baseX from "base-x"; + +// Base58 alphabet +const BASE58 = `123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`; +export const base58 = baseX(BASE58); diff --git a/tools/bincode_generator/Cargo.lock b/tools/bincode_generator/Cargo.lock new file mode 100644 index 0000000..424d684 --- /dev/null +++ b/tools/bincode_generator/Cargo.lock @@ -0,0 +1,105 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "bincode_generator" +version = "0.1.0" +dependencies = [ + "fs-walk", + "proc-macro2", + "serde", + "serde_json", + "syn", +] + +[[package]] +name = "fs-walk" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8418cfcfe26dd2e7d413774d113f77f647ba9b19804b542b374ba7cbfb7ef1d" + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "proc-macro2" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "syn" +version = "2.0.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e02e925281e18ffd9d640e234264753c43edc62d64b2d4cf898f1bc5e75f3fc2" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" diff --git a/tools/bincode_generator/Cargo.toml b/tools/bincode_generator/Cargo.toml new file mode 100644 index 0000000..70d3535 --- /dev/null +++ b/tools/bincode_generator/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "bincode_generator" +version = "0.1.0" +edition = "2024" + +[dependencies] +fs-walk = "0.1.3" +proc-macro2 = "1.0.94" +serde = { version = "1.0.219", features = ["derive"] } +serde_json = "1.0.140" +syn = { version = "2.0.99", features = ["full", "extra-traits"] } diff --git a/tools/bincode_generator/src/collect.rs b/tools/bincode_generator/src/collect.rs new file mode 100644 index 0000000..c3e5fff --- /dev/null +++ b/tools/bincode_generator/src/collect.rs @@ -0,0 +1,179 @@ +use crate::deps::CollectDeps; +use std::collections::BTreeMap; +use std::collections::BTreeSet; + +use crate::Item; + +pub struct ItemCollector { + pub all_items: BTreeMap, +} + +impl ItemCollector { + pub fn collect_items(&mut self, items: &[syn::Item]) { + for item in items { + self.collect_item(item); + } + } + + fn collect_item(&mut self, item: &syn::Item) { + match item { + syn::Item::Struct(item_struct) => { + let mut is_encode = false; + let mut is_error = false; + for attr in &item_struct.attrs { + if attr.path().is_ident("error") { + is_error = true; + } else if attr.path().is_ident("derive") { + if attr_meta_contains_encode(attr) { + is_encode = true; + } + } else { + // println!("// {}", Fmt(attr)); + } + } + if is_error { + // continue; + } + // if !is_encode { + // println!("// !ENCODE"); + // } + // println!("{}", Fmt(&item_struct)) + let mut deps = BTreeSet::new(); + item_struct.collect_deps(&mut deps); + + let name = item_struct.ident.to_string(); + if let Some(duplicate) = self.all_items.insert( + name.clone(), + Item { + name: name.clone(), + item: syn::Item::Struct(item_struct.clone()), + deps, + needed: false, //is_encode, + is_encode, + }, + ) { + eprintln!("Duplicate item found! {}", item_struct.ident); + self.all_items.get_mut(&name).unwrap().name = format!("DUPLICATE_{}", name); + }; + } + syn::Item::Type(item_type) => { + let mut deps = BTreeSet::new(); + item_type.ty.collect_deps(&mut deps); + + // eprintln!("type {}: {:?}", item_type.ident, deps); + + let name = item_type.ident.to_string(); + if let Some(duplicate) = self.all_items.insert( + name.clone(), + Item { + name: name.clone(), + item: syn::Item::Type(item_type.clone()), + deps, + needed: false, + // types will never be derive(Encode), just ignore + is_encode: true, + }, + ) { + eprintln!("Duplicate item found! {}", item_type.ident); + self.all_items.get_mut(&name).unwrap().name = format!("DUPLICATE_{}", name); + }; + } + syn::Item::Enum(item_enum) => { + let mut is_encode: bool = false; + for attr in &item_enum.attrs { + if attr.path().is_ident("derive") { + if attr_meta_contains_encode(attr) { + is_encode = true; + } + } else { + // println!("// {}", Fmt(attr)); + } + } + // if !is_encode { + // println!("// !ENCODE"); + // } + // println!("{}", Fmt(&item_enum)) + let mut deps = BTreeSet::new(); + item_enum.collect_deps(&mut deps); + + let name = item_enum.ident.to_string(); + if let Some(duplicate) = self.all_items.insert( + name.clone(), + Item { + name: name.clone(), + item: syn::Item::Enum(item_enum.clone()), + deps, + needed: false, //is_encode, + is_encode, + }, + ) { + eprintln!("Duplicate item found! {}", item_enum.ident); + self.all_items.get_mut(&name).unwrap().name = format!("DUPLICATE_{}", name); + } + } + syn::Item::Mod(item_mod) => { + if let Some(content) = &item_mod.content { + self.collect_items(&content.1); + } + } + + // syn::Item::Const(item_const) => todo!(), + // syn::Item::ExternCrate(item_extern_crate) => todo!(), + // syn::Item::Fn(item_fn) => todo!(), + // syn::Item::ForeignMod(item_foreign_mod) => todo!(), + // syn::Item::Impl(item_impl) => todo!(), + syn::Item::Macro(item_macro) => { + if let Some(ident) = &item_macro.mac.path.get_ident() { + // eprintln!("macro: {}", ident); + if ident.to_string() == "hash_newtype" { + let block = syn::parse2::( + proc_macro2::TokenTree::Group(proc_macro2::Group::new( + proc_macro2::Delimiter::Brace, + item_macro.mac.tokens.clone(), + )) + .into(), + ) + .unwrap(); + for stmt in &block.stmts { + match stmt { + syn::Stmt::Item(item) => { + self.collect_item(item); + } + _ => {} + } + } + // println!("// {}", Fmt(&)); + } + } + } + // syn::Item::Static(item_static) => todo!(), + // syn::Item::Trait(item_trait) => todo!(), + // syn::Item::TraitAlias(item_trait_alias) => todo!(), + // syn::Item::Union(item_union) => todo!(), + // syn::Item::Use(item_use) => todo!(), + // syn::Item::Verbatim(token_stream) => todo!(), + _ => {} + } + } +} + +fn attr_meta_contains_encode(attr: &syn::Attribute) -> bool { + match &attr.meta { + syn::Meta::List(meta_list) => { + for token in meta_list.tokens.clone() { + match token { + proc_macro2::TokenTree::Ident(ident) => { + if ident.to_string() == "Encode" { + return true; + } + } + _ => {} + } + } + } + syn::Meta::Path(path) => todo!(), + syn::Meta::NameValue(meta_name_value) => todo!(), + } + + false +} diff --git a/tools/bincode_generator/src/cycle.rs b/tools/bincode_generator/src/cycle.rs new file mode 100644 index 0000000..2ad09d4 --- /dev/null +++ b/tools/bincode_generator/src/cycle.rs @@ -0,0 +1,51 @@ +use std::collections::{BTreeMap, BTreeSet}; + +use crate::Item; + +pub struct CycleDetector<'a> { + all_items: &'a BTreeMap, + visited_items: BTreeSet, + visiting_items: BTreeSet, + cyclic_items: BTreeSet, +} + +impl CycleDetector<'_> { + pub fn cycle_detect(all_items: &BTreeMap) -> BTreeSet { + let mut detector = CycleDetector { + all_items, + visited_items: BTreeSet::new(), + visiting_items: BTreeSet::new(), + cyclic_items: BTreeSet::new(), + }; + + for (name, item) in all_items { + if item.needed { + detector.visit_item(name); + } + } + + return detector.cyclic_items; + } + + fn visit_item(&mut self, name: &str) { + if self.visited_items.contains(name) { + return; + } + + if self.visiting_items.contains(name) { + // CYCLE DETECTED! + self.cyclic_items.insert(name.to_string()); + self.visited_items.insert(name.to_string()); + return; + } + + if let Some(item) = &self.all_items.get(name) { + self.visiting_items.insert(name.to_string()); + for dep in &item.deps { + self.visit_item(dep); + } + self.visited_items.remove(name); + } + self.visited_items.insert(name.to_string()); + } +} diff --git a/tools/bincode_generator/src/deps.rs b/tools/bincode_generator/src/deps.rs new file mode 100644 index 0000000..a2e6b08 --- /dev/null +++ b/tools/bincode_generator/src/deps.rs @@ -0,0 +1,96 @@ +use std::collections::BTreeSet; + +pub trait CollectDeps { + fn collect_deps(&self, deps: &mut BTreeSet); +} + +impl CollectDeps for syn::ItemStruct { + fn collect_deps(&self, deps: &mut BTreeSet) { + for field in &self.fields { + field.ty.collect_deps(deps); + } + } +} + +impl CollectDeps for syn::ItemEnum { + fn collect_deps(&self, deps: &mut BTreeSet) { + for variant in &self.variants { + for field in &variant.fields { + field.ty.collect_deps(deps); + } + } + } +} + +impl CollectDeps for syn::Type { + fn collect_deps(&self, deps: &mut BTreeSet) { + match self { + syn::Type::Array(type_array) => { + type_array.elem.collect_deps(deps); + } + syn::Type::BareFn(type_bare_fn) => {} + syn::Type::Group(type_group) => todo!(), + syn::Type::ImplTrait(type_impl_trait) => todo!(), + syn::Type::Infer(type_infer) => todo!(), + syn::Type::Macro(type_macro) => todo!(), + syn::Type::Never(type_never) => {} + syn::Type::Paren(type_paren) => todo!(), + syn::Type::Path(type_path) => { + let last_seg = type_path.path.segments.last().unwrap(); + if last_seg.ident == "NotNan" { + // ignore + } else { + deps.insert(last_seg.ident.to_string()); + } + match &last_seg.arguments { + syn::PathArguments::None => {} + syn::PathArguments::AngleBracketed(args) => { + for arg in &args.args { + arg.collect_deps(deps); + } + } + syn::PathArguments::Parenthesized(args) => { + for arg in &args.inputs { + arg.collect_deps(deps); + } + match &args.output { + syn::ReturnType::Default => {} + syn::ReturnType::Type(_, ty) => ty.collect_deps(deps), + } + } + } + } + syn::Type::Ptr(type_ptr) => todo!(), + syn::Type::Reference(type_reference) => { + type_reference.elem.collect_deps(deps); + } + syn::Type::Slice(type_slice) => { + type_slice.elem.collect_deps(deps); + } + syn::Type::TraitObject(type_trait_object) => {} + syn::Type::Tuple(type_tuple) => { + for elem in &type_tuple.elems { + elem.collect_deps(deps); + } + } + syn::Type::Verbatim(token_stream) => todo!(), + _ => {} + } + } +} + +impl CollectDeps for syn::GenericArgument { + fn collect_deps(&self, deps: &mut BTreeSet) { + match self { + syn::GenericArgument::Lifetime(lifetime) => {} + syn::GenericArgument::Type(ty) => { + ty.collect_deps(deps); + } + syn::GenericArgument::Const(expr) => todo!(), + syn::GenericArgument::AssocType(assoc_type) => todo!(), + syn::GenericArgument::AssocConst(assoc_const) => todo!(), + syn::GenericArgument::Constraint(constraint) => todo!(), + _ => todo!(), + } + } +} diff --git a/tools/bincode_generator/src/fmtdoc.rs b/tools/bincode_generator/src/fmtdoc.rs new file mode 100644 index 0000000..7003597 --- /dev/null +++ b/tools/bincode_generator/src/fmtdoc.rs @@ -0,0 +1,15 @@ +pub struct FmtDoc(pub T); + +impl std::fmt::Display for FmtDoc<(&'_ str, &'_ str)> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + if self.0.1.lines().count() == 1 { + return writeln!(f, "{}/** {} */", self.0.0, self.0.1); + } + writeln!(f, "{}/**", self.0.0)?; + for line in self.0.1.lines() { + writeln!(f, "{} * {}", self.0.0, line)?; + } + writeln!(f, "{} */", self.0.0)?; + Ok(()) + } +} diff --git a/tools/bincode_generator/src/fmtjs.rs b/tools/bincode_generator/src/fmtjs.rs new file mode 100644 index 0000000..60ec8f8 --- /dev/null +++ b/tools/bincode_generator/src/fmtjs.rs @@ -0,0 +1,676 @@ +use std::{ + collections::{BTreeMap, BTreeSet}, + fmt::Write, +}; + +use proc_macro2::Span; +use syn::{Ident, parse_quote}; + +use crate::{Item, cycle::CycleDetector, fmtdoc::FmtDoc}; + +pub struct Fmt(pub T); + +pub fn write_js( + mut f: W, + all_items: &mut BTreeMap, +) -> Result<(), std::io::Error> { + writeln!(f, "import {{")?; + writeln!( + f, + " Bool, Bytes, Enum, VariantDiscriminant, FixedBytes, Lazy, Struct, StructTuple," + )?; + writeln!( + f, + " Int128, Int16, Int32, Int64, Int8, Uint128, Uint16, Uint32, Uint64, Uint8, Float64," + )?; + writeln!( + f, + " VarInt, VarUint, Vec, Tuple, Map, Option, String, Nothing, Range, NotSignable," + )?; + writeln!(f, " SocketAddr,")?; + writeln!(f, "}} from \"../src/bincode.ts\"")?; + writeln!( + f, + "import {{ Transaction }} from \"../src/bincode_types.ts\";" + )?; + writeln!(f, "export const Hash = Bytes; //FixedBytes(32)")?; + writeln!(f, "")?; + + // Detect cycles + let cyclic_items = CycleDetector::cycle_detect(&all_items); + for name in &cyclic_items { + eprintln!("CYCLIC: {}", name); + let mut item = all_items.remove(name).unwrap(); + item.needed = true; + let real_name = format!("REAL_{}", name); + all_items.insert(real_name.clone(), item); + + let name_ident = Ident::new(name, Span::call_site()); + let real_name_ident = Ident::new(&real_name, Span::call_site()); + + all_items.insert( + format!("SET_REAL_{}", name), + Item { + name: format!("SET_REAL_{}", name), + item: parse_quote!( + static #name_ident: #real_name_ident = 0; + ), + deps: { + let mut set = BTreeSet::new(); + set.insert(real_name.clone()); + set + }, + needed: true, + is_encode: true, + }, + ); + + writeln!(f, "/** @type {{*}} */")?; + writeln!( + f, + "export let {} = Lazy(\"{}\", () => REAL_{});", + name, name, name + )?; + } + + writeln!(f)?; + + let mut item_printed = BTreeSet::new(); + + let mut need_print = true; + let mut printed_something = true; + while printed_something { + need_print = false; + printed_something = false; + + for (name, item) in &*all_items { + if item_printed.contains(&item.name) { + continue; + } + + if item.needed { + if item.deps.iter().all(|dep| { + if let Some(dep_item) = all_items.get(dep) { + if !item_printed.contains(&dep_item.name) { + return false; + } + } + // items we don't have can be ignored + true + }) { + // writeln!(f, "// deps: {:?}", item.deps); + if !item.is_encode { + writeln!(f, "// !ENCODE")?; + } + writeln!(f, "{}", Fmt((&**name, &item.item)))?; + item_printed.insert(item.name.clone()); + printed_something = true; + } else { + need_print = true; + } + } + } + } + + if need_print { + // Items needed but not printed due to a cycle + writeln!(f, "// CYCLICAL ITEMS")?; + for (name, item) in &*all_items { + if item.needed && !item_printed.contains(&item.name) { + writeln!(f, "// deps: {:?}", item.deps)?; + if !item.is_encode { + writeln!(f, "// !ENCODE")?; + } + writeln!(f, "{}", Fmt((&**name, &item.item)))?; + } + } + } + + for item in all_items.values() { + if !item.needed { + writeln!(f, "// NOT NEEDED: {}", item.name)?; + // println!("{}", item.contents); + } + } + Ok(()) +} + +impl std::fmt::Display for Fmt<(&'_ str, &'_ syn::Item)> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let (name, item) = self.0; + match &item { + syn::Item::Struct(item_struct) => write!(f, "{}", Fmt((name, item_struct))), + syn::Item::Enum(item_enum) => write!(f, "{}", Fmt((name, item_enum))), + syn::Item::Type(item_type) => write!(f, "{}", Fmt((name, item_type))), + + // This one is only used by the Cyclic value resolver + syn::Item::Static(item_static) => write!(f, "{}", Fmt((name, item_static))), + // syn::Item::Verbatim(item_raw) => write!(f, "{}", Fmt((name, item_static))), + i => todo!("TODO: item: {:?}", i), + } + } +} + +impl std::fmt::Display for Fmt<(&'_ str, &'_ syn::ItemStruct)> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let (name, item) = self.0; + + let attrs = parse_attributes(&item.attrs); + if !attrs.doc.is_empty() { + write!(f, "{}", FmtDoc(("", attrs.doc.trim())))?; + } + // if item.fields.len() == 0 { + // return write!(f, "{{}}"); + // } + match &item.fields { + syn::Fields::Named(fields_named) => { + writeln!(f, "export const {} = Struct(\"{}\", {{", name, item.ident,)?; + for field in &fields_named.named { + let attrs = parse_attributes(&field.attrs); + if !attrs.doc.is_empty() { + write!(f, "{}", FmtDoc((" ", attrs.doc.trim())))?; + } + if attrs.not_signable { + writeln!( + f, + " {}: NotSignable({}),", + field.ident.as_ref().unwrap(), + Fmt(&field.ty) + )?; + } else { + writeln!( + f, + " {}: {},", + field.ident.as_ref().unwrap(), + Fmt(&field.ty) + )?; + } + } + writeln!(f, "}});") + } + syn::Fields::Unnamed(fields_unnamed) => { + writeln!(f, "export const {} = StructTuple(\"{}\",", name, item.ident,)?; + for (i, field) in fields_unnamed.unnamed.iter().enumerate() { + let attrs = parse_attributes(&field.attrs); + if !attrs.doc.is_empty() { + write!(f, "{}", FmtDoc((" ", attrs.doc.trim())))?; + } + if attrs.not_signable { + writeln!(f, " NotSignable({}),", Fmt(&field.ty))?; + } else { + writeln!(f, " {},", Fmt(&field.ty))?; + } + } + writeln!(f, ");") + } + syn::Fields::Unit => writeln!( + f, + "export const {} = StructTuple(\"{}\");", + name, item.ident + ), + } + } +} + +impl std::fmt::Display for Fmt<(&'_ str, &'_ syn::ItemEnum)> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let (name, item) = self.0; + + let attrs = parse_attributes(&item.attrs); + if !attrs.doc.is_empty() { + write!(f, "{}", FmtDoc(("", attrs.doc.trim())))?; + } + writeln!( + f, + "export const {} = Enum(\"{}\", /** @type {{const}} */ ({{", + name, item.ident + )?; + for (i, variant) in item.variants.iter().enumerate() { + let attrs = parse_attributes(&variant.attrs); + if !attrs.doc.is_empty() { + write!(f, "{}", FmtDoc((" ", attrs.doc.trim())))?; + } + write!(f, " {}: ", variant.ident)?; + let custom_discriminant = if let Some(disc) = &variant.discriminant { + let num = match &disc.1 { + syn::Expr::Lit(lit) => match &lit.lit { + syn::Lit::Int(lit_int) => lit_int.base10_digits().parse::().unwrap(), + _ => todo!(), + }, + _ => todo!(), + }; + if i as u64 != num { + // write!(f, " // discriminant: {}", Fmt(&disc.1))?; + write!(f, "VariantDiscriminant(")?; + Some(&disc.1) + } else { + None + } + } else { + None + }; + match &variant.fields { + syn::Fields::Named(fields_named) => { + writeln!(f, "{{")?; + for field in &fields_named.named { + let attrs = parse_attributes(&field.attrs); + if !attrs.doc.is_empty() { + write!(f, "{}", FmtDoc((" ", attrs.doc.trim())))?; + } + if attrs.not_signable { + writeln!( + f, + " {}: NotSignable({}),", + field.ident.as_ref().unwrap(), + Fmt(&field.ty) + )?; + } else { + writeln!( + f, + " {}: {},", + field.ident.as_ref().unwrap(), + Fmt(&field.ty) + )?; + } + } + write!(f, " }}")?; + } + syn::Fields::Unnamed(fields_unnamed) => { + write!(f, "[")?; + let mut first = true; + for (i, field) in fields_unnamed.unnamed.iter().enumerate() { + if first { + first = false; + } else { + write!(f, ", ")?; + } + let attrs = parse_attributes(&field.attrs); + if !attrs.doc.is_empty() { + write!(f, "{}", FmtDoc((" ", attrs.doc.trim())))?; + } + if attrs.not_signable { + writeln!(f, "NotSignable({})", Fmt(&field.ty))?; + } else { + write!(f, "{}", Fmt(&field.ty))?; + } + } + write!(f, "]")?; + } + syn::Fields::Unit => write!(f, "[]")?, + } + if let Some(disc) = custom_discriminant { + write!(f, ", {})", Fmt(disc))?; + } + writeln!(f, ",")?; + } + writeln!(f, "}}))")?; + // writeln!( + // f, + // "/** @namespace @typedef {{typeof {}.$$type}} {} */", + // name, name + // )?; + // for variant in &item.variants { + // writeln!( + // f, + // "/** @typedef {{ReturnType}} {}.{} */", + // name, variant.ident, name, variant.ident + // )?; + // } + Ok(()) + } +} + +impl std::fmt::Display for Fmt<(&'_ str, &'_ syn::ItemType)> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let (name, item) = self.0; + + writeln!(f, "export const {} = {}", name, Fmt(&*item.ty)) + } +} + +impl std::fmt::Display for Fmt<(&'_ str, &'_ syn::ItemStatic)> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let (_name, item) = self.0; + + writeln!(f, "{} = {};", item.ident, Fmt(&*item.ty)) + } +} + +impl<'a> std::fmt::Display for Fmt<&'a syn::Type> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self.0 { + syn::Type::Array(type_array) => { + match &*type_array.elem { + syn::Type::Path(type_path) => { + if type_path.path.is_ident("u8") { + return write!(f, "FixedBytes({})", Fmt(&type_array.len)); + } + } + _ => {} + } + write!(f, "[{}; {}]", Fmt(&*type_array.elem), Fmt(&type_array.len)) + } + syn::Type::BareFn(type_bare_fn) => { + write!(f, "we_dont_care_about fn () -> ()...") + } + syn::Type::Group(type_group) => todo!(), + syn::Type::ImplTrait(type_impl_trait) => todo!(), + syn::Type::Infer(type_infer) => todo!(), + syn::Type::Macro(type_macro) => todo!(), + syn::Type::Never(type_never) => todo!(), + syn::Type::Paren(type_paren) => todo!(), + syn::Type::Path(type_path) => { + let last_seg = type_path.path.segments.last().unwrap(); + if last_seg.ident == "NotNan" { + // TODO: Stop assuming the inner type is Float64 and not Float32! + match &last_seg.arguments { + syn::PathArguments::AngleBracketed(args) => { + for arg in &args.args { + return write!(f, "{}", Fmt(arg)); + } + todo!() + } + _ => todo!(), + } + } else { + write!(f, "{}", Fmt(type_path)) + } + } + syn::Type::Ptr(type_ptr) => todo!(), + syn::Type::Reference(type_reference) => write!(f, "&{}", Fmt(&*type_reference.elem)), + syn::Type::Slice(type_slice) => write!(f, "[{}]", Fmt(&*type_slice.elem)), + syn::Type::TraitObject(type_trait_object) => { + write!(f, "dyn ")?; + for bound in &type_trait_object.bounds { + write!(f, " + {}", Fmt(bound))?; + } + Ok(()) + } + syn::Type::Tuple(type_tuple) => { + write!(f, "Tuple(")?; + for (i, elem) in type_tuple.elems.iter().enumerate() { + if i > 0 { + write!(f, ", ")?; + } + write!(f, "{}", Fmt(elem))?; + } + write!(f, ")") + } + syn::Type::Verbatim(token_stream) => todo!(), + _ => todo!(), + } + } +} + +impl<'a> std::fmt::Display for Fmt<&'a syn::Expr> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self.0 { + syn::Expr::Array(expr_array) => todo!(), + syn::Expr::Assign(expr_assign) => todo!(), + syn::Expr::Async(expr_async) => todo!(), + syn::Expr::Await(expr_await) => todo!(), + syn::Expr::Binary(expr_binary) => todo!(), + syn::Expr::Block(expr_block) => todo!(), + syn::Expr::Break(expr_break) => todo!(), + syn::Expr::Call(expr_call) => todo!(), + syn::Expr::Cast(expr_cast) => todo!(), + syn::Expr::Closure(expr_closure) => todo!(), + syn::Expr::Const(expr_const) => write!( + f, + "const {{ {:?} }}", + expr_const.const_token.span.source_text().unwrap() + ), + syn::Expr::Continue(expr_continue) => todo!(), + syn::Expr::Field(expr_field) => todo!(), + syn::Expr::ForLoop(expr_for_loop) => todo!(), + syn::Expr::Group(expr_group) => todo!(), + syn::Expr::If(expr_if) => todo!(), + syn::Expr::Index(expr_index) => todo!(), + syn::Expr::Infer(expr_infer) => todo!(), + syn::Expr::Let(expr_let) => todo!(), + syn::Expr::Lit(expr_lit) => { + write!(f, "{}", Fmt(&expr_lit.lit)) + } + syn::Expr::Loop(expr_loop) => todo!(), + syn::Expr::Macro(expr_macro) => todo!(), + syn::Expr::Match(expr_match) => todo!(), + syn::Expr::MethodCall(expr_method_call) => todo!(), + syn::Expr::Paren(expr_paren) => todo!(), + syn::Expr::Path(expr_path) => write!(f, "{}", Fmt(&expr_path.path)), + syn::Expr::Range(expr_range) => todo!(), + syn::Expr::RawAddr(expr_raw_addr) => todo!(), + syn::Expr::Reference(expr_reference) => todo!(), + syn::Expr::Repeat(expr_repeat) => todo!(), + syn::Expr::Return(expr_return) => todo!(), + syn::Expr::Struct(expr_struct) => todo!(), + syn::Expr::Try(expr_try) => todo!(), + syn::Expr::TryBlock(expr_try_block) => todo!(), + syn::Expr::Tuple(expr_tuple) => todo!(), + syn::Expr::Unary(expr_unary) => todo!(), + syn::Expr::Unsafe(expr_unsafe) => todo!(), + syn::Expr::Verbatim(token_stream) => todo!(), + syn::Expr::While(expr_while) => todo!(), + syn::Expr::Yield(expr_yield) => todo!(), + _ => todo!(), + } + } +} + +impl<'a> std::fmt::Display for Fmt<&'a syn::TypePath> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + if self.0.qself.is_some() { + todo!() + } + write!(f, "{}", Fmt(&self.0.path)) + } +} + +impl<'a> std::fmt::Display for Fmt<&'a syn::Path> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let last_seg = self.0.segments.last().unwrap(); + write!(f, "{}", Fmt(last_seg))?; + // if self.0.segments.len() != 1 { + // write!(f, " /* ")?; + // for (i, seg) in self.0.segments.iter().enumerate() { + // if i > 0 { + // write!(f, ".")?; + // } + // write!(f, "{}", Fmt(seg))?; + // } + // write!(f, " */")?; + // } + + Ok(()) + } +} + +fn one_argument(args: &syn::PathArguments) -> Option { + match args { + syn::PathArguments::None => None, + syn::PathArguments::AngleBracketed(args) => { + if args.args.len() == 1 { + let arg = args.args.first().unwrap(); + match arg { + syn::GenericArgument::Type(syn::Type::Path(type_path)) => { + type_path.path.get_ident().map(|i| i.to_string()) + } + _ => None, + } + } else { + None + } + } + syn::PathArguments::Parenthesized(args) => todo!(), + } +} + +impl<'a> std::fmt::Display for Fmt<&'a syn::PathSegment> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + // TODO: Replace Rust types with JS types + match self.0.ident.to_string().as_str() { + "bool" => write!(f, "Bool"), + "i8" => write!(f, "Int8"), + "i16" => write!(f, "VarInt"), + "i32" => write!(f, "VarInt"), + "i64" => write!(f, "VarInt"), + "i128" => write!(f, "VarInt"), + "u8" => write!(f, "Uint8"), + "u16" => write!(f, "VarUint"), + "u32" => write!(f, "VarUint"), + "u64" => write!(f, "VarUint"), + "u128" => write!(f, "VarUint"), + "usize" => write!(f, "VarUint"), + "f32" => write!(f, "Float32"), + "f64" => write!(f, "Float64"), + "BTreeMap" => write!(f, "Map"), + "IntMap" => write!(f, "Map"), + // Ugly way of checking for Vec + "Vec" + if one_argument(&self.0.arguments) + .map(|arg| arg == "u8") + .unwrap_or(false) => + { + return write!(f, "Bytes"); + } + other => write!(f, "{}", other), + }?; + + match &self.0.arguments { + syn::PathArguments::None => {} + syn::PathArguments::AngleBracketed(args) => { + // Remember, this isn't being printed as Rust, it's being printed as JS + write!(f, "(")?; + for (i, arg) in args.args.iter().enumerate() { + if i > 0 { + write!(f, ", ")?; + } + write!(f, "{}", Fmt(arg))?; + } + write!(f, ")")?; + } + syn::PathArguments::Parenthesized(args) => { + write!(f, "(")?; + for (i, arg) in args.inputs.iter().enumerate() { + if i > 0 { + write!(f, ", ")?; + } + write!(f, "{}", Fmt(arg))?; + } + write!(f, ")")?; + } + } + Ok(()) + } +} + +impl<'a> std::fmt::Display for Fmt<&'a syn::GenericArgument> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self.0 { + syn::GenericArgument::Lifetime(lifetime) => write!(f, "'{}", lifetime.ident), + syn::GenericArgument::Type(ty) => write!(f, "{}", Fmt(ty)), + syn::GenericArgument::Const(expr) => todo!(), + syn::GenericArgument::AssocType(assoc_type) => todo!(), + syn::GenericArgument::AssocConst(assoc_const) => todo!(), + syn::GenericArgument::Constraint(constraint) => todo!(), + _ => todo!(), + } + } +} + +impl<'a> std::fmt::Display for Fmt<&'a syn::TypeParamBound> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self.0 { + syn::TypeParamBound::Trait(trait_bound) => { + write!(f, "{}", Fmt(&trait_bound.path)) + } + syn::TypeParamBound::Lifetime(lifetime) => todo!(), + syn::TypeParamBound::PreciseCapture(precise_capture) => todo!(), + syn::TypeParamBound::Verbatim(token_stream) => todo!(), + _ => todo!(), + } + } +} + +impl<'a> std::fmt::Display for Fmt<&'a syn::Lit> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self.0 { + syn::Lit::Str(lit_str) => write!(f, "{}", lit_str.value()), + syn::Lit::ByteStr(lit_byte_str) => write!(f, "{:?}", lit_byte_str.value()), + syn::Lit::CStr(lit_cstr) => write!(f, "{:?}", lit_cstr.value()), + syn::Lit::Byte(lit_byte) => write!(f, "{}", lit_byte.value()), + syn::Lit::Char(lit_char) => write!(f, "{}", lit_char.value()), + syn::Lit::Int(lit_int) => write!(f, "{}", lit_int.base10_digits()), + syn::Lit::Float(lit_float) => write!(f, "{}", lit_float.base10_digits()), + syn::Lit::Bool(lit_bool) => write!(f, "{}", lit_bool.value()), + syn::Lit::Verbatim(literal) => write!(f, "{}", literal.span().source_text().unwrap()), + _ => todo!(), + } + } +} + +struct Attributes { + doc: String, + not_signable: bool, +} + +fn parse_attributes(attrs: &[syn::Attribute]) -> Attributes { + let mut doc = String::new(); + let mut not_signable = false; + + for attr in attrs { + if attr.path().is_ident("error") { + } else if attr.path().is_ident("derive") { + } else if attr.path().is_ident("cfg_attr") { + } else if attr.path().is_ident("cfg") { + } else if attr.path().is_ident("serde") { + } else if attr.path().is_ident("display") { + } else if attr.path().is_ident("bincode") { + // } else if attr.path().is_ident("platform_serialize") { + } else if attr.path().is_ident("platform_signable") { + match &attr.meta { + syn::Meta::Path(path) => todo!(), + syn::Meta::List(meta_list) => { + if let Ok(metas) = meta_list.parse_args_with( + syn::punctuated::Punctuated::::parse_terminated, + ) { + for meta in metas { + // eprintln!("inner meta: '{}'", Fmt(meta.path())); + if meta.path().is_ident("exclude_from_sig_hash") { + not_signable = true; + } + } + } + } + syn::Meta::NameValue(meta_name_value) => todo!(), + } + } else if attr.path().is_ident("doc") { + writeln!( + &mut doc, + "{}", + Fmt(&attr.meta.require_name_value().unwrap().value) + ) + .unwrap(); + } else { + writeln!(&mut doc, "{}", Fmt(attr)).unwrap(); + } + } + + Attributes { doc, not_signable } +} + +impl<'a> std::fmt::Display for Fmt<&'a syn::Attribute> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match &self.0.meta { + syn::Meta::Path(path) => write!(f, "{}", Fmt(path)), + syn::Meta::List(meta_list) => { + write!(f, "{} {}", Fmt(&meta_list.path), meta_list.tokens) + } + syn::Meta::NameValue(meta_name_value) => write!( + f, + "{} = {}", + Fmt(&meta_name_value.path), + Fmt(&meta_name_value.value) + ), + } + } +} diff --git a/tools/bincode_generator/src/fmtts.rs b/tools/bincode_generator/src/fmtts.rs new file mode 100644 index 0000000..9b23e54 --- /dev/null +++ b/tools/bincode_generator/src/fmtts.rs @@ -0,0 +1,500 @@ +use std::collections::BTreeMap; + +use crate::{Item, fmtdoc::FmtDoc, fmtjs::Fmt}; + +pub struct FmtTs(pub T); + +pub fn write_dts( + mut f: W, + all_items: &mut BTreeMap, +) -> Result<(), std::io::Error> { + writeln!( + f, + "import {{ BinCode, BinCodeable, VARIANTS }} from \"../src/bincode.ts\";" + )?; + writeln!( + f, + "import {{ Option, FixedBytes, Hash, SocketAddr, Transaction }} from \"../src/bincode_types.ts\";" + )?; + writeln!(f, "declare module \"./generated_bincode.js\" {{")?; + writeln!(f)?; + for (name, item) in all_items { + if !item.needed { + continue; + } + + writeln!(f, "{}", FmtTs((&**name, &item.item)))?; + } + writeln!(f)?; + writeln!(f, "}}")?; + Ok(()) +} + +impl std::fmt::Display for FmtTs<&'_ Vec> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + // let mut doc_started = false; + for attr in self.0 { + if attr.path().is_ident("error") { + } else if attr.path().is_ident("derive") { + } else if attr.path().is_ident("cfg_attr") { + } else if attr.path().is_ident("cfg") { + } else if attr.path().is_ident("serde") { + } else if attr.path().is_ident("display") { + } else if attr.path().is_ident("bincode") { + } else if attr.path().is_ident("platform_serialize") { + } else if attr.path().is_ident("doc") { + // if !doc_started { + // writeln!(f, "{}/**", self.0.0)?; + // doc_started = true; + // } + // writeln!( + // f, + // "{} *{}", + // self.0.0, + // Fmt(&attr.meta.require_name_value().unwrap().value) + // )?; + writeln!(f, "{}", Fmt(&attr.meta.require_name_value().unwrap().value))?; + } else { + // writeln!(f, "{}// {}", self.0.0, Fmt(attr))?; + writeln!(f, "{}", Fmt(attr))?; + } + } + // if doc_started { + // writeln!(f, "{} */", self.0.0)?; + // } + Ok(()) + } +} + +impl std::fmt::Display for FmtTs<(&'_ str, &'_ syn::Item)> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let (name, item) = self.0; + match &item { + syn::Item::Struct(item_struct) => write!(f, "{}", FmtTs((name, item_struct))), + syn::Item::Enum(item_enum) => write!(f, "{}", FmtTs((name, item_enum))), + syn::Item::Type(item_type) => write!(f, "{}", FmtTs((name, item_type))), + + // only for cyclics, not used here + syn::Item::Static(_item_static) => Ok(()), + i => todo!("item: {:?}", i), + } + } +} + +impl std::fmt::Display for FmtTs<(&'_ str, &'_ syn::ItemStruct)> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let (name, item) = self.0; + + let doc = format!("{}", FmtTs(&item.attrs)); + if !doc.trim().is_empty() { + write!(f, "{}", FmtDoc(("", doc.trim())))?; + } + // if item.fields.len() == 0 { + // return write!(f, "{{}}"); + // } + match &item.fields { + syn::Fields::Named(fields_named) => { + writeln!(f, "interface {} {{", item.ident)?; + for field in &fields_named.named { + let doc = format!("{}", FmtTs(&field.attrs)); + if !doc.is_empty() { + write!(f, "{}", FmtDoc((" ", doc.trim())))?; + } + writeln!(f, " {};", FmtTs((field.ident.as_ref().unwrap(), field)))?; + } + writeln!(f, "}}")?; + writeln!(f, "/** @ignore */")?; + writeln!( + f, + "const {} : BinCodeable<{}> & ((data: {{", + item.ident, item.ident, + )?; + { + for field in &fields_named.named { + let doc = format!("{}", FmtTs(&field.attrs)); + if !doc.is_empty() { + write!(f, "{}", FmtDoc((" ", doc.trim())))?; + } + writeln!(f, " {},", FmtTs((field.ident.as_ref().unwrap(), field)))?; + } + } + writeln!(f, "}}) => {});", item.ident)?; + } + syn::Fields::Unnamed(fields_unnamed) => { + writeln!(f, "interface {} {{", item.ident,)?; + for (i, field) in fields_unnamed.unnamed.iter().enumerate() { + let doc = format!("{}", FmtTs(&field.attrs)); + if !doc.is_empty() { + write!(f, "{}", FmtDoc((" ", doc.trim())))?; + } + writeln!(f, " [{}]: {};", i, FmtTs(&field.ty))?; + } + writeln!(f, "}}")?; + writeln!(f, "/** @ignore */")?; + writeln!(f, "const {} : BinCodeable<{}> & ((", item.ident, item.ident,)?; + { + for (i, field) in fields_unnamed.unnamed.iter().enumerate() { + let doc = format!("{}", FmtTs(&field.attrs)); + if !doc.is_empty() { + write!(f, "{}", FmtDoc(("", doc.trim())))?; + } + writeln!(f, " f{}: {},", i, FmtTs(&field.ty))?; + } + } + writeln!(f, ") => {});", item.ident)?; + } + syn::Fields::Unit => { + // writeln!(f, "class {} {{", item.ident)?; + // writeln!(f, "}}")?; + } + } + Ok(()) + } +} + +impl std::fmt::Display for FmtTs<(&'_ str, &'_ syn::ItemEnum)> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let (name, item) = self.0; + + let doc = format!("{}", FmtTs(&item.attrs)); + if !doc.is_empty() { + write!(f, "{}", FmtDoc(("", doc.trim())))?; + } + writeln!(f, "/** @ignore */")?; + writeln!(f, "export abstract class {} {{", item.ident)?; + writeln!(f, " /** @ignore @internal */")?; + writeln!(f, " constructor();")?; + writeln!(f, " #private;")?; + writeln!(f, " /** @ignore */")?; + writeln!(f, " static name: string;")?; + writeln!(f, " /** @ignore */")?; + writeln!(f, " static isValid(v: unknown): boolean;")?; + writeln!(f, " /** @ignore */")?; + writeln!(f, " static encode(bc: BinCode, v: {}): void;", item.ident)?; + writeln!(f, " /** @ignore */")?; + writeln!(f, " static decode(bc: BinCode): {};", item.ident)?; + writeln!(f, " /** @ignore @internal */")?; + writeln!(f, " [VARIANTS]: typeof {}.variants;", item.ident)?; + writeln!(f, " /** @ignore */")?; + writeln!(f, " static variants: {{")?; + for (i, variant) in item.variants.iter().enumerate() { + writeln!( + f, + " {}: typeof {}.{},", + variant.ident, item.ident, variant.ident + )?; + } + writeln!(f, " }};")?; + + writeln!(f, "}}")?; + writeln!(f, "namespace {} {{", item.ident)?; + for (i, variant) in item.variants.iter().enumerate() { + if variant.fields.len() > 0 { + let doc = format!("{}\n@function", FmtTs(&variant.attrs)); + if !doc.trim().is_empty() { + write!(f, "{}", FmtDoc((" ", doc.trim())))?; + } + match &variant.fields { + syn::Fields::Named(fields_named) => { + writeln!(f, " interface {} extends {} {{", variant.ident, item.ident)?; + for field in &fields_named.named { + let doc = format!("{}", FmtTs(&field.attrs)); + if !doc.is_empty() { + write!(f, "{}", FmtDoc((" ", doc.trim())))?; + } + writeln!(f, " {};", FmtTs((field.ident.as_ref().unwrap(), field)))?; + } + writeln!(f, " }}")?; + + writeln!(f, " const {}: (data: {{", variant.ident,)?; + for field in &fields_named.named { + let doc = format!("{}", FmtTs(&field.attrs)); + if !doc.is_empty() { + write!(f, "{}", FmtDoc((" ", doc.trim())))?; + } + writeln!(f, " {},", FmtTs((&field.ident.as_ref().unwrap(), field)))?; + } + writeln!(f, " }}) => {}.{};", item.ident, variant.ident)?; + } + syn::Fields::Unnamed(fields_unnamed) => { + writeln!(f, " interface {} extends {} {{", variant.ident, item.ident)?; + for (i, field) in fields_unnamed.unnamed.iter().enumerate() { + let doc = format!("{}", FmtTs(&field.attrs)); + if !doc.is_empty() { + write!(f, "{}", FmtDoc((" ", doc.trim())))?; + } + writeln!(f, " [{}]: {};", i, FmtTs(&field.ty))?; + } + writeln!(f, " }}")?; + writeln!(f, " /** @ignore */")?; + write!(f, " const {}: (", variant.ident,)?; + let mut first = true; + for (i, field) in fields_unnamed.unnamed.iter().enumerate() { + if first { + first = false; + } else { + write!(f, ", ")?; + } + let doc = format!("{}", FmtTs(&field.attrs)); + if !doc.is_empty() { + write!(f, "{}", FmtDoc((" ", doc.trim())))?; + } + write!(f, "f{}: {}", i, FmtTs(&field.ty))?; + } + writeln!(f, ") => {}.{};", item.ident, variant.ident)?; + } + syn::Fields::Unit => { + writeln!(f, " interface {} extends {} {{", variant.ident, item.ident)?; + writeln!(f, " }}")?; + writeln!(f, " /** @ignore */")?; + writeln!( + f, + " const {}: () => {}.{};", + variant.ident, item.ident, variant.ident + )?; + } + } + } else { + let doc = format!("{}", FmtTs(&variant.attrs)); + if !doc.trim().is_empty() { + write!(f, "{}", FmtDoc((" ", doc.trim())))?; + } + writeln!(f, " const {}: () => {};", variant.ident, item.ident)?; + } + } + writeln!(f, "}}")?; + Ok(()) + } +} + +impl std::fmt::Display for FmtTs<(&'_ str, &'_ syn::ItemType)> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let (name, item) = self.0; + + writeln!(f, "export type {} = {};", name, FmtTs(&*item.ty)) + } +} + +impl<'a> std::fmt::Display for FmtTs<&'a syn::Type> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let ty = self.0; + + match ty { + syn::Type::Array(type_array) => { + match &*type_array.elem { + syn::Type::Path(type_path) => { + if type_path.path.is_ident("u8") { + return write!(f, "FixedBytes<{}>", Fmt(&type_array.len)); + } + } + _ => {} + } + write!(f, "[{}; {}]", Fmt(&*type_array.elem), Fmt(&type_array.len)) + } + syn::Type::BareFn(type_bare_fn) => { + write!(f, "we_dont_care_about fn () -> ()...") + } + syn::Type::Group(type_group) => todo!(), + syn::Type::ImplTrait(type_impl_trait) => todo!(), + syn::Type::Infer(type_infer) => todo!(), + syn::Type::Macro(type_macro) => todo!(), + syn::Type::Never(type_never) => todo!(), + syn::Type::Paren(type_paren) => todo!(), + syn::Type::Path(type_path) => { + let last_seg = type_path.path.segments.last().unwrap(); + if last_seg.ident == "NotNan" { + // TODO: Stop assuming the inner type is Float64 and not Float32! + match &last_seg.arguments { + syn::PathArguments::AngleBracketed(args) => { + for arg in &args.args { + return write!(f, "{}", FmtTs(arg)); + } + todo!() + } + _ => todo!(), + } + } else { + write!(f, "{}", FmtTs(type_path)) + } + } + syn::Type::Ptr(type_ptr) => todo!(), + syn::Type::Reference(type_reference) => { + write!(f, "&{}", FmtTs(&*type_reference.elem)) + } + syn::Type::Slice(type_slice) => write!(f, "[{}]", FmtTs(&*type_slice.elem)), + syn::Type::TraitObject(type_trait_object) => { + write!(f, "dyn ")?; + for bound in &type_trait_object.bounds { + write!(f, " + {}", Fmt(bound))?; + } + Ok(()) + } + syn::Type::Tuple(type_tuple) => { + write!(f, "[")?; + for (i, elem) in type_tuple.elems.iter().enumerate() { + if i > 0 { + write!(f, ", ")?; + } + write!(f, "{}", FmtTs(elem))?; + } + write!(f, "]") + } + syn::Type::Verbatim(token_stream) => todo!(), + _ => todo!(), + } + } +} + +impl<'a> std::fmt::Display for FmtTs<&'a syn::TypePath> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + if self.0.qself.is_some() { + todo!() + } + write!(f, "{}", FmtTs(&self.0.path)) + } +} + +impl<'a> std::fmt::Display for FmtTs<&'a syn::Path> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let last_seg = self.0.segments.last().unwrap(); + write!(f, "{}", FmtTs(last_seg))?; + Ok(()) + } +} + +fn one_argument(args: &syn::PathArguments) -> Option<&syn::GenericArgument> { + match args { + syn::PathArguments::None => None, + syn::PathArguments::AngleBracketed(args) => args.args.first(), + syn::PathArguments::Parenthesized(args) => todo!(), + } +} + +impl<'a, Ident: std::fmt::Display> std::fmt::Display for FmtTs<(Ident, &'a syn::Field)> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + if let Some(inner) = is_option(&self.0.1.ty) { + write!(f, "{}?: {}", self.0.0, FmtTs(inner)) + } else { + write!(f, "{}: {}", self.0.0, FmtTs(&self.0.1.ty)) + } + } +} +fn is_option(ty: &syn::Type) -> Option<&syn::Type> { + match ty { + syn::Type::Path(type_path) => { + let last = type_path.path.segments.last().unwrap(); + if last.ident.to_string() == "Option" { + let arg = one_argument(&last.arguments).unwrap(); + match arg { + syn::GenericArgument::Lifetime(lifetime) => todo!(), + syn::GenericArgument::Type(ty) => Some(ty), + syn::GenericArgument::Const(expr) => todo!(), + syn::GenericArgument::AssocType(assoc_type) => todo!(), + syn::GenericArgument::AssocConst(assoc_const) => todo!(), + syn::GenericArgument::Constraint(constraint) => todo!(), + _ => todo!(), + } + } else { + None + } + } + syn::Type::Array(type_array) => None, + syn::Type::BareFn(type_bare_fn) => todo!(), + syn::Type::Group(type_group) => todo!(), + syn::Type::ImplTrait(type_impl_trait) => todo!(), + syn::Type::Infer(type_infer) => todo!(), + syn::Type::Macro(type_macro) => todo!(), + syn::Type::Never(type_never) => todo!(), + syn::Type::Paren(type_paren) => todo!(), + syn::Type::Ptr(type_ptr) => todo!(), + syn::Type::Reference(type_reference) => todo!(), + syn::Type::Slice(type_slice) => todo!(), + syn::Type::TraitObject(type_trait_object) => todo!(), + syn::Type::Tuple(type_tuple) => todo!(), + syn::Type::Verbatim(token_stream) => todo!(), + _ => todo!(), + } +} + +impl<'a> std::fmt::Display for FmtTs<&'a syn::PathSegment> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + // TODO: Replace Rust types with JS types + match self.0.ident.to_string().as_str() { + "bool" => write!(f, "boolean"), + "i8" => write!(f, "number"), + "i16" => write!(f, "number"), + "i32" => write!(f, "number"), + "i64" => write!(f, "bigint"), + "i128" => write!(f, "bigint"), + "u8" => write!(f, "number"), + "u16" => write!(f, "number"), + "u32" => write!(f, "number"), + "u64" => write!(f, "bigint"), + "u128" => write!(f, "bigint"), + "usize" => write!(f, "number"), + "f32" => write!(f, "number"), + "f64" => write!(f, "number"), + "String" => write!(f, "string"), + "BTreeMap" => write!(f, "Map"), + "IntMap" => write!(f, "Map"), + // Ugly way of checking for Vec + "Vec" + if one_argument(&self.0.arguments) + .map(|arg| match arg { + syn::GenericArgument::Type(syn::Type::Path(path)) => { + path.path.is_ident("u8") + } + _ => false, + }) + .unwrap_or(false) => + { + return write!(f, "Uint8Array"); + } + "Vec" if matches!(one_argument(&self.0.arguments), Some(_)) => { + return write!(f, "{}[]", FmtTs(one_argument(&self.0.arguments).unwrap())); + } + + other => write!(f, "{}", other), + }?; + + match &self.0.arguments { + syn::PathArguments::None => {} + syn::PathArguments::AngleBracketed(args) => { + // Remember, this isn't being printed as Rust, it's being printed as JS + write!(f, "<")?; + for (i, arg) in args.args.iter().enumerate() { + if i > 0 { + write!(f, ", ")?; + } + write!(f, "{}", FmtTs(arg))?; + } + write!(f, ">")?; + } + syn::PathArguments::Parenthesized(args) => { + write!(f, "(")?; + for (i, arg) in args.inputs.iter().enumerate() { + if i > 0 { + write!(f, ", ")?; + } + write!(f, "{}", Fmt(arg))?; + } + write!(f, ")")?; + } + } + Ok(()) + } +} + +impl<'a> std::fmt::Display for FmtTs<&'a syn::GenericArgument> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self.0 { + syn::GenericArgument::Lifetime(lifetime) => write!(f, "'{}", lifetime.ident), + syn::GenericArgument::Type(ty) => write!(f, "{}", FmtTs(ty)), + syn::GenericArgument::Const(expr) => todo!(), + syn::GenericArgument::AssocType(assoc_type) => todo!(), + syn::GenericArgument::AssocConst(assoc_const) => todo!(), + syn::GenericArgument::Constraint(constraint) => todo!(), + _ => todo!(), + } + } +} diff --git a/tools/bincode_generator/src/main.rs b/tools/bincode_generator/src/main.rs new file mode 100644 index 0000000..43bef30 --- /dev/null +++ b/tools/bincode_generator/src/main.rs @@ -0,0 +1,195 @@ +use std::collections::{BTreeMap, BTreeSet}; +use std::error::Error; +use std::fs::{self, File}; +use std::mem::swap; + +use collect::ItemCollector; +use fmtjs::write_js; +use fmtts::write_dts; +use fs_walk::WalkOptions; +use serde::Deserialize; +use syn::parse_quote; + +mod collect; +mod cycle; +mod deps; +mod fmtdoc; +mod fmtjs; +mod fmtts; + +#[derive(Deserialize)] +pub struct JsonPackageVersion { + version: String, +} + +const PLATFORM_PACKAGE_JSON: &'static str = "../../../platform/package.json"; + +fn main() -> Result<(), Box> { + let mut collector = ItemCollector { + all_items: BTreeMap::new(), + }; + + let JsonPackageVersion { mut version } = serde_json::from_reader( + File::open(PLATFORM_PACKAGE_JSON).expect(&format!("Cannot find {}", PLATFORM_PACKAGE_JSON)), + ) + .expect(&format!("Could not read {}", PLATFORM_PACKAGE_JSON)); + + // if the version is something like 2.0.0-dev.1, cut off everything before the - + if let Some(index) = version.find("-") { + version.truncate(index); + } + + // TODO: Bincode's derive implementation and the serde-compat bincode library + // end up working differently for [u8; 32], where bincode writes the bytes + // directly with no length prefix, serde writes it as &[u8] which has a length + // prefix. + + for pkg in &[ + // "../../../platform/packages/rs-sdk/src", + "../../../rust-dashcore/dash/src", + "../../../platform/packages/rs-platform-value/src", + "../../../platform/packages/rs-dpp/src", + ] { + let options = WalkOptions::new().files().extension("rs"); + for entry in options.walk(pkg) { + if let Ok(filepath) = entry { + // eprintln!("// FILE {:?}", &filepath); + let content = fs::read_to_string(filepath)?; + let ast = syn::parse_file(&content)?; + + // println!("{} items", ast.items.len()); + + collector.collect_items(&ast.items); + } + } + } + + let mut all_items = collector.all_items; + + all_items.get_mut("StateTransition").unwrap().needed = true; + all_items.get_mut("TransactionType").unwrap().needed = true; + all_items.get_mut("TransactionPayload").unwrap().needed = true; + all_items.get_mut("IdentityPublicKey").unwrap().needed = true; + + // Transaction is replaced by a custom implementation in bincode_support.ts + // provided by DashTx.js + all_items.remove("Transaction"); + + // Serialize implemented by converting to/from RawInstantLockProof first + // We just replace it here. + all_items.insert( + "InstantAssetLockProof".to_string(), + Item { + name: "InstantAssetLockProof".to_string(), + item: parse_quote!( + type InstantAssetLockProof = RawInstantLockProof; + ), + deps: { + let mut set = BTreeSet::new(); + set.insert("RawInstantLockProof".to_string()); + set + }, + needed: false, + is_encode: true, + }, + ); + all_items.get_mut("RawInstantLockProof").unwrap().needed = true; + + // DashcoreScript is renamed in the use declaration + // TODO: handle the use declaration renaming + all_items.insert( + "DashcoreScript".to_string(), + Item { + name: "DashcoreScript".to_string(), + item: parse_quote!( + type DashcoreScript = ScriptBuf; + ), + deps: { + let mut deps = BTreeSet::new(); + deps.insert("ScriptBuf".to_string()); + deps + }, + needed: true, + is_encode: true, + }, + ); + + // IdentityV0 is written with a BTreeMap but then serialization is overridden + // to encode it as a Vec instead. + all_items.get_mut("Identity").unwrap().needed = true; + // all_items.insert( + // "IdentityV0".to_string(), + // Item { + // name: "IdentityV0".to_string(), + // item: parse_quote!( + // pub struct IdentityV0 { + // pub id: Identifier, + // pub public_keys: Vec, + // pub balance: u64, + // pub revision: Revision, + // } + // ), + // deps: { + // let mut set = BTreeSet::new(); + // set.insert("Identifier".to_string()); + // set.insert("IdentityPublicKey".to_string()); + // set.insert("Revision".to_string()); + // set + // }, + // needed: true, + // is_encode: true, + // }, + // ); + + let mut needed = BTreeSet::new(); + for item in all_items.values() { + if item.needed { + needed.extend(item.deps.iter().cloned()); + } + } + + // mark all items that are needed repeating until no new items are needed + let mut newly_needed = BTreeSet::new(); + while !needed.is_empty() { + // TODO: might be faster to iter then clear after rather than pop_first + while let Some(name) = needed.pop_first() { + if let Some(item) = all_items.get_mut(&name) { + if !item.needed { + item.needed = true; + newly_needed.extend(item.deps.iter().cloned()); + } + } + } + swap(&mut needed, &mut newly_needed); + } + + // println!("GCP: {:?}", all_items.get("GroupContractPosition")); + + let version_dir = format!("../../{}", version); + std::fs::create_dir_all(&version_dir).unwrap(); + + let js_filepath = format!("../../{}/generated_bincode.js", version); + { + let mut js_file = File::create(&js_filepath).unwrap(); + write_js(&mut js_file, &mut all_items).unwrap(); + } + println!("Wrote file {}", js_filepath); + + let dts_filepath = format!("../../{}/generated_bincode.d.ts", version); + { + let mut dts_file = File::create(&dts_filepath).unwrap(); + write_dts(&mut dts_file, &mut all_items).unwrap(); + } + println!("Wrote file {}", dts_filepath); + + Ok(()) +} + +#[derive(Clone)] +pub struct Item { + name: String, + item: syn::Item, + deps: BTreeSet, + needed: bool, + is_encode: bool, +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..4c59256 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,35 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "module": "Node18", /* Specify what module code is generated. */ + // "moduleResolution": "bundler", + // "allowImportingTsExtensions": true, + "rewriteRelativeImportExtensions": true, + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "outDir": "built", /* Specify an output folder for all emitted files. */ + // "declaration": true, + // "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + "strict": true, /* Enable all strict type-checking options. */ + "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + "skipLibCheck": false, /* Skip type checking all .d.ts files. */ + "typeRoots": [ + "types" + ] + }, + "include": [ + "types", + "*.js", + "*.ts", + "src", + "1.8.1/*.js", + "2.0.0/*.js" + ], + "exclude": [ + "node_modules", + "vite.config.js" + ] +} \ No newline at end of file diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/typedoc.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/types/base-x.types.d.ts b/types/base-x.types.d.ts new file mode 100644 index 0000000..cbab857 --- /dev/null +++ b/types/base-x.types.d.ts @@ -0,0 +1,12 @@ +export const _types: true; +export type BaseX = { + create: Create; +}; +export type Create = (ALPHABET: string) => baseX; +export type baseX = { + decode: Decode; + encode: Encode; +}; +export type Decode = (basex: string) => Uint8Array; +export type DecodeUnsafe = (basex: string) => Uint8Array | null; +export type Encode = (buf: Uint8Array) => string; diff --git a/types/base58check.types.d.ts b/types/base58check.types.d.ts new file mode 100644 index 0000000..b91db28 --- /dev/null +++ b/types/base58check.types.d.ts @@ -0,0 +1,183 @@ +export const _types: true; +export type Base58Check = { + create: Create; +}; +export type Create = (opts?: Base58CheckOpts) => any; +export type base58Check = { + checksum: Checksum; + decode: Decode; + decodeHex: DecodeHex; + encode: Encode; + encodeHex: EncodeHex; + verify: Verify; + verifyHex: VerifyHex; + _checksumHexRaw: Function; + _encodeXKey: Function; + _encodePrivateKeyHex: Function; + _encodePubKeyHashHex: Function; + _setVersion: Function; +}; +/** + * Base58Check Options, see https://github.com/dashhive/dashkeys.js/blob/1f0f4e0d0aabf9e68d94925d660f00666f502391/dashkeys.js#L38 and see https://bitcoin.stackexchange.com/questions/38878/how-does-the-bip32-version-bytes-convert-to-base58 + */ +export type Base58CheckOpts = { + /** + * - "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" for Dash / Bitcoin Base58 + */ + dictionary?: string; + /** + * - "cc" for mainnet (default), "ef" for testnet, '80' for bitcoin + */ + privateKeyVersion?: string; + /** + * - "4c" for mainnet (default), "8c" for testnet, "00" for bitcoin + */ + pubKeyHashVersion?: string; + /** + * - "4c" for mainnet (default), "8c" for testnet, "00" for bitcoin + */ + xprvVersion?: string; + /** + * - "0488b21e" for "xpub" on mainnet (default), "043587cf" for "tpub" on testnet + */ + xpubVersion?: string; +}; +export type Parts = PrivateParts | PubKeyHashParts | XPrvParts | XPubParts; +export type PrivatePartial = { + privateKey: string; +}; +export type PubKeyHashPartial = { + pubKeyHash: string; +}; +export type XPrvPartial = { + xprv: string; +}; +export type XPubPartial = { + xpub: string; +}; +export type PartsPartial = PrivatePartial | PubKeyHashPartial | XPrvPartial | XPubPartial; +export type PartsOptionalPartial = { + check?: string; + compressed?: true; + version?: string; +}; +export type EncodeParts = PartsPartial & PartsOptionalPartial; +export type KeyType = "private" | "pkh" | "xprv" | "xpub" | ""; +export type PrivateParts = { + /** + * - the 4 checksum bytes + */ + check: string; + /** + * - expect (public key) hash to be of the X value only + */ + compressed: true; + /** + * - hex private key + */ + privateKey: string; + /** + * - hex (public key) hash + */ + pubKeyHash?: string; + /** + * - "private" + */ + type?: KeyType; + /** + * - checksum passed + */ + valid?: boolean; + /** + * - 1 magic bytes + */ + version: string; +}; +export type PubKeyHashParts = { + /** + * - the 4 checksum bytes + */ + check: string; + /** + * - hex sha256-ripemd160 hash of public key + */ + pubKeyHash: string; + /** + * - "pkh" + */ + type?: KeyType; + /** + * - checksum passed + */ + valid?: boolean; + /** + * - 1 magic bytes + */ + version: string; +}; +export type XPrvParts = { + /** + * - the 4 checksum bytes + */ + check: string; + /** + * - hex extended private key + */ + xprv: string; + /** + * - "xprv" + */ + type?: KeyType; + /** + * - checksum passed + */ + valid?: boolean; + /** + * - 4 magic bytes + */ + version: string; + /** + * - hex extended public key + */ + xpub?: string; +}; +export type XPubParts = { + /** + * - the 4 checksum bytes + */ + check: string; + /** + * - "xpub" + */ + type?: KeyType; + /** + * - checksum passed + */ + valid?: boolean; + /** + * - 4 magic bytes + */ + version: string; + /** + * - hex extended public key + */ + xpub: string; +}; +export type Checksum = (parts: Parts | EncodeParts) => Promise; +export type Decode = (base58check: string, opts: DecodeOpts) => Parts; +export type DecodeHex = (hex: string, opts?: DecodeOpts) => Parts; +export type DecodeOpts = { + versions?: readonly [string, string]; + xversions?: readonly [string, string]; +}; +export type Verify = (base58check: string, opts?: VerifyOpts) => Promise; +export type VerifyHex = (hex: string, opts?: VerifyOpts) => Promise; +export type VerifyOpts = DecodeOpts & VerifyOptsPartial; +export type VerifyOptsPartial = { + /** + * - set 'false' to set 'valid' false rather than throw + */ + verify?: boolean; +}; +export type Encode = (parts: EncodeParts) => Promise; +export type EncodeHex = (parts: EncodeParts) => Promise; diff --git a/types/dashhd.d.ts b/types/dashhd.d.ts new file mode 100644 index 0000000..5559b06 --- /dev/null +++ b/types/dashhd.d.ts @@ -0,0 +1,222 @@ +declare module 'dashhd' { +export default DashHd; +const DashHd: DashHD; +export type DashHD = { + create: HDCreate; + /** + * - get the next child xkey (in a path segment) + */ + deriveChild: HDDeriveChild; + /** + * - derive a full hd path from the given key + */ + derivePath: HDDerivePath; + _fingerprint: HDFingerprint; + fromSeed: HDFromSeed; + fromXKey: HDFromXKey; + toId: HDToId; + toIdBytes: HDToIdBytes; + toAddr: HDToAddr; + toWif: HDToWif; + toXPrv: HDToXPrv; + toXPrvBytes: HDToXKeyBytes; + toXPub: HDToXPub; + toXPubBytes: HDToXKeyBytes; + _utils: HDUtils; + /** + * - randomizes private key buffer in-place + */ + wipePrivateData: HDWipePrivates; + /** + * - returns public key + */ + toPublic: HDToPublic; + /** + * - 0x80000000 + */ + HARDENED_OFFSET: number; + /** + * - 'xprv' & 'xpub' + */ + MAINNET: HDVersions; + /** + * - 'tprv' & 'tpub' + */ + TESTNET: HDVersions; + /** + * - for hardened derivation + */ + HARDENED: true; + /** + * - for public derivation + */ + PUBLIC: false; + /** + * - use 0 (external) + */ + RECEIVE: number; + /** + * - use 1 (internal) + */ + CHANGE: number; + /** + * - helper + */ + _createAccount: HDCreateAccountKey; + /** + * - helper + */ + _createXKey: HDCreateXKey; + /** + * - helper + */ + _derive: HDDeriveHelper; + /** + * - helper + */ + _toXBytes: HDToXBytes; +}; +export type HDUtils = { + privateKeyTweakAdd: HDKeyTweak; + publicKeyTweakAdd: HDKeyTweak; + publicKeyNormalize: HDKeyToKey; + ripemd160sum: HDHasher; + sha256sum: HDHasher; + sha512hmac: HDHasher; + bytesToBase64Url: HDBase64Url; + toPublicKey: HDKeyToKey; +}; +export type HDCreate = (opts: HDKeyOptions) => HDKey; +export type HDKey = { + /** + * - magic bytes for base58 prefix + */ + versions: HDVersionsOption; + /** + * - of hd path - typically 0 is seed, 1-3 hardened, 4-5 public + */ + depth: number; + /** + * - 32-bit int, slice of id, stored in child xkeys + */ + parentFingerprint: number; + /** + * - the final segment of an HD Path, the index of the wif/addr + */ + index: number; + /** + * - extra 32-bytes of shared entropy for xkeys + */ + chainCode: Uint8Array; + privateKey?: Uint8Array | (undefined | null); + publicKey: Uint8Array; +}; +export type HDKeyOptions = { + versions?: HDVersionsOption | null; + depth?: number | null; + parentFingerprint?: number | null; + index: number; + chainCode: Uint8Array; + privateKey?: Uint8Array | null; + publicKey: Uint8Array; +}; +export type HDAccount = HDKey & HDAccountPartial; +export type HDAccountPartial = { + deriveXKey: HDDeriveXKey; +}; +export type HDVersions = { + /** + * - 'mainnet', 'testnet', 'xprv' or 'tprv', or 4-byte hex or uint32 + */ + private: Uint32; + /** + * - 'mainnet', 'testnet', 'xpub' or 'tpub', or 4-byte hex or uint32 + */ + public: Uint32; +}; +export type HDVersionsOption = { + /** + * - 'mainnet', 'testnet', 'xprv' or 'tprv', or 4-byte hex or uint32 + */ + private?: Uint32 | string; + /** + * - 'mainnet', 'testnet', 'xpub' or 'tpub', or 4-byte hex or uint32 + */ + public?: Uint32 | string; +}; +export type HDXKey = HDKey & HDXKeyPartial; +export type HDXKeyPartial = { + deriveAddress: HDDeriveAddress; +}; +export type HDWallet = HDKey & HDWalletPartial; +export type HDWalletPartial = { + deriveAccount: HDDeriveAccount; +}; +export type HDCreateAccountKey = (walletKey: HDKey) => HDAccount; +export type HDCreateXKey = (accountKey: HDKey) => HDXKey; +export type HDDeriveAccount = (account: number) => Promise; +export type HDDeriveChild = (hdkey: HDKey, index: number, hardened: boolean) => Promise; +export type HDDeriveHelper = (indexedKey: Uint8Array, xParent: HDDeriveHelperOptions) => Promise; +export type HDDeriveHelperOptions = { + chainCode: Uint8Array; + privateKey?: Uint8Array | (undefined | null); + publicKey: Uint8Array; +}; +export type HDDeriveAddress = (index: number) => Promise; +export type HDDerivePath = (hdkey: HDKey, path: string) => Promise; +export type HDDeriveXKey = (use: number) => Promise; +export type HDFingerprint = (pubBytes: Uint8Array) => Promise; +export type HDFromXKey = (xkey: string, opts?: HDFromXKeyOptions) => Promise; +export type HDFromXKeyOptions = { + versions?: HDVersionsOption; + /** + * - allow non-account depths + */ + bip32?: boolean; + /** + * returns {Promise} + */ + normalizePublicKey?: boolean; +}; +export type HDFromSeed = (seedBytes: Uint8Array, opts?: HDFromSeedOptions) => Promise; +export type HDFromSeedOptions = { + /** + * - 44 (BIP-44) by default + */ + purpose?: number; + /** + * - 5 (DASH) by default + */ + coinType?: number; + /** + * - mainnet ('xprv', 'xpub') by default + */ + versions?: HDVersionsOption; +}; +export type HDGetBuffer = () => Uint8Array; +export type HDToAddr = (pubBytes: Uint8Array, opts?: HDToAddressOpts) => Promise; +export type HDToId = (hdkey: HDKey) => Promise; +export type HDToIdBytes = (hdkey: HDKey) => Promise; +export type HDToXKeyBytes = (hdkey: HDKey, opts?: HDToXKeyBytesOpts) => Uint8Array; +export type HDToXKeyBytesOpts = { + version?: number; +}; +export type HDToXBytes = (hdkey: HDKey, keyBytes: Uint8Array | null) => Uint8Array; +export type HDToWif = (privBytes: Uint8Array, opts?: HDToAddressOpts) => Promise; +export type HDToAddressOpts = import('dashkeys').EncodeKeyUint8ArrayOpts; +export type HDToXPrv = (hdkey: HDKey, opts?: { + version?: string | Uint32; +}) => Promise; +export type HDToXPub = (hdkey: HDKey, opts?: { + version?: string | Uint32; +}) => Promise; +export type HDBase64Url = (bytes: Uint8Array) => string; +export type HDHasher = (bytes: Uint8Array) => Promise; +export type HDHmac = (entropy: Uint8Array, data: Uint8Array) => Promise; +export type HDKeyToKey = (keyBytes: Uint8Array) => Promise; +export type HDKeyTweak = (keyBytes: Uint8Array, tweakBytes: Uint8Array) => Promise; +export type HDSecureErase = (buf: Uint8Array) => void; +export type HDToPublic = (hdkey: HDKey) => HDKey; +export type HDWipePrivates = (hdkey: HDKey) => HDKey; +type Uint32 = number; +} \ No newline at end of file diff --git a/types/dashkeys.d.ts b/types/dashkeys.d.ts new file mode 100644 index 0000000..57c112d --- /dev/null +++ b/types/dashkeys.d.ts @@ -0,0 +1,113 @@ +declare module 'dashkeys' { +export default DashKeys; +const DashKeys: DashKeys; +export type BaseX = import("./base-x.types.js").BaseX; +export type BaseXCreate = import("./base-x.types.js").Create; +export type BaseXDecode = import("./base-x.types.js").Decode; +export type BaseXDecodeUnsafe = import("./base-x.types.js").DecodeUnsafe; +export type BaseXEncode = import("./base-x.types.js").Encode; +export type Base58Check = import("./base58check.types.js").Base58Check; +export type Base58CheckInstance = import("./base58check.types.js").base58Check; +export type Base58CheckChecksum = import("./base58check.types.js").Checksum; +export type Base58CheckCreate = import("./base58check.types.js").Create; +export type Base58CheckDecode = import("./base58check.types.js").Decode; +export type Base58CheckDecodeHex = import("./base58check.types.js").DecodeHex; +export type Base58CheckEncode = import("./base58check.types.js").Encode; +export type Base58CheckEncodeHex = import("./base58check.types.js").EncodeHex; +export type Base58CheckEncodeParts = import("./base58check.types.js").EncodeParts; +export type Base58CheckParts = import("./base58check.types.js").Parts; +export type Base58CheckPrivateParts = import("./base58check.types.js").PrivateParts; +export type Base58CheckPubKeyHashParts = import("./base58check.types.js").PubKeyHashParts; +export type Base58CheckXPrvParts = import("./base58check.types.js").XPrvParts; +export type Base58CheckXPubParts = import("./base58check.types.js").XPubParts; +export type Base58CheckVerify = import("./base58check.types.js").Verify; +export type Base58CheckVerifyHex = import("./base58check.types.js").VerifyHex; +export type RIPEMD160 = import("./ripemd160.types.js").RIPEMD160; +export type RIPEMD160Create = import("./ripemd160.types.js").Create; +export type RIPEMD160Digest = import("./ripemd160.types.js").Digest; +export type RIPEMD160Hash = import("./ripemd160.types.js").Hash; +export type RIPEMD160Update = import("./ripemd160.types.js").Update; +export type DashKeys = { + decode: DecodeBase58Check; + encodeKey: EncodeKeyUint8Array; + addrToPkh: AddressToPubKeyHash; + pkhToAddr: PubKeyHashToAddress; + privKeyToWif: PrivateKeyToWif; + pubkeyToAddr: PublicKeyToAddress; + pubkeyToPkh: PublicKeyToPubKeyHash; + wifToAddr: WifToAddress; + wifToPrivKey: WifToPrivateKey; + utils: DashKeysUtils; + _encodeXKey: EncodeKeyUint8Array; + _dash58check: Base58CheckInstance; +}; +export type DashKeysUtils = { + bytesToHex: Uint8ArrayToHex; + generateWifNonHd: GenerateWif; + hexToBytes: HexToUint8Array; + ripemd160sum: Hasher; + sha256sum: Hasher; + toPublicKey: ToPublicKey; +}; +export type DASH_PKH = "4c"; +export type DASH_PKH_TESTNET = "8c"; +export type DASH_PRIV_KEY = "cc"; +export type DASH_PRIV_KEY_TESTNET = "ef"; +export type XPRV = "0488ade4"; +export type XPUB = "0488b21e"; +export type TPRV = "04358394"; +export type TPUB = "043587cf"; +export type VERSION = "mainnet" | "testnet" | DASH_PKH | DASH_PRIV_KEY | DASH_PKH_TESTNET | DASH_PRIV_KEY_TESTNET | "xprv" | "tprv" | "xpub" | "tpub" | XPRV | XPUB | TPRV | TPUB; +export type VERSION_PRIVATE = "mainnet" | "cc" | "testnet" | "ef"; +export type HexString = string; +export type AddressToPubKeyHash = (addr: string, opts?: DecodeOpts) => Promise; +export type DecodeBase58Check = (keyB58c: string, opts?: DecodeOpts) => Promise; +export type DecodeOpts = { + /** + * - throw if check fails, true by default + */ + validate?: boolean; + versions?: Array; + version?: VERSION | number; +}; +export type EncodeKeyUint8Array = (keyBytes: Uint8Array, opts?: EncodeKeyUint8ArrayOpts) => Promise; +export type EncodeKeyUint8ArrayOpts = { + /** + * - needed for xprv and xpub, or testnet + */ + version?: VERSION; +}; +/** + * Developer Convenience function for Generating Non-HD (NON-RECOVERABLE) WIFs + */ +export type GenerateWif = (opts?: PrivateKeyToWifOpts) => Promise; +export type Hasher = (bytes: Uint8Array | Buffer) => Promise; +/** + * Hex to JS Bytes Buffer (Uint8Array) + */ +export type HexToUint8Array = (hex: string) => Uint8Array; +export type PrivateKeyToWif = (privBytes: Uint8Array, opts?: PrivateKeyToWifOpts) => Promise; +export type PrivateKeyToWifOpts = { + /** + * - "mainnet" ("cc") by default + */ + version: VERSION_PRIVATE; +}; +export type PubKeyHashToAddress = (shaRipeBytes: Uint8Array, opts: EncodeKeyUint8ArrayOpts) => Promise; +export type PublicKeyToAddress = (pubBytes: Uint8Array, opts?: EncodeKeyUint8ArrayOpts) => Promise; +export type PublicKeyToPubKeyHash = (pubBytes: Uint8Array | Buffer) => Promise; +export type ToPublicKey = (privBytes: Uint8Array) => Promise; +/** + * JS Bytes Buffer (Uint8Array) to Hex + */ +export type Uint8ArrayToHex = (bytes: Uint8Array) => string; +/** + * Converts a WIF-encoded PrivateKey to a PubKey Hash + * (of the same coin type, of course) + */ +export type WifToAddress = (wif: string, opts?: EncodeKeyUint8ArrayOpts) => Promise; +/** + * Decodes a WIF-encoded PrivateKey to Bytes + */ +export type WifToPrivateKey = (wif: string, opts?: PrivateKeyToWifOpts) => Promise; +} \ No newline at end of file diff --git a/types/dashphrase.d.ts b/types/dashphrase.d.ts new file mode 100644 index 0000000..8894842 --- /dev/null +++ b/types/dashphrase.d.ts @@ -0,0 +1,58 @@ +declare module "dashphrase" { +export default DashPhrase; + +var DashPhrase: DashPhrase; +// namespace DashPhrase { +// export { DashPhrase, EntropyEncode, PhraseVerify, PhraseDecode, PhraseDecodeOpts, PhraseGenerate, PhraseToSeed, PhraseToSeedOptions }; +// } +type DashPhrase = { + base2048: Array; + /** + * - deprecated (use verify) + */ + checksum: PhraseVerify; + decode: PhraseDecode; + encode: EntropyEncode; + generate: PhraseGenerate; + toSeed: PhraseToSeed; + verify: PhraseVerify; + CATMONIC: string; + ZOOMONIC: string; + ZECRET: string; + ZEED: string; + /** + * - magic salt prefix + */ + _mword: string; + /** + * - strings to NFKD form + */ + _normalize: Function; + /** + * - the raw PBKDF2 function + */ + _pbkdf2: Function; + /** + * - mnemonic word separators + */ + _sep: RegExp; + /** + * - the raw SHA256 function + */ + _sha256: Function; +}; +export type EntropyEncode = (bytes: Uint8Array | Array) => Promise; +export type PhraseVerify = (recoveryPhrase: string) => Promise; +export type PhraseDecode = (recoveryPhrase: string, opts?: PhraseDecodeOpts) => Promise; +export type PhraseDecodeOpts = { + /** + * - true by default, set to false to ignore checksum + */ + verify: boolean; +}; +export type PhraseGenerate = (bitLen?: number) => Promise; +export type PhraseToSeed = (recoveryPhrase: string, salt: string, opts?: PhraseToSeedOptions) => Promise; +export type PhraseToSeedOptions = { + verify?: boolean | null; +}; +} diff --git a/types/ripemd160.types.d.ts b/types/ripemd160.types.d.ts new file mode 100644 index 0000000..200e667 --- /dev/null +++ b/types/ripemd160.types.d.ts @@ -0,0 +1,13 @@ +export const _types: true; +export type RIPEMD160 = { + create: Create; + hash: Hash; +}; +export type Create = () => ripemd160; +export type Hash = (bytes: Uint8Array) => Uint8Array; +export type ripemd160 = { + update: Update; + digest: Digest; +}; +export type Digest = () => Uint8Array; +export type Update = (data: Uint8Array) => ripemd160; diff --git a/types/test.d.ts b/types/test.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/types/test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/vite.config.js.disabled b/vite.config.js.disabled new file mode 100644 index 0000000..dcf93f8 --- /dev/null +++ b/vite.config.js.disabled @@ -0,0 +1,32 @@ +import { dirname, resolve } from 'node:path' +import { fileURLToPath } from 'node:url' +import { defineConfig } from 'vite' + +const __dirname = dirname(fileURLToPath(import.meta.url)) + +export default defineConfig({ + root: './', + build: { + // lib: { + // entry: resolve(__dirname, 'index.html'), + // name: 'DashPlatform', + // // the proper extensions will be added + // fileName: 'DashPlatform', + // }, + rollupOptions: { + input: { + main: resolve(__dirname, 'index.html'), + } + // make sure to externalize deps that shouldn't be bundled + // into your library + // external: ['vue'], + // output: { + // // Provide global variables to use in the UMD build + // // for externalized deps + // globals: { + // vue: 'Vue', + // }, + // }, + }, + }, +}) \ No newline at end of file