Creates a VPC and endpoint that allows Hyperledger Fabric client to interact with the Hyperledger Fabric endpoints that Amazon Managed Blockchain exposes for the member and network resources.
import { HyperledgerFabricClient } from '@cdklabs/cdk-hyperledger-fabric-network'
new HyperledgerFabricClient(scope: HyperledgerFabricNetwork, id: string, props?: HyperledgerFabricClientProps)
Name | Type | Description |
---|---|---|
scope |
HyperledgerFabricNetwork |
No description. |
id |
string |
No description. |
props |
HyperledgerFabricClientProps |
No description. |
- Type: HyperledgerFabricNetwork
- Type: string
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { HyperledgerFabricClient } from '@cdklabs/cdk-hyperledger-fabric-network'
HyperledgerFabricClient.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The client VPC that has endpoint to access the Amazon Managed Blockchain. |
vpcEndpoint |
aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint |
Managed Blockchain network VPC endpoint. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
The client VPC that has endpoint to access the Amazon Managed Blockchain.
public readonly vpcEndpoint: InterfaceVpcEndpoint;
- Type: aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint
Managed Blockchain network VPC endpoint.
Creates a Hyperledger Fabric network on Amazon Managed Blockchain.
import { HyperledgerFabricNetwork } from '@cdklabs/cdk-hyperledger-fabric-network'
new HyperledgerFabricNetwork(scope: Construct, id: string, props: HyperledgerFabricNetworkProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
HyperledgerFabricNetworkProps |
No description. |
- Type: constructs.Construct
- Type: string
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { HyperledgerFabricNetwork } from '@cdklabs/cdk-hyperledger-fabric-network'
HyperledgerFabricNetwork.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
adminPasswordSecret |
aws-cdk-lib.aws_secretsmanager.Secret |
Secret ARN for the Hyperledger Fabric admin password. |
adminPrivateKeySecret |
aws-cdk-lib.aws_secretsmanager.Secret |
Secret for Hyperledger Fabric admin private key. |
adminSignedCertSecret |
aws-cdk-lib.aws_secretsmanager.Secret |
Secret for Hyperledger Fabric admin signed certificate. |
caEndpoint |
string |
Managed Blockchain member CA endpoint. |
client |
HyperledgerFabricClient |
The client network to interact with the Hyperledger Fabric network. |
enableCaLogging |
boolean |
The configuration to enable or disable certificate authority logging. |
enrollAdmin |
boolean |
Configuration to enable/disable admin user enrollment. |
frameworkVersion |
FrameworkVersion |
Hyperledger Fabric framework version. |
memberDescription |
string |
Managed Blockchain member description. |
memberId |
string |
Managed Blockchain member identifier generated on construction. |
memberName |
string |
Managed Blockchain member name. |
networkDescription |
string |
Managed Blockchain network description. |
networkEdition |
NetworkEdition |
Managed Blockchain network edition. |
networkId |
string |
Managed Blockchain network identifier generated on construction. |
networkName |
string |
Managed Blockchain network name. |
nodes |
HyperledgerFabricNode[] |
List of nodes created in the network. |
ordererEndpoint |
string |
Managed Blockchain network ordering service endpoint. |
proposalDurationInHours |
number |
The duration from the time that a proposal is created until it expires. |
thresholdComparator |
ThresholdComparator |
Determines whether the yes votes must be greater than the threshold percentage or must be greater than or equal to the threhold percentage to be approved. |
thresholdPercentage |
number |
The percentage of votes among all members that must be yes for a proposal to be approved. |
users |
HyperledgerFabricUser[] |
List of users registered with CA. |
vpcEndpointServiceName |
string |
Managed Blockchain network VPC endpoint service name. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly adminPasswordSecret: Secret;
- Type: aws-cdk-lib.aws_secretsmanager.Secret
Secret ARN for the Hyperledger Fabric admin password.
public readonly adminPrivateKeySecret: Secret;
- Type: aws-cdk-lib.aws_secretsmanager.Secret
Secret for Hyperledger Fabric admin private key.
public readonly adminSignedCertSecret: Secret;
- Type: aws-cdk-lib.aws_secretsmanager.Secret
Secret for Hyperledger Fabric admin signed certificate.
public readonly caEndpoint: string;
- Type: string
Managed Blockchain member CA endpoint.
public readonly client: HyperledgerFabricClient;
- Type: HyperledgerFabricClient
The client network to interact with the Hyperledger Fabric network.
public readonly enableCaLogging: boolean;
- Type: boolean
The configuration to enable or disable certificate authority logging.
public readonly enrollAdmin: boolean;
- Type: boolean
Configuration to enable/disable admin user enrollment.
public readonly frameworkVersion: FrameworkVersion;
- Type: FrameworkVersion
Hyperledger Fabric framework version.
public readonly memberDescription: string;
- Type: string
Managed Blockchain member description.
public readonly memberId: string;
- Type: string
Managed Blockchain member identifier generated on construction.
public readonly memberName: string;
- Type: string
Managed Blockchain member name.
public readonly networkDescription: string;
- Type: string
Managed Blockchain network description.
public readonly networkEdition: NetworkEdition;
- Type: NetworkEdition
Managed Blockchain network edition.
public readonly networkId: string;
- Type: string
Managed Blockchain network identifier generated on construction.
public readonly networkName: string;
- Type: string
Managed Blockchain network name.
public readonly nodes: HyperledgerFabricNode[];
- Type: HyperledgerFabricNode[]
List of nodes created in the network.
public readonly ordererEndpoint: string;
- Type: string
Managed Blockchain network ordering service endpoint.
public readonly proposalDurationInHours: number;
- Type: number
The duration from the time that a proposal is created until it expires.
public readonly thresholdComparator: ThresholdComparator;
- Type: ThresholdComparator
Determines whether the yes votes must be greater than the threshold percentage or must be greater than or equal to the threhold percentage to be approved.
public readonly thresholdPercentage: number;
- Type: number
The percentage of votes among all members that must be yes for a proposal to be approved.
public readonly users: HyperledgerFabricUser[];
- Type: HyperledgerFabricUser[]
List of users registered with CA.
public readonly vpcEndpointServiceName: string;
- Type: string
Managed Blockchain network VPC endpoint service name.
Creates a Hyperledger Fabric node on an Amazon Managed Blockchain network.
import { HyperledgerFabricNode } from '@cdklabs/cdk-hyperledger-fabric-network'
new HyperledgerFabricNode(scope: HyperledgerFabricNetwork, id: string, props?: HyperledgerFabricNodeProps)
Name | Type | Description |
---|---|---|
scope |
HyperledgerFabricNetwork |
No description. |
id |
string |
No description. |
props |
HyperledgerFabricNodeProps |
No description. |
- Type: HyperledgerFabricNetwork
- Type: string
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
configureLogging |
Configure logging for the node via SDK call; |
fetchData |
Populate the output properties that must be fetched via SDK call; |
public toString(): string
Returns a string representation of this construct.
public configureLogging(sdkCallPolicy: AwsCustomResourcePolicy): void
Configure logging for the node via SDK call;
this function should be merged back into the constructor once the race condition is solved
- Type: aws-cdk-lib.custom_resources.AwsCustomResourcePolicy
public fetchData(dataSdkCallPolicy: AwsCustomResourcePolicy): void
Populate the output properties that must be fetched via SDK call;
this function should be merged back into the constructor once the race condition is solved
- Type: aws-cdk-lib.custom_resources.AwsCustomResourcePolicy
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
constructNodes |
Build out a list of HyperledgerFabricNode constructs given a list of input property objects; |
import { HyperledgerFabricNode } from '@cdklabs/cdk-hyperledger-fabric-network'
HyperledgerFabricNode.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
import { HyperledgerFabricNode } from '@cdklabs/cdk-hyperledger-fabric-network'
HyperledgerFabricNode.constructNodes(scope: HyperledgerFabricNetwork, nodeProps?: HyperledgerFabricNodeProps[])
Build out a list of HyperledgerFabricNode constructs given a list of input property objects;
additionally checks to ensure node count is supported given the network type
- Type: HyperledgerFabricNetwork
- Type: HyperledgerFabricNodeProps[]
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
availabilityZone |
string |
The Availability Zone in which the node exists. |
enableChaincodeLogging |
boolean |
The configuration to enable or disable chaincode logging. |
enableNodeLogging |
boolean |
The configuration to enable or disable node logging. |
instanceType |
InstanceType |
The Amazon Managed Blockchain instance type for the node. |
memberId |
string |
Managed Blockchain member identifier. |
networkId |
string |
Managed Blockchain network identifier. |
nodeId |
string |
Managed Blockchain node identifier generated on construction. |
endpoint |
string |
No description. |
eventEndpoint |
string |
No description. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly availabilityZone: string;
- Type: string
The Availability Zone in which the node exists.
public readonly enableChaincodeLogging: boolean;
- Type: boolean
The configuration to enable or disable chaincode logging.
public readonly enableNodeLogging: boolean;
- Type: boolean
The configuration to enable or disable node logging.
public readonly instanceType: InstanceType;
- Type: InstanceType
The Amazon Managed Blockchain instance type for the node.
public readonly memberId: string;
- Type: string
Managed Blockchain member identifier.
public readonly networkId: string;
- Type: string
Managed Blockchain network identifier.
public readonly nodeId: string;
- Type: string
Managed Blockchain node identifier generated on construction.
public readonly endpoint: string;
- Type: string
public readonly eventEndpoint: string;
- Type: string
Creates custom resources to register and enroll users identities with the CA using the fabric-ca-client SDK.
import { HyperledgerFabricUser } from '@cdklabs/cdk-hyperledger-fabric-network'
new HyperledgerFabricUser(scope: HyperledgerFabricNetwork, id: string, props: HyperledgerFabricUserProps)
Name | Type | Description |
---|---|---|
scope |
HyperledgerFabricNetwork |
No description. |
id |
string |
No description. |
props |
HyperledgerFabricUserProps |
No description. |
- Type: HyperledgerFabricNetwork
- Type: string
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { HyperledgerFabricUser } from '@cdklabs/cdk-hyperledger-fabric-network'
HyperledgerFabricUser.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
affiliation |
string |
User's affiliation to the member. |
userId |
string |
User ID registered with CA. |
userPrivateKeySecret |
aws-cdk-lib.aws_secretsmanager.Secret |
Secret for user private key. |
userSignedCertSecret |
aws-cdk-lib.aws_secretsmanager.Secret |
Secret for user signed certificate. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly affiliation: string;
- Type: string
User's affiliation to the member.
public readonly userId: string;
- Type: string
User ID registered with CA.
public readonly userPrivateKeySecret: Secret;
- Type: aws-cdk-lib.aws_secretsmanager.Secret
Secret for user private key.
public readonly userSignedCertSecret: Secret;
- Type: aws-cdk-lib.aws_secretsmanager.Secret
Secret for user signed certificate.
Construct properties for HyperledgerFabricVpc
.
import { HyperledgerFabricClientProps } from '@cdklabs/cdk-hyperledger-fabric-network'
const hyperledgerFabricClientProps: HyperledgerFabricClientProps = { ... }
Name | Type | Description |
---|---|---|
vpc |
aws-cdk-lib.aws_ec2.IVpc |
Client VPC to create the endpoints. |
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
Client VPC to create the endpoints.
If not provided,
VPC will be created with the default properties
(CIDR-10.0.0.0/16
and subnets of type PRIVATE_ISOLATED
)
Construct properties for HyperledgerFabricNetwork
.
import { HyperledgerFabricNetworkProps } from '@cdklabs/cdk-hyperledger-fabric-network'
const hyperledgerFabricNetworkProps: HyperledgerFabricNetworkProps = { ... }
Name | Type | Description |
---|---|---|
memberName |
string |
Managed Blockchain member name. |
networkName |
string |
Managed Blockchain network name. |
client |
HyperledgerFabricClientProps |
The Client network to interact with the Hyperledger Fabric network. |
enableCaLogging |
boolean |
The configuration to enable or disable certificate authority logging. |
enrollAdmin |
boolean |
Configuration to enable/disable enrollment of admin user. |
frameworkVersion |
FrameworkVersion |
Hyperledger Fabric framework version. |
memberDescription |
string |
Managed Blockchain member description. |
networkDescription |
string |
Managed Blockchain network description. |
networkEdition |
NetworkEdition |
Managed Blockchain network edition. |
nodes |
HyperledgerFabricNodeProps[] |
List of nodes to create on the network. |
proposalDurationInHours |
number |
The duration from the time that a proposal is created until it expires. |
thresholdComparator |
ThresholdComparator |
Determines whether the yes votes must be greater than the threshold percentage or must be greater than or equal to the threhold percentage to be approved. |
thresholdPercentage |
number |
The percentage of votes among all members that must be yes for a proposal to be approved. |
users |
HyperledgerFabricUserProps[] |
List of users to register with Fabric CA Note: enrollAdmin property has to be enabled for registering users. |
public readonly memberName: string;
- Type: string
Managed Blockchain member name.
public readonly networkName: string;
- Type: string
Managed Blockchain network name.
public readonly client: HyperledgerFabricClientProps;
- Type: HyperledgerFabricClientProps
- Default: Client network with Default properties (CIDR-
10.0.0.0/16
and subnets of typePRIVATE_ISOLATED
)
The Client network to interact with the Hyperledger Fabric network.
public readonly enableCaLogging: boolean;
- Type: boolean
- Default: true
The configuration to enable or disable certificate authority logging.
public readonly enrollAdmin: boolean;
- Type: boolean
- Default: true
Configuration to enable/disable enrollment of admin user.
public readonly frameworkVersion: FrameworkVersion;
- Type: FrameworkVersion
- Default: FrameworkVersion.VERSION_1_4
Hyperledger Fabric framework version.
public readonly memberDescription: string;
- Type: string
- Default: Set to match member name
Managed Blockchain member description.
public readonly networkDescription: string;
- Type: string
- Default: Set to match network name
Managed Blockchain network description.
public readonly networkEdition: NetworkEdition;
- Type: NetworkEdition
- Default: NetworkEdition.STANDARD
Managed Blockchain network edition.
public readonly nodes: HyperledgerFabricNodeProps[];
- Type: HyperledgerFabricNodeProps[]
- Default: One node with default configuration
List of nodes to create on the network.
public readonly proposalDurationInHours: number;
- Type: number
- Default: 24 hours
The duration from the time that a proposal is created until it expires.
public readonly thresholdComparator: ThresholdComparator;
- Type: ThresholdComparator
- Default: GREATER_THAN
Determines whether the yes votes must be greater than the threshold percentage or must be greater than or equal to the threhold percentage to be approved.
public readonly thresholdPercentage: number;
- Type: number
- Default: 50 percent
The percentage of votes among all members that must be yes for a proposal to be approved.
public readonly users: HyperledgerFabricUserProps[];
- Type: HyperledgerFabricUserProps[]
List of users to register with Fabric CA Note: enrollAdmin property has to be enabled for registering users.
Construct properties for HyperledgerFabricNode
.
import { HyperledgerFabricNodeProps } from '@cdklabs/cdk-hyperledger-fabric-network'
const hyperledgerFabricNodeProps: HyperledgerFabricNodeProps = { ... }
Name | Type | Description |
---|---|---|
availabilityZone |
string |
The Availability Zone in which the node will be created. |
enableChaincodeLogging |
boolean |
The configuration to enable or disable chaincode logging. |
enableNodeLogging |
boolean |
The configuration to enable or disable node logging. |
instanceType |
InstanceType |
The Amazon Managed Blockchain instance type for the node. |
public readonly availabilityZone: string;
- Type: string
- Default: The first AZ in the region
The Availability Zone in which the node will be created.
public readonly enableChaincodeLogging: boolean;
- Type: boolean
- Default: true
The configuration to enable or disable chaincode logging.
public readonly enableNodeLogging: boolean;
- Type: boolean
- Default: true
The configuration to enable or disable node logging.
public readonly instanceType: InstanceType;
- Type: InstanceType
- Default: BURSTABLE3_SMALL
The Amazon Managed Blockchain instance type for the node.
Construct properties for HyperledgerFabricUser
.
import { HyperledgerFabricUserProps } from '@cdklabs/cdk-hyperledger-fabric-network'
const hyperledgerFabricUserProps: HyperledgerFabricUserProps = { ... }
Name | Type | Description |
---|---|---|
affilitation |
string |
User's affiliation to the member. |
userId |
string |
User ID to register with CA. |
public readonly affilitation: string;
- Type: string
User's affiliation to the member.
Should be hierarchical with member name as root(MemberName.Dept1
).
public readonly userId: string;
- Type: string
User ID to register with CA.
Define which Hyperledger Fabric framework to use.
Name | Description |
---|---|
VERSION_1_2 |
No description. |
VERSION_1_4 |
No description. |
VERSION_2_2 |
No description. |
Supported instance types for Managed Blockchain nodes.
Name | Description |
---|---|
BURSTABLE3_SMALL |
No description. |
BURSTABLE3_MEDIUM |
No description. |
BURSTABLE3_LARGE |
No description. |
BURSTABLE3_XLARGE |
No description. |
STANDARD5_LARGE |
No description. |
STANDARD5_XLARGE |
No description. |
STANDARD5_XLARGE2 |
No description. |
STANDARD5_XLARGE4 |
No description. |
COMPUTE5_LARGE |
No description. |
COMPUTE5_XLARGE |
No description. |
COMPUTE5_XLARGE2 |
No description. |
COMPUTE5_XLARGE4 |
No description. |
Starter networks are cheaper, but are limited to 2 nodes that can only be from a subset of types (see node.ts for the list).
Name | Description |
---|---|
STARTER |
No description. |
STANDARD |
No description. |
Constants to define ties in voting for new members.
Name | Description |
---|---|
GREATER_THAN |
No description. |
GREATER_THAN_OR_EQUAL_TO |
No description. |