mirror of
https://github.com/aljazceru/ark.git
synced 2026-02-23 03:44:20 +01:00
Ark Notes (#379)
* ark credits * rename "ecash" --> "ark credit" * rework note_test.go * NewFromString * create several notes * note repo: rename "push" to "add" * RegisterInputsForNextRoundRequest: move "notes" to field #3 * use uint64 as note ID * rename to voucher * add nostr notification * nostr notification test and fixes * bump badger to 4.3 * allow npub to be registered * rename poolTxID * add default relays * Update server/internal/config/config.go Co-authored-by: Marco Argentieri <3596602+tiero@users.noreply.github.com> * fix RedeemVouchers test * notification = voucher * WASM wrappers * fix arkd voucher cmd * test_utils.go ignore gosec rule G101 * fix permissions * rename ALL to notes * add URI prefix * note.go : fix signature encoding * fix decode note.Data * Update server/internal/infrastructure/notifier/nostr/nostr.go Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com> * Update pkg/client-sdk/wasm/browser/wrappers.go Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com> * Update server/internal/infrastructure/notifier/nostr/nostr.go Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com> * rework note and entity db + sqlite implementations * NOTIFICATION_PREFIX -> NOTE_URI_PREFIX * validate NOTE_URI_PREFIX * Update defaults to convenant-less mainnet (#2) * config: defaults to convenant-less tx builder * Drop env var for blockchain scanner --------- Co-authored-by: altafan <18440657+altafan@users.noreply.github.com> * add // before URI prefix * add URI prefix in admin CreateNote * Fixes * rework nonces encoding (#4) * rework nonces encoding * add a check in Musig2Nonce decode function * musig2_test: increase number of signers to 20 * musig2.json: add a test case with a 35 leaves tree * GetEventStream REST rework * fix round phases time intervals * [SDK] Use server-side streams in rest client * Fix history * make the URI optional * Updates * Fix settled txs in history * fix e2e test * go work sync in sdk unit test * fix signMessage in btc and liquid sdk wallets --------- Co-authored-by: Marco Argentieri <3596602+tiero@users.noreply.github.com> Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
This commit is contained in:
@@ -16,6 +16,38 @@
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/v1/admin/note": {
|
||||
"post": {
|
||||
"operationId": "AdminService_CreateNote",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1CreateNoteResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1CreateNoteRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AdminService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/admin/round/{roundId}": {
|
||||
"get": {
|
||||
"operationId": "AdminService_GetRoundDetails",
|
||||
@@ -130,6 +162,30 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1CreateNoteRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"quantity": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1CreateNoteResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"notes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1GetRoundDetailsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -446,6 +446,70 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/vtxo/nostr": {
|
||||
"post": {
|
||||
"operationId": "ArkService_SetNostrRecipient",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1SetNostrRecipientResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1SetNostrRecipientRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"ArkService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/vtxo/nostr/delete": {
|
||||
"post": {
|
||||
"operationId": "ArkService_DeleteNostrRecipient",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1DeleteNostrRecipientResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1DeleteNostrRecipientRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"ArkService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/vtxos/{address}": {
|
||||
"get": {
|
||||
"operationId": "ArkService_ListVtxos",
|
||||
@@ -556,6 +620,21 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1DeleteNostrRecipientRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"vtxos": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/v1SignedVtxoOutpoint"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1DeleteNostrRecipientResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"v1GetBoardingAddressRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -731,6 +810,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1OwnershipProof": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"controlBlock": {
|
||||
"type": "string"
|
||||
},
|
||||
"script": {
|
||||
"type": "string"
|
||||
},
|
||||
"signature": {
|
||||
"type": "string",
|
||||
"title": "VTXO outpoint signed with script's secret key"
|
||||
}
|
||||
},
|
||||
"description": "This message is used to prove to the ASP that the user controls the vtxo without revealing the whole VTXO descriptor."
|
||||
},
|
||||
"v1PingResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
@@ -768,6 +863,12 @@
|
||||
},
|
||||
"ephemeralPubkey": {
|
||||
"type": "string"
|
||||
},
|
||||
"notes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -954,6 +1055,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1SetNostrRecipientRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"nostrRecipient": {
|
||||
"type": "string"
|
||||
},
|
||||
"vtxos": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/v1SignedVtxoOutpoint"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1SetNostrRecipientResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"v1SignedVtxoOutpoint": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"outpoint": {
|
||||
"$ref": "#/definitions/v1Outpoint"
|
||||
},
|
||||
"proof": {
|
||||
"$ref": "#/definitions/v1OwnershipProof"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1SubmitSignedForfeitTxsRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user