code

command
v0.0.0-...-fe33e5d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 795 Imported by: 0

Documentation

Overview

origin_dairyfarm.go

Repository Package follow the repository pattern https://www.c-sharpcorner.com/UploadFile/b1df45/getting-started-with-repository-pattern-using-C-Sharp/ It provides a generic interface to interact with our entities

  • Copyright 2017 - 2019 KB Kontrakt LLC - All Rights Reserved. *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at
  • http://www.apache.org/licenses/LICENSE-2.0
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License. *

Define package name

Package util provides generic CRUD methods for working with Hyperledger Fabric golang chaincode.

*

*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
*

# -*- coding: utf-8 -*- # @Author : joker # @Time : 2020-03-26 13:23 # @File : demo_chaincode.go # @Description : # @Attention :

*

*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
*

*  Copyright 2017 - 2019 KB Kontrakt LLC - All Rights Reserved.
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*     http://www.apache.org/licenses/LICENSE-2.0
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*

*  Copyright 2017 - 2019 KB Kontrakt LLC - All Rights Reserved.
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*     http://www.apache.org/licenses/LICENSE-2.0
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*

# -*- coding: utf-8 -*- # @Author : joker # @Time : 2020-06-16 14:05 # @File : args.go # @Description : # @Attention :

origin_salesterminal

The basic repository implementation use utility functions in akc-go-sdk

# -*- coding: utf-8 -*- # @Author : joker # @Time : 2020-03-26 13:23 # @File : demo_chaincode.go # @Description : # @Attention :

# -*- coding: utf-8 -*- # @Author : joker # @Time : 2020-03-26 13:23 # @File : demo_chaincode.go # @Description : # @Attention :

# -*- coding: utf-8 -*- # @Author : joker # @Time : 2020-03-26 13:23 # @File : demo_chaincode.go # @Description : # @Attention :

Package shim provides APIs for the chaincode to access its state variables, transaction context and call other chaincodes.

  • Copyright 2017 - 2019 KB Kontrakt LLC - All Rights Reserved. *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at
  • http://www.apache.org/licenses/LICENSE-2.0
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License. *

# -*- coding: utf-8 -*- # @Author : joker # @Time : 2019-12-14 13:05 # @File : fabric_base_facaded_service.go # @Description : 门面service的baseCC # @Attention :

# -*- coding: utf-8 -*- # @Author : joker # @Time : 2020-03-26 13:23 # @File : demo_chaincode.go # @Description : # @Attention :

***************************************************************

  • Código de smart contract correspondiente al proyecto de grado
  • Álvaro Miguel Salinas Dockar
  • Universidad Católica Boliviana "San Pablo"
  • Ingeniería Mecatrónica
  • La Paz - Bolivia, 2020 **************************************************************

///////////////////////////////////////////

THE BLOCKCHAIN PKI EXPERIMENT     ////

/////////////////////////////////////////

This is the fabpki, a chaincode that implements a Public Key Infrastructure (PKI)
for measuring instruments. It runs in Hyperledger Fabric 1.4.
He was created as part of the PKI Experiment. You can invoke its methods
to store measuring instruments public keys in the ledger, and also to verify
digital signatures that are supposed to come from these instruments.

@author: Wilson S. Melo Jr.
@date: Oct/2019

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Package mock provides mock methods to simulate how a peer node interact with CouchDB and simulate a transaction proposal. This does not requires a working Fabric Peer like FabricSDK but require connection to a remote CouchDB instance.

The workflow is as follow

1) Create a core.yaml follow similar template in test/contract/core.yaml, remember to change the configuration of the couchDB as you need

2) Create a NewMockStubExtend object that point to the core.yaml and the smart contract object

3) Process Indexes (if need)

4) Perform MockInvokeTransaction

For more details, please find test example in the README file

*

  • Allows the managing of multiple tokens *
  • Token1 x 0
  • Token1 x 10
  • Token2 y 5 * *

Package shimtest provides a mock of the ChaincodeStubInterface for unit testing chaincode.

Deprecated: ShimTest will be removed in a future release. Future development should make use of the ChaincodeStub Interface for generating mocks

  • Copyright 2017 - 2019 KB Kontrakt LLC - All Rights Reserved. *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at
  • http://www.apache.org/licenses/LICENSE-2.0
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License. *

Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured. The configuration transactions arrive from the ordering service to the committer who calls this chaincode. The chaincode also provides peer configuration services such as joining a chain or getting configuration data.

