BSN-DDC 基礎網路 DDC SDK 詳細設計(八):示例

BSN研習社發表於2022-12-09

2022 年 1 月 25 日,區塊鏈服務網路發展聯盟(簡稱 “BSN 聯盟”)推出了 “BSN-DDC 基礎網路”(簡稱 DDC 網路)。DDC 網路的推出,為 NFT 技術在我國的落地提供基礎設施能力支撐,併為其合規發展保駕護航。

DDC(Distributed Digital Certificate)即分散式數字憑證,其屬性和功能類似於 NFT。NFT 是現實或數字世界中某個事物在區塊鏈上的數字化權益證明,儘管目前大多被用於數字藝術品版權領域,然而其本質上是一種區塊鏈分散式資料庫技術,並不帶有特定的業務屬性,它的潛在使用場景是非常廣泛的,可應用在數字商品憑證、票證、賬戶管理、智慧財產權等各種領域。

DDC 網路不直接向個人使用者提供服務,而是向擁有 DDC/NFT 業務的平臺方提供極其便捷的網路接入服務,以方便這些平臺以極低的成本提供 DDC/NFT 的生成和管理服務。

DDC-SDK 是用於開發者與 DDC 合約互動的 API 工具。為了讓運營方或各平臺方對 DDC-SDK 整體設計有一個全面詳細的瞭解,同時為專案的開發、測試、驗證、交付等環節提供原始依據以及開發指導,BSN 研習社推出 BSN-DDC 基礎網路 DDC SDK 詳細設計系列。分別從整體設計,DID 功能設計,DDC 許可權管理、費用管理,官方合約 BSN-DDC-721,官方合約 BSN-DDC-1155,交易查詢、區塊查詢、簽名事件,資料解析,示例等八個方面,全面詳細的介紹 DDC-SDK。

本期是系列文章第八期,示例。

4.1 區塊資訊示例

4.1.1 泰安鏈

{
    "dbHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "extraData": [],
    "gasLimit": "0x0",
    "gasUsed": "0x0",
    "hash": "0xfa639d1454362a8cdfcab1ca1948a5defaf7048b28f67e80780ab1e24e8f8c59",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "number": "0x1",
    "parentHash": "0x249f59e00beac8424a7821c4750fdd70c128f4ce795afbab53f345e9fce95d1a",
    "receiptsRoot": "0x69a04fa6073e4fc0947bac7ee6990e788d1e2c5ec0fe6c2436d0892e7f3c09d2",
    "sealer": "0x0",
    "sealerList": [
      "4ca3a91a4937355dba6a2e5fe76141479a1fc44e9caa86750092dab64e0b8382f6b8476749c2d2de414350a54491620d38813d2a1442f524e36e3d9946109c4d"
    ],
    "signatureList": [
      {
        "index": "0x0",
        "signature": "0x4602135870d9a4846e2536d4a48e831825a5d95768dd0d4f08544a0bd4c2af41242dec1751a05c07d7572027f8d6ac1625c48145beb004e2dce8b7ce9e2bb73d00"
      }
    ],
    "stateRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "timestamp": "0x175ac38cf10",
    "transactions": [
      {
        "blockHash": "0xfa639d1454362a8cdfcab1ca1948a5defaf7048b28f67e80780ab1e24e8f8c59",
        "blockLimit": "0x100",
        "blockNumber": "0x1",
        "chainId": "0x1",
        "extraData": "0x",
        "from": "0x57c7be32cbfb3bfed4fddc87efcc735b4e945fb3",
        "gas": "0x2faf080",
        "gasPrice": "0xa",
        "groupId": "0x1",
        "hash": "0x3961fac263d8e640b148ddcfafd71d2069e93a006abc937c32fb16cfa96e661d",
        "input": "0x4ed3885e0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000a464953434f2042434f5300000000000000000000000000000000000000000000",
        "nonce": "0x3eb675ec791c2d19858c91d0046821c27d815e2e9c151604912205000002968",
        "signature": {
          "r": "0x9edf7c0cb63645442aff11323916d51ec5440de979950747c0189f338afdcefd",
          "s": "0x2f3473184513c6a3516e066ea98b7cfb55a79481c9db98e658dd016c37f03dcf",
          "signature": "0x9edf7c0cb63645442aff11323916d51ec5440de979950747c0189f338afdcefd2f3473184513c6a3516e066ea98b7cfb55a79481c9db98e658dd016c37f03dcf00",
          "v": "0x0"
        },
        "to": "0x8c17cf316c1063ab6c89df875e96c9f0f5b2f744",
        "transactionIndex": "0x0",
        "value": "0x0"
      }
    ],
    "transactionsRoot": "0xb880b08df3b43a9ffc334d7a526522b33e004ef95403d61d76454b6085b9b2f1"
}

