Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Enhance gRPC TLS by Dynamic Certificate Retrieval #2718

Merged
merged 10 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/proto/src/proto/services/node_create.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import "basic_types.proto";
* address book. The transaction, once complete, enables a new consensus node
* to join the network, and requires governing council authorization.
*
* - A `NodeCreateTransactionBody` MUST be signed by the governing council.
* - A `NodeCreateTransactionBody` MUST be signed by the `Key` assigned to the
* `admin_key` field.
* `admin_key` field and one of those keys: treasure account (2) key,
* systemAdmin(50) key, or addressBookAdmin(55) key.
* - The newly created node information SHALL be added to the network address
* book information in the network state.
* - The new entry SHALL be created in "state" but SHALL NOT participate in
Expand Down Expand Up @@ -132,7 +132,6 @@ message NodeCreateTransactionBody {
* An administrative key controlled by the node operator.
* <p>
* This key MUST sign this transaction.<br/>
* This key MUST sign each transaction to update this node.<br/>
* This field MUST contain a valid `Key` value.<br/>
* This field is REQUIRED and MUST NOT be set to an empty `KeyList`.
*/
Expand Down
30 changes: 0 additions & 30 deletions packages/proto/src/proto/services/token_get_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -209,36 +209,6 @@ message TokenInfo {
* (token definition and individual NFTs).
*/
Key metadata_key = 28;

/**
* A function-specific account key.<br/>
* This key authorizes transactions to lock tokens in an account or account
* partition.
* <p>
* The key SHALL be used to authorize the locking and unlocking of tokens,
* or the transfer of locked tokens on balances held by the user
* on their account, or on the partition in their account.
*/
Key lock_key = 29;

/**
* A function-specific account key.<br/>
* This key authorizes transactions to partition fungible tokens and NFTs
* held by an account.
* <p>
* This key SHALL be used to authorize the creation, deletion, or updating
* of partition definitions owned by the token definition.
*/
Key partition_key = 30;

/**
* A function-specific account key.<br/>
* This key authorizes transactions to move tokens between partitions.
* <p>
* This key SHALL be used to authorize the movement of tokens between
* partitions.
*/
Key partition_move_key = 31;
}

/**
Expand Down
23 changes: 1 addition & 22 deletions src/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/

import ManagedNode from "./ManagedNode.js";
import { PREVIEWNET_CERTS, TESTNET_CERTS, MAINNET_CERTS } from "./NodeCerts.js";

/**
* @typedef {import("./account/AccountId.js").default} AccountId
Expand All @@ -33,7 +32,7 @@ import { PREVIEWNET_CERTS, TESTNET_CERTS, MAINNET_CERTS } from "./NodeCerts.js";
* @typedef {object} NewNode
* @property {AccountId} accountId
* @property {string} address
* @property {(address: string, cert?: string) => Channel} channelInitFunction
* @property {(address: string) => Channel} channelInitFunction
*/

/**
Expand Down Expand Up @@ -100,26 +99,6 @@ export default class Node extends ManagedNode {
);
}

/**
* @param {LedgerId|string} ledgerId
* @returns {this}
*/
setCert(ledgerId) {
switch (ledgerId.toString()) {
case "previewnet":
this._cert = PREVIEWNET_CERTS[this._accountId.toString()];
break;
case "testnet":
this._cert = TESTNET_CERTS[this._accountId.toString()];
break;
case "mainnet":
this._cert = MAINNET_CERTS[this._accountId.toString()];
break;
}

return this;
}

/**
* @returns {AccountId}
*/
Expand Down
Loading