Package shimtest provides a mock of the ChaincodeStubInterface for unit testing chaincode.

Deprecated: ShimTest will be removed in a future release. Future development should make use of the ChaincodeStub Interface for generating mocks

  • Copyright 2017 - 2019 KB Kontrakt LLC - All Rights Reserved. *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at
  • http://www.apache.org/licenses/LICENSE-2.0
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License. *

test contains the stubs required for counterfeiter to generate the mocks used for tests

The mocks are created by running `go generate ./...` as described in the counterfeiter readme

***************************************************************

  • Código de smart contract correspondiente al proyecto de grado

  • Álvaro Miguel Salinas Dockar

  • Universidad Católica Boliviana "San Pablo"

  • Ingeniería Mecatrónica

  • La Paz - Bolivia, 2020 **************************************************************

  • Copyright 2017 - 2019 KB Kontrakt LLC - All Rights Reserved. *

  • Licensed under the Apache License, Version 2.0 (the "License");

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • http://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an "AS IS" BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License. *

  • Copyright (C) 2020 The poly network Authors

  • This file is part of The poly network library. *

  • The poly network is free software: you can redistribute it and/or modify

  • it under the terms of the GNU Lesser General Public License as published by

  • the Free Software Foundation, either version 3 of the License, or

  • (at your option) any later version. *

  • The poly network is distributed in the hope that it will be useful,

  • but WITHOUT ANY WARRANTY; without even the implied warranty of

  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

  • GNU Lesser General Public License for more details.

  • You should have received a copy of the GNU Lesser General Public License

  • along with The poly network . If not, see <http://www.gnu.org/licenses/>.

Package shim provides APIs for the chaincode to access its state variables, transaction context and call other chaincodes.

Package shim provides APIs for the chaincode to access its state variables, transaction context and call other chaincodes.

Package shim provides APIs for the chaincode to access its state variables, transaction context and call other chaincodes.

Package shim provides APIs for the chaincode to access its state variables, transaction context and call other chaincodes.

*

  • Allows the managing of multiple tokens *
  • Token1 x 0
  • Token1 x 10
  • Token2 y 5 * *

*

  • Allows the managing of multiple tokens *
  • Token1 x 0
  • Token1 x 10
  • Token2 y 5 * *

Package shimtest provides a mock of the ChaincodeStubInterface for unit testing chaincode.

Deprecated: ShimTest will be removed in a future release. Future development should make use of the ChaincodeStub Interface for generating mocks

Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured. The configuration transactions arrive from the ordering service to the committer who calls this chaincode. The chaincode also provides peer configuration services such as joining a chain or getting configuration data.

Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured. The configuration transactions arrive from the ordering service to the committer who calls this chaincode. The chaincode also provides peer configuration services such as joining a chain or getting configuration data.

Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured. The configuration transactions arrive from the ordering service to the committer who calls this chaincode. The chaincode also provides peer configuration services such as joining a chain or getting configuration data.

Package shimtest provides a mock of the ChaincodeStubInterface for unit testing chaincode.

Deprecated: ShimTest will be removed in a future release. Future development should make use of the ChaincodeStub Interface for generating mocks

Package shimtest provides a mock of the ChaincodeStubInterface for unit testing chaincode.

Deprecated: ShimTest will be removed in a future release. Future development should make use of the ChaincodeStub Interface for generating mocks

Package shimtest provides a mock of the ChaincodeStubInterface for unit testing chaincode.

Deprecated: ShimTest will be removed in a future release. Future development should make use of the ChaincodeStub Interface for generating mocks

Package shimtest provides a mock of the ChaincodeStubInterface for unit testing chaincode.

Deprecated: ShimTest will be removed in a future release. Future development should make use of the ChaincodeStub Interface for generating mocks

manage_assets is a chaincode that contains all the code related to asset management operations (e.g., Lock, Unlock, Claim) and any related utility functions

///////////////////////////////////////////

THE BLOCKCHAIN PKI EXPERIMENT     ////

/////////////////////////////////////////