4.1.2 武漢鏈

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "difficulty": "0x2",
        "extraData": "0xd883010a08846765746888676f312e31362e37856c696e757800000000000000a7381c6f48e36d85b06ccc073de74836892b458b61caa512d5113e901abef08606aa9405d5ae035ff4e78daccfdc2362209d1f9475e1d77d50f018652372b69601",
        "gasLimit": "0x7a1200",
        "gasUsed": "0x3e21d",
        "hash": "0x7bb27e906261ce362551463d34950ddf989b6d860eabc4664e831937108675ad",
        "logsBloom": "0x00000000000000000000000000000000002008000000010000000000100000000000000000000000400000004000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000001000004000000000020000000000000000000800000000000800000000000000000010000000000000000000000000000000000000001000000020000000008000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000400000000100000000000000020000000080000040000000000010000000000000000000000000000000002000000",
        "miner": "0x87a1243b8ac7363c3667d6ad6b89bec20ff022fe",
        "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "nonce": "0x0000000000000000",
        "number": "0x1b5c4e",
        "parentHash": "0xc0f3bc11897b020a9f71ea77cd7f3cdb7ef86778779ba17b3893eee0dc876b49",
        "receiptsRoot": "0xe826d1a5608bd8351d5ee7ac9a10c3c8d08f3a0f703f687016e1edde8b469eb1",
        "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
        "size": "0x475",
        "stateRoot": "0xd918ab8cd0e6dd07dda0a59db8d8866110f523d799e70f30bd0ac7201f3bca80",
        "timestamp": "0x61c67c48",
        "totalDifficulty": "0x36b89d",
        "transactions": [
            {
                "blockHash": "0x7bb27e906261ce362551463d34950ddf989b6d860eabc4664e831937108675ad",
                "blockNumber": "0x1b5c4e",
                "from": "0x019ba4600e117f06e3726c0b100a2f10ec52339e",
                "gas": "0x3e21d",
                "gasPrice": "0x4d7c6d00",
                "hash": "0x25392b914c3c2d0fa7fd5fe41d2c218fe81a1be63eb80484c110432f40f8054f",
                "input": "0x146d9ddc0000000000000000000000009d37d92d3bca605a49f21642c309e578b16040fd000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000056464632d3200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056464632d31000000000000000000000000000000000000000000000000000000",
                "nonce": "0x1a",
                "to": "0x45bcf28556494fb116c4623f8f32091476933fe3",
                "transactionIndex": "0x0",
                "value": "0x0",
                "type": "0x0",
                "v": "0x2b89",
                "r": "0x6d0cb65392d3857e0ccb82f7c372b628074ec2d74bfde2230057cce97429aadd",
                "s": "0x13cef22abd8d4e81eb875430706cd9cc3513900854d5474cd7a08b5751e1af97"
            }
        ],
        "transactionsRoot": "0xd7cd21ddeb2710404c7f075f5b66c3d626aad5819c757dac5b50e99007ba1961",
        "uncles": []
    }
}

4.1.3 文昌鏈

{
	"jsonrpc": "2.0",
	"id": 1,
	"result": {
		"baseFeePerGas": "0x7",
		"difficulty": "0x0",
		"extraData": "0x",
		"gasLimit": "0xffffffff",
		"gasUsed": "0x0",
		"hash": "0x8d24a1833846d4362cd039ed5ef8f762f3d4ed29b362fc8cb85f73ea0dfe499d",
		"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
		"miner": "0xc29d6bb924a12f890adaff4f04b5aba54cbfb6a5",
		"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
		"nonce": "0x0000000000000000",
		"number": "0xb44",
		"parentHash": "0x28875d32ef3f2ff1b52e147459f3bd31a01b936a9d06ba8b47818886d9098ab9",
		"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
		"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
		"size": "0x253",
		"stateRoot": "0xc7954e969d7583b0319fda81686007e7791fa858e26b09827010e1aed764b90f",
		"timestamp": "0x61dd87c5",
		"totalDifficulty": "0x0",
		"transactions": [],
		"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
		"uncles": []
	}
}

