Repository navigation
feat(platform): add proof-backed asset lock outpoint query #5581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v5.1-dev
Are you sure you want to change the base?
Changes from all commits
985e77e
ff4ff2e
fbfdc25
5d214ee
2c75c66
a0a9fbb
9de618d
fa7227d
0658d17
fcbe843
136b65c
88595ac
e5a8a7f
ad98542
1dcc750
fb456c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,8 @@ const { | |
| v0: { | ||
| BroadcastStateTransitionRequest: PBJSBroadcastStateTransitionRequest, | ||
| BroadcastStateTransitionResponse: PBJSBroadcastStateTransitionResponse, | ||
| GetAssetLockOutpointInfoRequest: PBJSGetAssetLockOutpointInfoRequest, | ||
| GetAssetLockOutpointInfoResponse: PBJSGetAssetLockOutpointInfoResponse, | ||
| GetIdentityRequest: PBJSGetIdentityRequest, | ||
| GetIdentityResponse: PBJSGetIdentityResponse, | ||
| GetIdentitiesContractKeysRequest: PBJSGetIdentitiesContractKeysRequest, | ||
|
|
@@ -85,6 +87,7 @@ const { | |
|
|
||
| const { | ||
| BroadcastStateTransitionResponse: ProtocBroadcastStateTransitionResponse, | ||
| GetAssetLockOutpointInfoResponse: ProtocGetAssetLockOutpointInfoResponse, | ||
| GetIdentityResponse: ProtocGetIdentityResponse, | ||
| GetIdentitiesContractKeysResponse: ProtocGetIdentitiesContractKeysResponse, | ||
| GetDataContractResponse: ProtocGetDataContractResponse, | ||
|
|
@@ -139,6 +142,10 @@ class PlatformPromiseClient { | |
| this.client.broadcastStateTransition.bind(this.client), | ||
| ); | ||
|
|
||
| this.client.getAssetLockOutpointInfo = promisify( | ||
| this.client.getAssetLockOutpointInfo.bind(this.client), | ||
| ); | ||
|
thepastaclaw marked this conversation as resolved.
Resolved
|
||
|
|
||
| this.client.getIdentity = promisify( | ||
| this.client.getIdentity.bind(this.client), | ||
| ); | ||
|
|
@@ -269,6 +276,41 @@ class PlatformPromiseClient { | |
| ); | ||
| } | ||
|
|
||
| /** | ||
| * @param {!GetAssetLockOutpointInfoRequest} getAssetLockOutpointInfoRequest | ||
| * @param {?Object<string, string>} metadata | ||
| * @param {CallOptions} [options={}] | ||
| * @return {Promise<!GetAssetLockOutpointInfoResponse>} | ||
| */ | ||
| getAssetLockOutpointInfo( | ||
| getAssetLockOutpointInfoRequest, | ||
| metadata = {}, | ||
| options = {}, | ||
| ) { | ||
| if (!isObject(metadata)) { | ||
| throw new Error('metadata must be an object'); | ||
| } | ||
|
|
||
| return this.client.getAssetLockOutpointInfo( | ||
| getAssetLockOutpointInfoRequest, | ||
| convertObjectToMetadata(metadata), | ||
| { | ||
| interceptors: [ | ||
| jsonToProtobufInterceptorFactory( | ||
| jsonToProtobufFactory( | ||
| ProtocGetAssetLockOutpointInfoResponse, | ||
| PBJSGetAssetLockOutpointInfoResponse, | ||
| ), | ||
| protobufToJsonFactory( | ||
| PBJSGetAssetLockOutpointInfoRequest, | ||
| ), | ||
| ), | ||
| ], | ||
| ...options, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preserve conversion when callers supply interceptors. If a caller passes
|
||
| }, | ||
| ); | ||
| } | ||
|
|
||
| /** | ||
| * @param {!GetIdentityRequest} getIdentityRequest | ||
| * @param {?Object<string, string>} metadata | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.