This is the fabpki, a chaincode that implements a Public Key Infrastructure (PKI)
for measuring instruments. It runs in Hyperledger Fabric 1.4.
He was created as part of the PKI Experiment. You can invoke its methods
to store measuring instruments public keys in the ledger, and also to verify
digital signatures that are supposed to come from these instruments.

@author: Wilson S. Melo Jr.
@date: Oct/2019

# -*- coding: utf-8 -*- # @Author : joker # @Time : 2020-03-26 13:23 # @File : demo_chaincode.go # @Description : # @Attention :

Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured. The configuration transactions arrive from the ordering service to the committer who calls this chaincode. The chaincode also provides peer configuration services such as joining a chain or getting configuration data.

***************************************************************

  • Código de smart contract correspondiente al proyecto de grado
  • Álvaro Miguel Salinas Dockar
  • Universidad Católica Boliviana "San Pablo"
  • Ingeniería Mecatrónica
  • La Paz - Bolivia, 2020 **************************************************************

handleExternalRequest contains the chaincode function to process an interop request coming from a remote network

Package shim provides APIs for the chaincode to access its state variables, transaction context and call other chaincodes.

SPDX-FileCopyrightText: 2021 GSMA and all contributors. SPDX-License-Identifier: Apache-2.0

Chaincode POC

  • hybrid approach

  • offchain data storage

  • hidden communication on chain (only partners can derive storage location)

  • hlf composite keys for storage

    Please see offchain_test.go for an example workflow with mocked rest interface.

*

manage_assets is a chaincode that contains all the code related to asset management operations (e.g., Lock, Unlock, Claim) and any related utility functions

*

  • Unit test file for calc.go

  • Demonstrates the use of MockStub for creating units tests

  • Copyright (C) 2020 The poly network Authors

  • This file is part of The poly network library. *

  • The poly network is free software: you can redistribute it and/or modify

  • it under the terms of the GNU Lesser General Public License as published by

  • the Free Software Foundation, either version 3 of the License, or

  • (at your option) any later version. *

  • The poly network is distributed in the hope that it will be useful,

  • but WITHOUT ANY WARRANTY; without even the implied warranty of

  • MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

  • GNU Lesser General Public License for more details.

  • You should have received a copy of the GNU Lesser General Public License

  • along with The poly network . If not, see <http://www.gnu.org/licenses/>.

test contains the stubs required for counterfeiter to generate the mocks used for tests

The mocks are created by running `go generate ./...` as described in the counterfeiter readme

# -*- coding: utf-8 -*- # @Author : joker # @Time : 2020-03-26 13:23 # @File : demo_chaincode.go # @Description : # @Attention :

*

*

*

  • Unit test file for calc.go
  • Demonstrates the use of MockStub for creating units tests

*

  • Unit test file for calc.go
  • Demonstrates the use of MockStub for creating units tests

origin_machining.go

Package shim provides APIs for the chaincode to access its state variables, transaction context and call other chaincodes.

///////////////////////////////////////////

THE BLOCKCHAIN PKI EXPERIMENT     ////

/////////////////////////////////////////

This is the fabpki, a chaincode that implements a Public Key Infrastructure (PKI)
for measuring instruments. It runs in Hyperledger Fabric 1.4.
He was created as part of the PKI Experiment. You can invoke its methods
to store measuring instruments public keys in the ledger, and also to verify
digital signatures that are supposed to come from these instruments.

@author: Wilson S. Melo Jr.
@date: Oct/2019

This chaincode calls the token/v5 This is to JUST demonstrate the invoke mechanism This cc will act as a proxy

///////////////////////////////////////////

THE BLOCKCHAIN PKI EXPERIMENT     ////

/////////////////////////////////////////

This is the fabpki, a chaincode that implements a Public Key Infrastructure (PKI)
for measuring instruments. It runs in Hyperledger Fabric 1.4.
He was created as part of the PKI Experiment. You can invoke its methods
to store measuring instruments public keys in the ledger, and also to verify
digital signatures that are supposed to come from these instruments.

@author: Wilson S. Melo Jr.
@date: Oct/2019