4.2 交易回執資訊示例

4.2.1 泰安鏈

{
        "blockHash": "0x977efec48c248ea4be87016446b40d7785d7b71b7d4e3aa0b103b9cf0f5fe19e",
        "blockNumber": "0xa",
        "contractAddress": "0x0000000000000000000000000000000000000000",
        "from": "0xcdcce60801c0a2e6bb534322c32ae528b9dec8d2",
        "gasUsed": "0x1fb8d",
        "input": "0xb602109a000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000203078313030303030303030303030303030303030303030303030303030303030000000000000000000000000000000000000000000000000000000000000000832303139303733300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026262000000000000000000000000000000000000000000000000000000000000",
        "logs": [ ],
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "output": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "root":"0x38723a2e5e8a17aa7950dc008209944e898f69a7bd10a23c839d341e935fd5ca",
        "status": "0x0",
        "to": "0x15538acd403ac1b2ff09083c70d04856b8c0bdfd",
        "transactionHash": "0x708b5781b62166bd86e543217be6cd954fd815fd192b9a124ee9327580df8f3f",
        "transactionIndex": "0x0"
    }

4.2.2 武漢鏈

{
    "jsonrpc": "2.0",
    "id": 0,
    "result": {
        "blockHash": "0x8cba08237576f10cc7728c63c4c1f0767613b8386c797e30ca295f58ab703325",
        "blockNumber": "0x1b61ff",
        "contractAddress": null,
        "cumulativeGasUsed": "0x3161c",
        "effectiveGasPrice": "0x4d7c6d00",
        "from": "0x019ba4600e117f06e3726c0b100a2f10ec52339e",
        "gasUsed": "0x3161c",
        "logs": [
            {
                "address": "0x920c8c4e79d975891765ec286afb8792b26a7887",
                "topics": [
                    "0xe5e4f0955699fa27be3f7aeb5a9e4ab78b6a37914fd44e5b08c4b78e56f04aa0",
                    "0x000000000000000000000000019ba4600e117f06e3726c0b100a2f10ec52339e",
                    "0x00000000000000000000000045bcf28556494fb116c4623f8f32091476933fe3"
                ],
                "data": "0xd3fc986400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a",
                "blockNumber": "0x1b61ff",
                "transactionHash": "0x31b09b1e618bcb8a513f4970300179f38583a881af4d03953bff79f1ca0e53d0",
                "transactionIndex": "0x0",
                "blockHash": "0x8cba08237576f10cc7728c63c4c1f0767613b8386c797e30ca295f58ab703325",
                "logIndex": "0x0",
                "removed": false
            },
            {
                "address": "0x45bcf28556494fb116c4623f8f32091476933fe3",
                "topics": [
                    "0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62",
                    "0x000000000000000000000000019ba4600e117f06e3726c0b100a2f10ec52339e",
                    "0x0000000000000000000000000000000000000000000000000000000000000000",
                    "0x000000000000000000000000019ba4600e117f06e3726c0b100a2f10ec52339e"
                ],
                "data": "0x000000000000000000000000000000000000000000000000000000000000000b0000000000000000000000000000000000000000000000000000000000000064",
                "blockNumber": "0x1b61ff",
                "transactionHash": "0x31b09b1e618bcb8a513f4970300179f38583a881af4d03953bff79f1ca0e53d0",
                "transactionIndex": "0x0",
                "blockHash": "0x8cba08237576f10cc7728c63c4c1f0767613b8386c797e30ca295f58ab703325",
                "logIndex": "0x1",
                "removed": false
            }
        ],
        "logsBloom": "0x00000000000000000000000000000000002008000000000000000000100000000000000000000000400000004000000000000000000000000000000000002000800000000000000000000000000000000000000000000000000000001000004000000000020000000000000000000800000000000000000000000000000010000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000008100000000000000020000000080000040000000000010000000000000000000000000000080000000000",
        "status": "0x1",
        "to": "0x45bcf28556494fb116c4623f8f32091476933fe3",
        "transactionHash": "0x31b09b1e618bcb8a513f4970300179f38583a881af4d03953bff79f1ca0e53d0",
        "transactionIndex": "0x0",
        "type": "0x0"
    }
}

4.2.3 文昌鏈

{
	"jsonrpc": "2.0",
	"id": 0,
	"result": {
		"blockHash": "0x9149b2138d340898c86b96ca07de62bd8612ccd66320bf4f45216b53e55b1ffe",
		"blockNumber": "0x700c",
		"contractAddress": null,
		"cumulativeGasUsed": "0x189aa",
		"from": "0x2a14331f1f2d3ba0d750f4c4916e69b1dc38d721",
		"gasUsed": "0x189aa",
		"logs": [{
			"address": "0xdac50c90b934aded33b6adc9f5855ab8a9efb09a",
			"topics": ["0x623400fa99cb4c5485584d19857bba72895e7e3400646f9fc46f627a605c267c", "0x0000000000000000000000005804a5f927ce7382ad194fd25bcaa189dad92a39"],
			"data": "0x00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000083132333132333231000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d706c6174666f726d4e616d653100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000831323331323332310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
			"blockNumber": "0x700c",
			"transactionHash": "0x4b286a32b43e3bf07e9b4967573871bf1eec808f33c577581c6f9f4620a3097e",
			"transactionIndex": "0x0",
			"blockHash": "0x9149b2138d340898c86b96ca07de62bd8612ccd66320bf4f45216b53e55b1ffe",
			"logIndex": "0x0",
			"removed": false
		}, {
			"address": "0xdac50c90b934aded33b6adc9f5855ab8a9efb09a",
			"topics": ["0x3a99d1f905eb66fd0850dd6e2156668b6ae1f16f41cd49dd7c6d4fb5147f784f", "0x0000000000000000000000005804a5f927ce7382ad194fd25bcaa189dad92a39"],
			"data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
			"blockNumber": "0x700c",
			"transactionHash": "0x4b286a32b43e3bf07e9b4967573871bf1eec808f33c577581c6f9f4620a3097e",
			"transactionIndex": "0x0",
			"blockHash": "0x9149b2138d340898c86b96ca07de62bd8612ccd66320bf4f45216b53e55b1ffe",
			"logIndex": "0x1",
			"removed": false
		}],
		"logsBloom": "0x00100000000000000000000000000000000000200000000000000000000000000400000000800000000000000000000000000000000000000000000000000000000000000000000900000000000008000000000000000000000000000800000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000",
		"status": "0x1",
		"to": "0xdac50c90b934aded33b6adc9f5855ab8a9efb09a",
		"transactionHash": "0x4b286a32b43e3bf07e9b4967573871bf1eec808f33c577581c6f9f4620a3097e",
		"transactionIndex": "0x0",
		"type": "0x0"
	}
}

4.3 交易資訊示例

4.3.1 泰安鏈

{
    "blockHash": "0xfa639d1454362a8cdfcab1ca1948a5defaf7048b28f67e80780ab1e24e8f8c59",
    "blockLimit": "0x100",
    "blockNumber": "0x1",
    "chainId": "0x1",
    "extraData": "0x",
    "from": "0x57c7be32cbfb3bfed4fddc87efcc735b4e945fb3",
    "gas": "0x2faf080",
    "gasPrice": "0xa",
    "groupId": "0x1",
    "hash": "0x3961fac263d8e640b148ddcfafd71d2069e93a006abc937c32fb16cfa96e661d",
    "input": "0x4ed3885e0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000a464953434f2042434f5300000000000000000000000000000000000000000000",
    "nonce": "0x3eb675ec791c2d19858c91d0046821c27d815e2e9c151604912205000002968",
    "signature": {
      "r": "0x9edf7c0cb63645442aff11323916d51ec5440de979950747c0189f338afdcefd",
      "s": "0x2f3473184513c6a3516e066ea98b7cfb55a79481c9db98e658dd016c37f03dcf",
      "signature": "0x9edf7c0cb63645442aff11323916d51ec5440de979950747c0189f338afdcefd2f3473184513c6a3516e066ea98b7cfb55a79481c9db98e658dd016c37f03dcf00",
      "v": "0x0"
    },
    "to": "0x8c17cf316c1063ab6c89df875e96c9f0f5b2f744",
    "transactionIndex": "0x0",
    "value": "0x0"
  }

4.3.2 武漢鏈

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0x8cba08237576f10cc7728c63c4c1f0767613b8386c797e30ca295f58ab703325",
        "blockNumber": "0x1b61ff",
        "from": "0x019ba4600e117f06e3726c0b100a2f10ec52339e",
        "gas": "0x3161c",
        "gasPrice": "0x4d7c6d00",
        "hash": "0x31b09b1e618bcb8a513f4970300179f38583a881af4d03953bff79f1ca0e53d0",
        "input": "0xd3fc9864000000000000000000000000019ba4600e117f06e3726c0b100a2f10ec52339e000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000012546f6b656e2d526564446174652d577831360000000000000000000000000000",
        "nonce": "0x29",
        "to": "0x45bcf28556494fb116c4623f8f32091476933fe3",
        "transactionIndex": "0x0",
        "value": "0x0",
        "type": "0x0",
        "v": "0x2b89",
        "r": "0xac4f674255eb65589ad83e6c590c3c77a8e058ced78350be6bad2524aeed1f8b",
        "s": "0x2dbab9a1c8f4b622dba70e9a14be27a53c736593ddbcaaf843be08d5be514b94"
    }
}

4.3.3 文昌鏈

{
	"jsonrpc": "2.0",
	"id": 2,
	"result": {
		"blockHash": "0x9149b2138d340898c86b96ca07de62bd8612ccd66320bf4f45216b53e55b1ffe",
		"blockNumber": "0x700c",
		"from": "0x2a14331f1f2d3ba0d750f4c4916e69b1dc38d721",
		"gas": "0x493e0",
		"gasPrice": "0x989680",
		"hash": "0x4b286a32b43e3bf07e9b4967573871bf1eec808f33c577581c6f9f4620a3097e",
		"input": "0xbac7ad520000000000000000000000005804a5f927ce7382ad194fd25bcaa189dad92a3900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
		"nonce": "0xfa",
		"to": "0xdac50c90b934aded33b6adc9f5855ab8a9efb09a",
		"transactionIndex": "0x0",
		"value": "0x0",
		"type": "0x0",
		"v": "0x1c",
		"r": "0xcec487128c0d1b614984997152fe2d88e6963831bb902f6800f3355cdcdd12b",
		"s": "0x6c3b007b5b54a05c0b55a5608cc8f5b5bff064ce160d95f61ad00539c51976df"
	}
}

4.4 離線生成賬戶

4.4.1 功能介紹

平臺方或終端使用者可以透過此方法生成離線賬戶

4.4.2 API 定義

  • 方法定義:
    Account createAccount();
  • 呼叫者:平臺方、終端使用者;
  • 核心邏輯:無
  • 輸入引數:
欄位名 欄位 型別 必傳 備註





  • 輸出引數:
欄位名 欄位 型別 必傳 備註
賬戶地址 address String
公鑰 publicKey String
私鑰 privateKey String
助記詞 mnemonic String

4.5 接入 Url 設定

4.4.1 功能介紹

平臺方或終端使用者可以透過此方法對接入的閘道器 URL 地址進行設定

4.4.2 API 定義

  • 方法定義:
    Boolean setGatewayUrl(String gatewayUrl);
  • 呼叫者:平臺方、終端使用者;
  • 核心邏輯:無
  • 輸入引數:
欄位名 欄位 型別 必傳 備註
閘道器URL gatewayUrl String
  • 輸出引數:
欄位名 欄位 型別 必傳 備註
設定結果
Boolean

4.6 接入 Key 設定

4.4.1 功能介紹

平臺方或終端使用者可以透過此方法對接入的 Key 進行設定,注:apiKey 在設定的時候 KEY 用 “x-api-key”,值根據實際情況填寫。

4.4.2 API 定義

  • 方法定義:
    Boolean setGatewayApiKey(String apiKey);
  • 呼叫者:平臺方、終端使用者;
  • 核心邏輯:無
  • 輸入引數:
欄位名 欄位 型別 必傳 備註
接入KEY apiKey String
  • 輸出引數:
欄位名 欄位 型別 必傳 備註
設定結果
Boolean

本文資料內容來源於 BSN-DDC SDK 詳細設計 - V1.0,GitHub 地址為:

欲瀏覽更多資訊,請您點選登入檢視。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70012206/viewspace-2927429/,如需轉載,請註明出處,否則將追究法律責任。

相關文章