52 0x16, 0x9e, 0x1e, 0x83, 0xe9, 0x30, 0x85, 0x33, 0x91,
53 0xbc, 0x6f, 0x35, 0xf6, 0x05, 0xc6, 0x75, 0x4c, 0xfe,
54 0xad, 0x57, 0xcf, 0x83, 0x87, 0x63, 0x9d, 0x3b, 0x40,
55 0x96, 0xc5, 0x4f, 0x18, 0xf4, 0x00, 0x00, 0x00, 0x00,
57 const unsigned char spend_pubkey[33] = {
58 0x02,0xee,0x97,0xdf,0x83,0xb2,0x54,0x6a,
59 0xf5,0xa7,0xd0,0x62,0x15,0xd9,0x8b,0xcb,
60 0x63,0x7f,0xe0,0x5d,0xd0,0xfa,0x37,0x3b,
61 0xd8,0x20,0xe6,0x64,0xd3,0x72,0xde,0x9a,0x01
63 const unsigned char scan_key[32] = {
64 0xa8,0x90,0x54,0xc9,0x5b,0xe3,0xc3,0x01,
65 0x56,0x65,0x74,0xf2,0xaa,0x93,0xad,0xe0,
66 0x51,0x85,0x09,0x03,0xa6,0x9c,0xbd,0xd1,
67 0xd4,0x7e,0xae,0x26,0x3d,0x7b,0xc0,0x31
69 unsigned char scalar[32];
71 size_t pubkeylen = 33;
73 for (i = 0; i < 32; i++) {
79 data->tx_inputs_ptrs[0] = &data->tx_inputs[0];
81 memcpy(data->scan_key, scan_key, 32);
91 unsigned char other_scan_seckey[32] = {99};
97 CHECK(data->num_matches <= data->num_outputs);
98 index_first_k = data->num_outputs - data->num_matches;
106 &labeled_spend_pubkey, &data->spend_pubkey, &label));
113 keypairs_ptrs[0] = &input_keypair;
114 for (i = 0; i < data->num_outputs; i++) {
115 data->tx_outputs_ptrs[i] = &data->tx_outputs[i];
116 recipients_ptrs[i] = &recipients[i];
118 if (i >= index_first_k) {
121 unsigned char tweak[32] = {0};
128 recipients[i].
index = i;
133 for (i = 0; i < data->num_outputs; i++) {
134 data->found_outputs_ptrs[i] = &data->found_outputs[i];
137 for (i = 0; i < data->num_matches / 2; i++) {
138 int pos = index_first_k + i;
140 data->tx_outputs_ptrs[pos] = data->tx_outputs_ptrs[data->num_outputs - i - 1];
141 data->tx_outputs_ptrs[data->num_outputs - i - 1] = tmp;
144 free(recipients_ptrs);
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_silentpayments_recipient_scan_outputs(const secp256k1_context *ctx, secp256k1_silentpayments_found_output **found_outputs, uint32_t *n_found_outputs, const secp256k1_xonly_pubkey *const *tx_outputs, size_t n_tx_outputs, const unsigned char *scan_key32, const secp256k1_silentpayments_prevouts_summary *prevouts_summary, const secp256k1_pubkey *unlabeled_spend_pubkey, secp256k1_silentpayments_label_lookup label_lookup, const void *label_context) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_ARG_NONNULL(6) SECP256K1_ARG_NONNULL(7) SECP256K1_ARG_NONNULL(8)
Scan for Silent Payments transaction outputs.