Package router provides base router for using in chaincode Invoke function

  • Copyright 2017 - 2019 KB Kontrakt LLC - All Rights Reserved. *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at
  • http://www.apache.org/licenses/LICENSE-2.0
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License. *

Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured. The configuration transactions arrive from the ordering service to the committer who calls this chaincode. The chaincode also provides peer configuration services such as joining a chain or getting configuration data.

*

*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
*

*

*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
*

*  Copyright 2017 - 2019 KB Kontrakt LLC - All Rights Reserved.
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*     http://www.apache.org/licenses/LICENSE-2.0
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

*

*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
*

# -*- coding: utf-8 -*- # @Author : joker # @Time : 2020-03-26 13:23 # @File : demo_chaincode.go # @Description : # @Attention :

This chaincode calls the token/v5 This is to JUST demonstrate the invoke mechanism This cc will act as a proxy

This chaincode calls the token/v5 This is to JUST demonstrate the invoke mechanism This cc will act as a proxy

Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured. The configuration transactions arrive from the ordering service to the committer who calls this chaincode. The chaincode also provides peer configuration services such as joining a chain or getting configuration data.

Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured. The configuration transactions arrive from the ordering service to the committer who calls this chaincode. The chaincode also provides peer configuration services such as joining a chain or getting configuration data.

Package shimtest provides a mock of the ChaincodeStubInterface for unit testing chaincode.

Deprecated: ShimTest will be removed in a future release. Future development should make use of the ChaincodeStub Interface for generating mocks

*

  • Shows how the aggregattion functions may be implemented *

Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured. The configuration transactions arrive from the ordering service to the committer who calls this chaincode. The chaincode also provides peer configuration services such as joining a chain or getting configuration data.

Package shimtest provides a mock of the ChaincodeStubInterface for unit testing chaincode.

Package kalpsdk provides a set of APIs for developing applications on the Kalptantra blockchain network. It aims to simplify the process of interacting with the blockchain network and offers a range of functionalities to enhance the development experience.

The kalpsdk package aims to provide developers with a streamlined and efficient development experience when building applications on the Kalptantra blockchain network. By offering a range of convenient functionalities and integrating with existing Hyperledger Fabric packages, it simplifies the implementation of smart contracts and interaction with the blockchain network.

Note: This overview provides a high-level description of the kalpsdk package and its main components. For detailed information on specific types, methods, and usage examples, please refer to the package documentation and code comments.

SPDX-FileCopyrightText: 2021 GSMA and all contributors. SPDX-License-Identifier: Apache-2.0

Chaincode POC

  • hybrid approach

  • offchain data storage

  • hidden communication on chain (only partners can derive storage location)

  • hlf composite keys for storage

    Please see offchain_test.go for an example workflow with mocked rest interface.

Copyright 2023 The Bestchains Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

manage_assets is a chaincode that contains all the code related to asset management operations (e.g., Lock, Unlock, Claim) and any related utility functions

SPDX-FileCopyrightText: 2021 GSMA and all contributors. SPDX-License-Identifier: Apache-2.0

SPDX-FileCopyrightText: 2021 GSMA and all contributors. SPDX-License-Identifier: Apache-2.0

manage_assets is a chaincode that contains all the code related to asset management operations (e.g., Lock, Unlock, Claim) and any related utility functions

handleExternalRequest contains the chaincode function to process an interop request coming from a remote network

accesscontrolcc contains all the code related to the AccessControlPolicy struct, including CRUD operations and any related verification functions

* * Copyright CONUN KOREA. All Rights Reserved *

SPDX-License-Identifier: MIT

SPDX-License-Identifier: MIT

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Package contract provides a sample smart contract. it uses util package to interact with the state database it also uses mock package to quickly test the solution by connecting to a remote couchDB instance.

manage_assets is a chaincode that contains all the code related to asset management operations (e.g., Lock, Unlock, Claim) and any related utility functions

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0

test contains the stubs required for counterfeiter to generate the mocks used for tests

The mocks are created by running `go generate ./...` as described in the counterfeiter readme

Package handler take request from the smart contract API and pass the DTO object to the service layer.

SPDX-FileCopyrightText: 2021 GSMA and all contributors. SPDX-License-Identifier: Apache-2.0

manage_assets is a chaincode that contains all the code related to asset management operations (e.g., Lock, Unlock, Claim) and any related utility functions

Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL